> ## Documentation Index
> Fetch the complete documentation index at: https://docs.grunt.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Rules

> Use Grunt rules to apply reusable formatting and data-driven behavior

Rules are the core formatting and visualization system in Grunt.

## What rules do

Rules let you define behavior instead of formatting each value manually.

Examples from the legacy support guidance:

* Change the font, border, fill, or size of selected content
* Show icons or graphics based on values
* Turn values into bars, gauges, or other visual elements
* Reuse the same formatting logic across multiple rows, columns, or objects

This is why rules save time when your data changes.

## Add a rule

1. Select the part of the object you want to change.
2. Right-click and choose **Add rule**, or press `Ctrl` + `Enter`.
3. Choose the rule from the dialog.
4. Enable the properties you want to control.

Most properties start in a default state and do nothing until you activate them.

## Understand the rule dialog

The legacy articles split the rule dialog into two main areas:

* **Property section** at the top, where you turn individual settings on or off
* **Target section** at the bottom, where you define where the rule applies

If a rule supports different content types, you can often target:

* The cell itself
* Text inside the object
* Graphics created by rules

## Understand the rule stack

Every rule appears in the rule stack on the edge of the PowerPoint window.

* Rules are applied from the bottom up.
* A rule higher in the stack wins if two rules control the same setting on the same target.
* You can drag rules up or down to change precedence.

If nothing changes after you edit a rule, another rule higher in the stack may be overriding it.

## Rule families

Use these pages to find every legacy rule now migrated into Mintlify:

<CardGroup cols={2}>
  <Card title="Text and number rules" icon="font" href="/powerpoint-add-in/user/rules-text-and-number">
    Font, paragraph style, number format, fill, border, and text rotation.
  </Card>

  <Card title="Layout and structure rules" icon="table-cells" href="/powerpoint-add-in/user/rules-layout-and-structure">
    Alignment, margin, merge, size, and clear.
  </Card>

  <Card title="Visual and logo rules" icon="icons" href="/powerpoint-add-in/user/rules-visual-and-logo">
    Chevron, header underline, icon, icon conditional, and logo.
  </Card>

  <Card title="Gauges and value source" icon="chart-pie" href="/powerpoint-add-in/user/rules-gauges-and-value-source">
    Donut gauge, bar gauge, and value-source-driven rule patterns.
  </Card>
</CardGroup>

## All legacy rules covered

| Legacy rule                 | Mintlify page                                                                    |
| --------------------------- | -------------------------------------------------------------------------------- |
| Font (character style) rule | [Text and number rules](/powerpoint-add-in/user/rules-text-and-number)           |
| Alignment rule              | [Layout and structure rules](/powerpoint-add-in/user/rules-layout-and-structure) |
| Chevron rule                | [Visual and logo rules](/powerpoint-add-in/user/rules-visual-and-logo)           |
| Fill rule                   | [Text and number rules](/powerpoint-add-in/user/rules-text-and-number)           |
| Header, underline rule      | [Visual and logo rules](/powerpoint-add-in/user/rules-visual-and-logo)           |
| Icon rule                   | [Visual and logo rules](/powerpoint-add-in/user/rules-visual-and-logo)           |
| Icon conditional rule       | [Visual and logo rules](/powerpoint-add-in/user/rules-visual-and-logo)           |
| Logo rule                   | [Visual and logo rules](/powerpoint-add-in/user/rules-visual-and-logo)           |
| Margin rule                 | [Layout and structure rules](/powerpoint-add-in/user/rules-layout-and-structure) |
| Merge rule                  | [Layout and structure rules](/powerpoint-add-in/user/rules-layout-and-structure) |
| Number format rule          | [Text and number rules](/powerpoint-add-in/user/rules-text-and-number)           |
| Paragraph style rule        | [Text and number rules](/powerpoint-add-in/user/rules-text-and-number)           |
| Size rule                   | [Layout and structure rules](/powerpoint-add-in/user/rules-layout-and-structure) |
| Border rule                 | [Text and number rules](/powerpoint-add-in/user/rules-text-and-number)           |
| Value source in Rules       | [Gauges and value source](/powerpoint-add-in/user/rules-gauges-and-value-source) |
| Donut (gauge) rule          | [Gauges and value source](/powerpoint-add-in/user/rules-gauges-and-value-source) |
| Bar (gauge) rule            | [Gauges and value source](/powerpoint-add-in/user/rules-gauges-and-value-source) |
| Text rotation rule          | [Text and number rules](/powerpoint-add-in/user/rules-text-and-number)           |
| Clear rule                  | [Layout and structure rules](/powerpoint-add-in/user/rules-layout-and-structure) |

## Target the right areas

Good targeting is what makes rules reusable.

Use these targeting patterns:

* Select the target area before adding the rule when the target is obvious.
* Use include and exclude lists when the target should stay dynamic as the grid changes.
* Use row and column types when the structure matters.
* Use tags when the target spans custom cells or logic-based groups.

Continue to [Visual Grids](/powerpoint-add-in/user/visual-grids) for row types and tags, or to [FAQ and tips](/powerpoint-add-in/user/faq-and-tips) for common targeting edge cases.
