You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DESIGN.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -208,15 +208,15 @@ Class naming is BEM-like with mCSS separators: `.block`, `.block_element`, `.blo
208
208
209
209
## Do's and Don'ts
210
210
211
-
Do preserve the native cascade-layer setup: framework files import into named layers (`settings, base, elements, global, atoms, components, pages, helpers`) via `src/styles/framework/mcss.css`; site-only files import unlayered via `src/styles/_global.css`.
211
+
Do preserve the native cascade-layer setup: framework files import into named layers (`settings, base, elements, global, components, pages, helpers`) via `src/styles/framework/mcss.css`; site-only files import unlayered via `src/styles/_global.css`.
212
212
213
-
Do add new CSS files with the correct layer prefix, such as `component.name.css`, `atom.name.css`, or `help.name.css`, then import them with `layer(<name>)` in `framework/mcss.css` (framework) or plainly in `_global.css` (site).
213
+
Do add new CSS files with the correct layer prefix, such as `component.name.css` or `help.name.css`, then import them with `layer(<name>)` in `framework/mcss.css` (framework) or plainly in `_global.css` (site).
214
214
215
215
Do use semantic theme tokens when they exist. Raw palette tokens are fine for new semantic roles, but component CSS should converge on named component properties.
216
216
217
217
Do keep all formatting at 2 spaces (CSS, Astro, JS, TS), per `.editorconfig`.
218
218
219
-
Don't use page-specific CSS when a reusable component or atom is the better fit.
219
+
Don't use page-specific CSS when a reusable component is the better fit.
220
220
221
221
Don't bypass dark mode by hard-coding light-only text, border, or surface colors.
Copy file name to clipboardExpand all lines: agents/content.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,10 @@ Do not use the em dash character (`—`) in blog posts. Use commas, a colon, par
34
34
|`title`| string | yes |
35
35
|`lastUpdate`| date | yes |
36
36
|`version`| number | yes |
37
-
|`type`|`"intro"`\|`"atom"`\|`"component"`| yes |
37
+
|`type`|`"intro"`\|`"component"`| yes |
38
+
|`cssOnly`| boolean (optional) | no |
39
+
40
+
`cssOnly: true` marks class-only components with no Astro file (badge, button, toggle); it drives the "(CSS-only)" label in `/llms.txt`.
38
41
39
42
`version` tracks the maturity of the documented component itself (not the doc): `< 1` = API may still change, `1.0` = stable contract, bump on breaking changes. Keep it honest — a component with open bugs isn't `1.0`.
2.**Unlayered CSS beats every layer for normal declarations.** That's the consumer guarantee ("your CSS wins") and why site CSS is unlayered.
14
14
3.**Helpers are the exception: every helper declaration carries `!important`.** Important layered declarations beat unlayered CSS (the cascade inverts for important), so helpers win over site and consumer CSS too. They're element-level overrides, like inline styling. For important declarations layer order also inverts (earlier layer wins), which is why the reduced-motion block in `base.reset.css` still beats helpers.
15
15
4.`!important` is REQUIRED in every helper declaration and banned everywhere else in the framework, except the reduced-motion block in `base.reset.css` and third-party override files (see `site/external.astro.css`). `help.colors.css` and `help.spacing.css` get it from their generators.
@@ -23,8 +23,7 @@ mCSS uses **native CSS cascade layers** (`@layer`) on top of an ITCSS-inspired f
23
23
| base |`base.*`| Reset only (`base.reset.css`) |
24
24
| elements |`elements.*`| Bare HTML element styles (text, form, media) |
0 commit comments