Skip to content

Commit e20e2ad

Browse files
committed
docs: explain utilities group in layers.md
1 parent 4a3b048 commit e20e2ad

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

packages/docs/src/pages/en/styles/layers.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,25 @@ Your own styles will always override vuetify's if you don't use `@layer` yoursel
4242
vuetify-utilities,
4343
vuetify-final;
4444
```
45+
46+
## Utilities group
47+
48+
The `vuetify-utilities` layer itself contains nested sublayers to control the order of utility styles:
49+
50+
```css
51+
@layer vuetify-utilities {
52+
@layer theme-base;
53+
@layer typography;
54+
@layer helpers;
55+
@layer theme-background;
56+
@layer theme-foreground;
57+
}
58+
```
59+
60+
- **theme-base**: CSS custom properties for theme colors and other variables, applied to `:root` or a scoped selector.
61+
- **typography**: Typography-related CSS custom properties and classes generated by the typography system.
62+
- **helpers**: Utility classes like spacing (`.pa-4`, `.ma-2`), display (`.d-flex`), and text alignment (`.text-center`).
63+
- **theme-background**: Background color utilities such as `.bg-primary` and `.bg-surface`.
64+
- **theme-foreground**: Text color utilities such as `.text-primary` and `.text-error`.
65+
66+
This ordering ensures that explicit color utilities (background and foreground) can override helper classes when both are applied to the same element.

0 commit comments

Comments
 (0)