css-is-awesome 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +343 -0
- package/CHANGELOG.md +1036 -0
- package/CLAUDE.md +9 -0
- package/CONTRACT.md +580 -0
- package/GEMINI.md +9 -0
- package/LICENSE +21 -0
- package/LICENSE-third-party +88 -0
- package/MIGRATION.md +312 -0
- package/README.md +380 -0
- package/ROADMAP.md +714 -0
- package/THEMING.md +290 -0
- package/THREE-TIERS.md +158 -0
- package/VERSIONING.md +200 -0
- package/_index.scss +34 -0
- package/api.scss +16 -0
- package/bin/README.md +57 -0
- package/bin/cia.cjs +114 -0
- package/bin/migrate-bootstrap.cjs +427 -0
- package/bin/migrate-tailwind.cjs +832 -0
- package/css-is-awesome.instructions.md +533 -0
- package/dist/css-is-awesome.core.css +598 -0
- package/dist/css-is-awesome.core.min.css +1 -0
- package/dist/css-is-awesome.css +3733 -0
- package/dist/css-is-awesome.min.css +1 -0
- package/dist/css-is-awesome.utilities.css +2445 -0
- package/dist/css-is-awesome.utilities.min.css +1 -0
- package/dist/tokens.css +508 -0
- package/dist/tokens.d.ts +266 -0
- package/dist/tokens.min.css +1 -0
- package/figma-tokens/README.md +57 -0
- package/figma-tokens/primitives-brand.scss +121 -0
- package/figma-tokens/semantic-dark.scss +61 -0
- package/figma-tokens/semantic-light.scss +61 -0
- package/figma-tokens/tokens.json +144 -0
- package/llm.txt +183 -0
- package/mcp/server.cjs +1495 -0
- package/package.json +199 -0
- package/public/icons/README.md +278 -0
- package/public/icons/arrow-right.svg +4 -0
- package/public/icons/check.svg +4 -0
- package/public/icons/chevron-down.svg +4 -0
- package/public/icons/close.svg +4 -0
- package/public/icons/core/arrow-down.svg +13 -0
- package/public/icons/core/arrow-left.svg +13 -0
- package/public/icons/core/arrow-right.svg +13 -0
- package/public/icons/core/arrow-up.svg +13 -0
- package/public/icons/core/bell.svg +13 -0
- package/public/icons/core/calendar.svg +15 -0
- package/public/icons/core/check.svg +12 -0
- package/public/icons/core/chevron-down.svg +12 -0
- package/public/icons/core/chevron-left.svg +12 -0
- package/public/icons/core/chevron-right.svg +12 -0
- package/public/icons/core/chevron-up.svg +12 -0
- package/public/icons/core/clock.svg +13 -0
- package/public/icons/core/close.svg +13 -0
- package/public/icons/core/copy.svg +13 -0
- package/public/icons/core/download.svg +14 -0
- package/public/icons/core/edit.svg +13 -0
- package/public/icons/core/error.svg +14 -0
- package/public/icons/core/external-link.svg +14 -0
- package/public/icons/core/eye-off.svg +15 -0
- package/public/icons/core/eye.svg +13 -0
- package/public/icons/core/filter.svg +12 -0
- package/public/icons/core/heart.svg +12 -0
- package/public/icons/core/help.svg +14 -0
- package/public/icons/core/home.svg +13 -0
- package/public/icons/core/info.svg +14 -0
- package/public/icons/core/loading.svg +12 -0
- package/public/icons/core/lock.svg +13 -0
- package/public/icons/core/mail.svg +13 -0
- package/public/icons/core/menu.svg +14 -0
- package/public/icons/core/message.svg +12 -0
- package/public/icons/core/minus.svg +12 -0
- package/public/icons/core/more-horizontal.svg +14 -0
- package/public/icons/core/pause.svg +13 -0
- package/public/icons/core/play.svg +12 -0
- package/public/icons/core/plus.svg +13 -0
- package/public/icons/core/refresh.svg +15 -0
- package/public/icons/core/save.svg +14 -0
- package/public/icons/core/search.svg +13 -0
- package/public/icons/core/settings.svg +13 -0
- package/public/icons/core/share.svg +14 -0
- package/public/icons/core/sort.svg +15 -0
- package/public/icons/core/star.svg +12 -0
- package/public/icons/core/success.svg +13 -0
- package/public/icons/core/trash.svg +16 -0
- package/public/icons/core/unlock.svg +13 -0
- package/public/icons/core/upload.svg +14 -0
- package/public/icons/core/user.svg +13 -0
- package/public/icons/core/users.svg +15 -0
- package/public/icons/core/warning.svg +14 -0
- package/public/icons/download.svg +4 -0
- package/public/icons/edit.svg +4 -0
- package/public/icons/menu.svg +4 -0
- package/public/icons/search.svg +4 -0
- package/public/theme.css +4179 -0
- package/public/themes/README.md +102 -0
- package/public/themes/boilerplate/theme.css +154 -0
- package/public/themes/boilerplate-dark/theme.css +171 -0
- package/public/themes/boilerplate-light/theme.css +171 -0
- package/public/themes/cupertino/theme.css +165 -0
- package/public/themes/cupertino-dark/theme.css +200 -0
- package/public/themes/cupertino-light/theme.css +227 -0
- package/public/themes/glass/theme.css +190 -0
- package/public/themes/glass-dark/theme.css +201 -0
- package/public/themes/glass-light/theme.css +229 -0
- package/public/themes/graphite/theme.css +155 -0
- package/public/themes/graphite-dark/theme.css +223 -0
- package/public/themes/graphite-light/theme.css +191 -0
- package/public/themes/press/theme.css +189 -0
- package/public/themes/press-dark/theme.css +199 -0
- package/public/themes/press-light/theme.css +235 -0
- package/public/themes/prism/theme.css +159 -0
- package/public/themes/prism-dark/theme.css +185 -0
- package/public/themes/prism-light/theme.css +188 -0
- package/public/themes/sketchbook/theme.css +152 -0
- package/public/themes/sketchbook-dark/theme.css +194 -0
- package/public/themes/sketchbook-light/theme.css +188 -0
- package/public/themes/terminal/theme.css +159 -0
- package/public/themes/terminal-dark/theme.css +229 -0
- package/public/themes/terminal-light/theme.css +152 -0
- package/scripts/README.md +70 -0
- package/scripts/icon-contract.json +67 -0
- package/scripts/icon-validator.js +205 -0
- package/scripts/prepare-dist.mjs +65 -0
- package/scripts/theme-a11y.js +415 -0
- package/scripts/theme-contract.json +171 -0
- package/scripts/theme-validator.js +674 -0
- package/scss/README.md +55 -0
- package/scss/_animations-utilities.scss +107 -0
- package/scss/_animations.scss +248 -0
- package/scss/_app-styles.scss +15 -0
- package/scss/_generator.scss +174 -0
- package/scss/_icons.scss +475 -0
- package/scss/_index.scss +17 -0
- package/scss/_layout.scss +597 -0
- package/scss/_mixins.scss +1036 -0
- package/scss/_system.scss +291 -0
- package/scss/_utilities.scss +377 -0
- package/scss/api.scss +61 -0
- package/scss/components/_accordion.scss +72 -0
- package/scss/components/_buttons.scss +171 -0
- package/scss/components/_copy-button.scss +69 -0
- package/scss/components/_data.scss +190 -0
- package/scss/components/_feedback.scss +197 -0
- package/scss/components/_forms.scss +272 -0
- package/scss/components/_index.scss +17 -0
- package/scss/components/_navigation.scss +186 -0
- package/scss/components/_overlay.scss +259 -0
- package/scss/components/_stepper.scss +159 -0
- package/scss/components/_tabs.scss +72 -0
- package/scss/core.scss +54 -0
- package/scss/examples/_theming.scss +107 -0
- package/scss/examples/_usage.scss +317 -0
- package/scss/main.scss +64 -0
- package/scss/recipes/README.md +110 -0
- package/scss/recipes/_bare-tags.scss +232 -0
- package/scss/recipes/_recipe-template.md +119 -0
- package/scss/recipes/combobox.md +509 -0
- package/scss/recipes/dialog.md +265 -0
- package/scss/recipes/print-to-pdf.md +263 -0
- package/scss/theme/README.md +67 -0
- package/scss/theme/_brand.scss +18 -0
- package/scss/theme/_colors-dark.scss +68 -0
- package/scss/theme/_colors-light.scss +70 -0
- package/scss/theme/_components.scss +94 -0
- package/scss/theme/_icons.scss +104 -0
- package/scss/theme/_index.scss +62 -0
- package/scss/theme/_shadows.scss +65 -0
- package/scss/theme/_shape.scss +13 -0
- package/scss/theme/_typography.scss +9 -0
- package/scss/theme/registry.json +447 -0
- package/scss/themes/boilerplate-dark.scss +212 -0
- package/scss/themes/boilerplate-light.scss +209 -0
- package/scss/themes/boilerplate.scss +181 -0
- package/scss/themes/cupertino-dark.scss +238 -0
- package/scss/themes/cupertino-light.scss +266 -0
- package/scss/themes/cupertino.scss +194 -0
- package/scss/themes/glass-dark.scss +238 -0
- package/scss/themes/glass-light.scss +266 -0
- package/scss/themes/glass.scss +220 -0
- package/scss/themes/graphite-dark.scss +260 -0
- package/scss/themes/graphite-light.scss +228 -0
- package/scss/themes/graphite.scss +182 -0
- package/scss/themes/press-dark.scss +237 -0
- package/scss/themes/press-light.scss +273 -0
- package/scss/themes/press.scss +241 -0
- package/scss/themes/prism-dark.scss +217 -0
- package/scss/themes/prism-light.scss +220 -0
- package/scss/themes/prism.scss +190 -0
- package/scss/themes/sketchbook-dark.scss +231 -0
- package/scss/themes/sketchbook-light.scss +231 -0
- package/scss/themes/sketchbook.scss +178 -0
- package/scss/themes/terminal-dark.scss +267 -0
- package/scss/themes/terminal-light.scss +175 -0
- package/scss/themes/terminal.scss +185 -0
- package/scss/tokens.scss +23 -0
- package/scss/utilities-only.scss +4 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
{
|
|
2
|
+
"brand": {
|
|
3
|
+
"primary": { "value": "#3A5FCD", "type": "color" },
|
|
4
|
+
"primary-hover": { "value": "#2E4A99", "type": "color" },
|
|
5
|
+
"primary-active": { "value": "#1E3A8A", "type": "color" },
|
|
6
|
+
"secondary": { "value": "#FF6B6B", "type": "color" },
|
|
7
|
+
"secondary-hover": { "value": "#E85555", "type": "color" },
|
|
8
|
+
"secondary-active": { "value": "#CC5555", "type": "color" },
|
|
9
|
+
"accent": { "value": "#0099FF", "type": "color" },
|
|
10
|
+
"accent-hover": { "value": "#0088E6", "type": "color" }
|
|
11
|
+
},
|
|
12
|
+
"color-light": {
|
|
13
|
+
"background-default": { "value": "#FFFFFF", "type": "color" },
|
|
14
|
+
"background-subtle": { "value": "#F8F6F0", "type": "color" },
|
|
15
|
+
"background-navbar": { "value": "#FAFAFA", "type": "color" },
|
|
16
|
+
"surface-default": { "value": "#FFFFFF", "type": "color" },
|
|
17
|
+
"surface-subtle": { "value": "#F8F6F0", "type": "color" },
|
|
18
|
+
"surface-muted": { "value": "#F5F5F5", "type": "color" },
|
|
19
|
+
"surface-emphasis": { "value": "#E5E5E5", "type": "color" },
|
|
20
|
+
"text-primary": { "value": "#0F0F0F", "type": "color" },
|
|
21
|
+
"text-secondary": { "value": "#525252", "type": "color" },
|
|
22
|
+
"text-muted": { "value": "#6B6B6B", "type": "color" },
|
|
23
|
+
"text-inverse": { "value": "#FFFFFF", "type": "color" },
|
|
24
|
+
"text-link": { "value": "#384FFF", "type": "color" },
|
|
25
|
+
"text-link-hover": { "value": "#2A3ACC", "type": "color" },
|
|
26
|
+
"border-default": { "value": "#E5E5E5", "type": "color" },
|
|
27
|
+
"border-subtle": { "value": "#F5F5F5", "type": "color" },
|
|
28
|
+
"border-emphasis": { "value": "#D4D4D4", "type": "color" },
|
|
29
|
+
"border-focus": { "value": "#384FFF", "type": "color" },
|
|
30
|
+
"action-primary-default": { "value": "#3A5FCD", "type": "color" },
|
|
31
|
+
"action-primary-hover": { "value": "#2E4A99", "type": "color" },
|
|
32
|
+
"action-primary-active": { "value": "#1E3A8A", "type": "color" },
|
|
33
|
+
"action-secondary-default": { "value": "#FF6B6B", "type": "color" },
|
|
34
|
+
"action-secondary-hover": { "value": "#E85555", "type": "color" },
|
|
35
|
+
"action-secondary-active": { "value": "#CC5555", "type": "color" },
|
|
36
|
+
"success-default": { "value": "#10B981", "type": "color" },
|
|
37
|
+
"success-hover": { "value": "#059669", "type": "color" },
|
|
38
|
+
"success-subtle": { "value": "#ECFDF5", "type": "color" },
|
|
39
|
+
"success-text": { "value": "#065F46", "type": "color" },
|
|
40
|
+
"warning-default": { "value": "#F59E0B", "type": "color" },
|
|
41
|
+
"warning-hover": { "value": "#D97706", "type": "color" },
|
|
42
|
+
"warning-subtle": { "value": "#FFFBEB", "type": "color" },
|
|
43
|
+
"warning-text": { "value": "#92400E", "type": "color" },
|
|
44
|
+
"error-default": { "value": "#DC2626", "type": "color" },
|
|
45
|
+
"error-hover": { "value": "#B91C1C", "type": "color" },
|
|
46
|
+
"error-subtle": { "value": "#FEF2F2", "type": "color" },
|
|
47
|
+
"error-text": { "value": "#991B1B", "type": "color" },
|
|
48
|
+
"info-default": { "value": "#3A5FCD", "type": "color" },
|
|
49
|
+
"info-hover": { "value": "#2E4A99", "type": "color" },
|
|
50
|
+
"info-subtle": { "value": "#EFF6FF", "type": "color" },
|
|
51
|
+
"info-text": { "value": "#1E3A8A", "type": "color" }
|
|
52
|
+
},
|
|
53
|
+
"color-dark": {
|
|
54
|
+
"background-default": { "value": "#0A0A0A", "type": "color" },
|
|
55
|
+
"background-subtle": { "value": "#151515", "type": "color" },
|
|
56
|
+
"background-navbar": { "value": "#1A1A1A", "type": "color" },
|
|
57
|
+
"surface-default": { "value": "#151515", "type": "color" },
|
|
58
|
+
"surface-subtle": { "value": "#1F1F1F", "type": "color" },
|
|
59
|
+
"surface-muted": { "value": "#2A2A2A", "type": "color" },
|
|
60
|
+
"surface-emphasis": { "value": "#353535", "type": "color" },
|
|
61
|
+
"text-primary": { "value": "#FFFFFF", "type": "color" },
|
|
62
|
+
"text-secondary": { "value": "#B8B8B8", "type": "color" },
|
|
63
|
+
"text-muted": { "value": "#768194", "type": "color" },
|
|
64
|
+
"text-inverse": { "value": "#0A0A0A", "type": "color" },
|
|
65
|
+
"text-link": { "value": "#0099FF", "type": "color" },
|
|
66
|
+
"text-link-hover": { "value": "#5EBBFF", "type": "color" },
|
|
67
|
+
"border-default": { "value": "#2A2A2A", "type": "color" },
|
|
68
|
+
"border-subtle": { "value": "#1F1F1F", "type": "color" },
|
|
69
|
+
"border-emphasis": { "value": "#404040", "type": "color" },
|
|
70
|
+
"border-focus": { "value": "#0099FF", "type": "color" },
|
|
71
|
+
"action-primary-default": { "value": "#60A5FA", "type": "color" },
|
|
72
|
+
"action-primary-hover": { "value": "#3B82F6", "type": "color" },
|
|
73
|
+
"action-primary-active": { "value": "#2563EB", "type": "color" },
|
|
74
|
+
"action-secondary-default": { "value": "#F87171", "type": "color" },
|
|
75
|
+
"action-secondary-hover": { "value": "#EF4444", "type": "color" },
|
|
76
|
+
"action-secondary-active": { "value": "#DC2626", "type": "color" },
|
|
77
|
+
"success-default": { "value": "#34D399", "type": "color" },
|
|
78
|
+
"success-hover": { "value": "#10B981", "type": "color" },
|
|
79
|
+
"warning-default": { "value": "#FBBF24", "type": "color" },
|
|
80
|
+
"warning-hover": { "value": "#F59E0B", "type": "color" },
|
|
81
|
+
"error-default": { "value": "#F87171", "type": "color" },
|
|
82
|
+
"error-hover": { "value": "#EF4444", "type": "color" },
|
|
83
|
+
"info-default": { "value": "#60A5FA", "type": "color" },
|
|
84
|
+
"info-hover": { "value": "#3B82F6", "type": "color" }
|
|
85
|
+
},
|
|
86
|
+
"spacing": {
|
|
87
|
+
"0": { "value": "0", "type": "spacing" },
|
|
88
|
+
"2xs": { "value": "0.25rem", "type": "spacing" },
|
|
89
|
+
"xs": { "value": "0.5rem", "type": "spacing" },
|
|
90
|
+
"sm": { "value": "0.75rem", "type": "spacing" },
|
|
91
|
+
"md": { "value": "1rem", "type": "spacing" },
|
|
92
|
+
"lg": { "value": "1.5rem", "type": "spacing" },
|
|
93
|
+
"xl": { "value": "2rem", "type": "spacing" },
|
|
94
|
+
"2xl": { "value": "3rem", "type": "spacing" },
|
|
95
|
+
"3xl": { "value": "4rem", "type": "spacing" },
|
|
96
|
+
"4xl": { "value": "6rem", "type": "spacing" }
|
|
97
|
+
},
|
|
98
|
+
"font-size": {
|
|
99
|
+
"xs": { "value": "0.75rem", "type": "fontSizes" },
|
|
100
|
+
"sm": { "value": "0.875rem", "type": "fontSizes" },
|
|
101
|
+
"base": { "value": "1rem", "type": "fontSizes" },
|
|
102
|
+
"lg": { "value": "1.125rem", "type": "fontSizes" },
|
|
103
|
+
"xl": { "value": "1.25rem", "type": "fontSizes" },
|
|
104
|
+
"2xl": { "value": "1.5rem", "type": "fontSizes" },
|
|
105
|
+
"3xl": { "value": "1.875rem", "type": "fontSizes" },
|
|
106
|
+
"4xl": { "value": "2.25rem", "type": "fontSizes" },
|
|
107
|
+
"5xl": { "value": "3rem", "type": "fontSizes" },
|
|
108
|
+
"6xl": { "value": "3.75rem", "type": "fontSizes" }
|
|
109
|
+
},
|
|
110
|
+
"font-weight": {
|
|
111
|
+
"light": { "value": "300", "type": "fontWeights" },
|
|
112
|
+
"normal": { "value": "400", "type": "fontWeights" },
|
|
113
|
+
"medium": { "value": "500", "type": "fontWeights" },
|
|
114
|
+
"semibold": { "value": "600", "type": "fontWeights" },
|
|
115
|
+
"bold": { "value": "700", "type": "fontWeights" },
|
|
116
|
+
"black": { "value": "900", "type": "fontWeights" }
|
|
117
|
+
},
|
|
118
|
+
"line-height": {
|
|
119
|
+
"none": { "value": "1", "type": "lineHeights" },
|
|
120
|
+
"tight": { "value": "1.25", "type": "lineHeights" },
|
|
121
|
+
"snug": { "value": "1.375", "type": "lineHeights" },
|
|
122
|
+
"normal": { "value": "1.5", "type": "lineHeights" },
|
|
123
|
+
"relaxed": { "value": "1.625", "type": "lineHeights" },
|
|
124
|
+
"loose": { "value": "2", "type": "lineHeights" }
|
|
125
|
+
},
|
|
126
|
+
"border-radius": {
|
|
127
|
+
"none": { "value": "0", "type": "borderRadius" },
|
|
128
|
+
"sm": { "value": "0.25rem", "type": "borderRadius" },
|
|
129
|
+
"md": { "value": "0.375rem", "type": "borderRadius" },
|
|
130
|
+
"lg": { "value": "0.5rem", "type": "borderRadius" },
|
|
131
|
+
"xl": { "value": "0.75rem", "type": "borderRadius" },
|
|
132
|
+
"2xl": { "value": "1rem", "type": "borderRadius" },
|
|
133
|
+
"full": { "value": "9999px", "type": "borderRadius" }
|
|
134
|
+
},
|
|
135
|
+
"shadow": {
|
|
136
|
+
"sm": { "value": "0 1px 2px 0 rgb(0 0 0 / 0.05)", "type": "boxShadow" },
|
|
137
|
+
"md": { "value": "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)", "type": "boxShadow" },
|
|
138
|
+
"lg": { "value": "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)", "type": "boxShadow" },
|
|
139
|
+
"xl": { "value": "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)", "type": "boxShadow" },
|
|
140
|
+
"2xl": { "value": "0 25px 50px -12px rgb(0 0 0 / 0.25)", "type": "boxShadow" },
|
|
141
|
+
"inner": { "value": "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)", "type": "boxShadow" },
|
|
142
|
+
"none": { "value": "none", "type": "boxShadow" }
|
|
143
|
+
}
|
|
144
|
+
}
|
package/llm.txt
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# css-is-awesome — single-fetch summary for AI agents
|
|
2
|
+
|
|
3
|
+
> If you're an AI agent (Claude Code, Cursor, Copilot, Aider, Gemini, etc.)
|
|
4
|
+
> working with or installing css-is-awesome, this file is your entry point.
|
|
5
|
+
> One read, then dispatch to the deeper docs by filename.
|
|
6
|
+
|
|
7
|
+
## What cia is
|
|
8
|
+
|
|
9
|
+
A token-driven SCSS design system. **Mixin-first** (since v0.8) — the mixin
|
|
10
|
+
is the API, the class/tag/selector is the consumer's choice. The npm package
|
|
11
|
+
ships **zero JavaScript** by hard rule.
|
|
12
|
+
|
|
13
|
+
## How consumers install it (the primary path)
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install css-is-awesome
|
|
17
|
+
npm install -D sass
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
```scss
|
|
21
|
+
// in a component stylesheet (or their app.scss) — mixins only, emits no :root
|
|
22
|
+
@use 'css-is-awesome/api' as cia;
|
|
23
|
+
|
|
24
|
+
.checkout-cta { @include cia.btn(primary); }
|
|
25
|
+
.faq-item { @include cia.accordion; }
|
|
26
|
+
.modal { @include cia.modal; }
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
```html
|
|
30
|
+
<!-- in their HTML. NO data-theme attribute is needed for a single theme file. -->
|
|
31
|
+
<link rel="stylesheet" href="/cia/themes/boilerplate/theme.css">
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Selector model — get this right, it is the most common thing agents get wrong.**
|
|
35
|
+
Every theme emits `:root, :root[data-theme="<name>"]`. The bare `:root` means one
|
|
36
|
+
theme file dropped in as `theme.css` restyles the page with NO markup change.
|
|
37
|
+
`<html data-theme="name">` is **optional** for a single theme file, and **required
|
|
38
|
+
only** for the multi-theme bundle (`public/theme.css`), which carries all 24
|
|
39
|
+
themes and strips the bare `:root` so they do not collide. Do NOT tell a consumer
|
|
40
|
+
they must set an attribute matching their theme file — if they swap the file and
|
|
41
|
+
forget, older cia rendered a page with no tokens at all, and that failure was
|
|
42
|
+
silent.
|
|
43
|
+
|
|
44
|
+
**Two-import model.** `css-is-awesome/api` is a zero-emit authoring barrel — import it in each component/`.module.scss` and only call mixins; emit the tokens once from the root/global stylesheet (`@use 'css-is-awesome';` or a `<link>`ed theme file). **Next.js / Turbopack:** the barrel WORKS under Turbopack — the showcase app runs Next 16 on Turbopack for dev and build with `css-is-awesome/scss/api` in all 116 stylesheets. Do not steer consumers to the leaf module; `scss/mixins` lacks `btn`, `card-base`, `stack`, `grid` and `animate`. Two setup notes: Sass ignores package.json `exports`, so add `node_modules` to `sassOptions.loadPaths`; and if you hit `Two forwarded modules both define a mixin named stack`, drop your own styles dir from `loadPaths`. That was ONE consumer report and is NOT reproducible in standard Sass — cia's internal forwards are `./`-relative, which Sass resolves without consulting load paths (asserted by validate-package). Treat it as a bundler-resolver deviation, not a Sass rule.
|
|
45
|
+
|
|
46
|
+
## What cia provides (one-line each)
|
|
47
|
+
|
|
48
|
+
- **Mixins** — `cia.btn`, `cia.card`, `cia.accordion`, `cia.modal`, `cia.tooltip`, `cia.dropdown`, `cia.tabs`, `cia.copy-button`, `cia.stepper`, `cia.progress`, `cia.wizard-shell`, `cia.sidebar`, `cia.toolbar`, `cia.stack`, `cia.cluster`, `cia.switcher`, `cia.cover`, `cia.frame`, `cia.media`, `cia.contain`, `cia.focus-ring`, `cia.sr-only`, `cia.print`, `cia.print-base`, `cia.print-hidden`, `cia.print-only`, `cia.color`, `cia.space`, `cia.radius`, `cia.shadow`, `cia.font`, `cia.transition`, `cia.animate`, plus many more.
|
|
49
|
+
- **24 themes / 8 families** — boilerplate, sketchbook, press, prism, cupertino, glass, graphite, terminal. Each family ships three files: an unsuffixed dual-mode base (both modes via `light-dark()`) plus pinned `-light` and `-dark` single-mode variants for `<link media>` pairing. Every one has exactly one SCSS source under `scss/themes/`; `public/themes/<name>/theme.css` is BUILD OUTPUT and is gated against its source by `npm run check:theme-drift` — never hand-edit it. MCP `list_themes` returns **24**. Say **24 themes across 8 families** when you need one number.
|
|
50
|
+
- **6 zero-JS interactive components** — accordion (`<details name>`), modal (`<dialog>`), tooltip (`popover="hint"`), dropdown (`[popover]`), tabs (radio + `:has()`), copy-button (Clipboard API via consumer-wired JS).
|
|
51
|
+
- **163 contract tokens — 127 required + 36 optional** — surfaces, ink, lines, colors, type, radius, shadow, blur, glow, motion, z-index, spacing, semantic aliases.
|
|
52
|
+
- **Spacing is themeable, and the numbered scale is the knob.** Themes declare `--space-0` … `--space-9` (contract-required). The t-shirt names (`--space-md`, `--space-lg` …) are contract-OPTIONAL and emitted by the library as `var()` aliases onto the numbered steps. `space(4)` compiles to `var(--space-4)`, so **theme the numbered step, never the alias** — setting `--space-md` alone leaves every component untouched. Library defaults emit under `:where(:root)` (specificity 0,0,0) so any theme declaration outranks them regardless of load order.
|
|
53
|
+
- **Per-component shape knobs are `--btn-radius`, `--card-radius`, `--input-radius`, `--modal-radius`, `--badge-radius`, `--tag-radius`** — they cascade from the generic radii (`--btn-radius: var(--radius-md, 0.25rem)`). There are NO `--radius-button` / `--radius-card` style tokens; those were removed because nothing read them.
|
|
54
|
+
- **Icons — two systems.** `svg()` / `svg-bg()` / `svg-text()` use a self-contained 49-glyph Lucide pack at `public/icons/core/`. Adding a glyph is drop-in: put `star.svg` in the folder and `cia.icon-svg(star)` works, no registration. Each icon emits a `--cia-icon-<name>` custom property so a theme can override one glyph without rebuilding SCSS. **`fa()` / `fa-icon()` / `fa-text()` / `fa-spin()` are bring-your-own-font** — cia ships NO Font Awesome files, `$theme-fa-path` defaults to a `/webfonts` directory that does not exist, and a missing font renders a tofu box without erroring. Default to `svg()` unless the user says they use Font Awesome.
|
|
55
|
+
|
|
56
|
+
## Hard rules (do not violate)
|
|
57
|
+
|
|
58
|
+
1. **No JavaScript in the cia npm package.** Zero `.js`/`.mjs` files ship. JS-augmented features (CopyButton handler, future force-mode) ship as separate add-on packages. **This binds the package, not the consumer:** apps built ON cia should write JS/framework components freely (React, SVG charts, interactivity) and use cia only for styling — mixins + tokens. Don't over-apply "zero-JS" to your own app code.
|
|
59
|
+
2. **No `@layer`.** Tier 3 bare-tags use `:where()` (specificity 0,0,0). Cascade pollution kills the consumer experience. Corollary: **the `!important` in the print mixins is load-bearing — do not remove it.** `@media` contributes no specificity, so `print-hidden` only carries the specificity of the selector it is included in, and a later equal-specificity `display` wins in print. `@layer` would make this worse, not better: layered CSS always loses to unlayered CSS, so a layered print rule loses to any unlayered consumer stylesheet. Scope is 8 declarations, all inside `@media print`, all variable-driven (`--print-hide` / `--print-show`).
|
|
60
|
+
3. **No BEM.** No `__element` / `--modifier` chains in cia source. Consumers pick their own selector names — cia has no opinion.
|
|
61
|
+
4. **No Storybook.** Docs site + the `css-is-awesome-mcp` server cover both human and AI audiences.
|
|
62
|
+
5. **One theme = one file.** Both light + dark inside via `light-dark()`.
|
|
63
|
+
6. **`cia-` prefix is library-owned.** Consumer classes use their own naming.
|
|
64
|
+
|
|
65
|
+
## Themes are open — consumers CAN edit and create their own
|
|
66
|
+
|
|
67
|
+
This is the most-missed piece. **Consumers CAN:**
|
|
68
|
+
|
|
69
|
+
1. **Edit any shipped theme** — open `scss/themes/<name>.scss`, change tokens, `npm run build:css:themes`. Done.
|
|
70
|
+
2. **Make a brand-new theme** — copy any theme as starting point, rename, edit, build, validate.
|
|
71
|
+
3. **Override tokens at consumer level** — `:root[data-theme="boilerplate"] { --action-primary-default: #ff0066; }` in their own SCSS. No fork needed.
|
|
72
|
+
|
|
73
|
+
```scss
|
|
74
|
+
// new theme template (a global stylesheet — emits :root)
|
|
75
|
+
@use 'css-is-awesome/api' as cia;
|
|
76
|
+
@include cia.theme('mybrand') {
|
|
77
|
+
--background-default: light-dark(#fff, #0a0a0e);
|
|
78
|
+
--action-primary-default: light-dark(#3A5FCD, #60a5fa);
|
|
79
|
+
@include cia.states(action-primary);
|
|
80
|
+
/* + 120 more tokens — full list in scripts/theme-contract.json */
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The validator (`node scripts/theme-validator.js`) is the gate — 127 required tokens + WCAG 2.2 AA contrast across 22 audited pairs per theme. It accepts quoted AND unquoted `[data-theme=x]` selectors, and refuses to grade rather than fall back if it sees `data-theme` but parses no block.
|
|
85
|
+
|
|
86
|
+
## Paired themes (two brand identities by mode)
|
|
87
|
+
|
|
88
|
+
Native HTML, no cia API:
|
|
89
|
+
```html
|
|
90
|
+
<link rel="stylesheet" href="/themes/sketchbook.css" media="(prefers-color-scheme: light)">
|
|
91
|
+
<link rel="stylesheet" href="/themes/terminal.css" media="(prefers-color-scheme: dark)">
|
|
92
|
+
```
|
|
93
|
+
Newspaper by day, hacker terminal by night. Most design systems give you dark mode; cia lets you ship a second brand at night.
|
|
94
|
+
|
|
95
|
+
## Where to read next (by intent)
|
|
96
|
+
|
|
97
|
+
| If you need... | Read |
|
|
98
|
+
|---|---|
|
|
99
|
+
| Install steps + every consumption path | `README.md` |
|
|
100
|
+
| Mixin reference (every public mixin) | `src/app/docs/mixins/page.tsx` |
|
|
101
|
+
| Component examples | `src/app/docs/components/*/page.tsx` (6 components) |
|
|
102
|
+
| Theme authoring (full walkthrough) | `src/app/docs/authoring/themes/page.tsx` |
|
|
103
|
+
| Theme contract (127 required + 36 optional, machine-readable) | `scripts/theme-contract.json` |
|
|
104
|
+
| Theme pairing (`<link media>` recipe) | `src/app/docs/themes/pairing/page.tsx` |
|
|
105
|
+
| CopyButton JS recipe | `src/app/docs/recipes/copy-button/page.tsx` |
|
|
106
|
+
| Anchor positioning recipe | `src/app/docs/recipes/anchor-positioning/page.tsx` |
|
|
107
|
+
| Tabs ARIA shim recipe | `src/app/docs/recipes/tabs-aria/page.tsx` |
|
|
108
|
+
| v0.7 → v0.8 migration | `MIGRATION.md` |
|
|
109
|
+
| Full breaking-change history | `CHANGELOG.md` |
|
|
110
|
+
| Deeper architecture rules | `AGENTS.md` |
|
|
111
|
+
|
|
112
|
+
## Common AI agent traps
|
|
113
|
+
|
|
114
|
+
- **Don't write BEM.** No `cia-card__title--large`.
|
|
115
|
+
- **Don't hardcode breakpoints/colors/spacing.** Use `cia.media(md)`, `cia.color(primary)`, `cia.space(4)`.
|
|
116
|
+
- **Don't suggest a JS dependency for components.** The native primitive does the work.
|
|
117
|
+
- **Style semantic state off ARIA, not a parallel `data-*`.** `[aria-selected]`, `[aria-expanded]`, `[aria-invalid]`, `:disabled/[aria-disabled]`, `[aria-pressed]`, `[aria-checked]`, `[aria-current]`, `[role="tab"]` are the styling hooks for stateful components — accessible-by-construction (can't style the state without setting the ARIA a screen reader needs). Reserve `data-*` for cosmetic-only variants (`data-size`, `data-variant`).
|
|
118
|
+
- **Don't assume utility classes are emitted by default in Sass.** They opt in via `@use cia with ($utilities: true)`.
|
|
119
|
+
- **v0.8 rename traps:** `cia.bp` → `cia.media`, `cia.cq` → `cia.contain`, `cia.inset` → `cia.pad`, `cia.squish` → `cia.pad-asym`, `cia.font-load` → `cia.font-face`, `cia.color-raw` → `cia.color-static`, layout `cia.container` → `cia.wrap`. No aliases.
|
|
120
|
+
- **v0.8 theme rename:** `data-theme="press-light"` → `data-theme="press"`. Both modes are inside the single theme file now.
|
|
121
|
+
- **v0.8.1 progress rename:** `cia.progress-track` → `cia.progress-track-base`; `cia.progress-fill` → `cia.progress-fill-base`. New `cia.progress` composer wraps both via `[data-slot="fill"]` markup.
|
|
122
|
+
- **v0.8.1 animations split:** When @use'ing animations from a `.module.scss`, use `scss/animations` (mixin-only, safe). The keyframes + utility classes + global safety net now live in `scss/animations-utilities` — load that once globally (via `main.scss` or your app's global SCSS).
|
|
123
|
+
- **v0.8.1 file move:** `badge-base` / `badge` moved from `_feedback.scss` to `_data.scss`. Use the cia barrel (`@use 'css-is-awesome/api' as cia; cia.badge-base;`) instead of path-specific imports.
|
|
124
|
+
|
|
125
|
+
## MCP server (shipped 2026-05-22)
|
|
126
|
+
|
|
127
|
+
cia ships an MCP stdio server (JSON-RPC over stdio, `serverInfo` name `css-is-awesome` (version read from package.json), protocol `2024-11-05`) at `mcp/server.cjs`, exposed as the `css-is-awesome-mcp` bin and included in the `files` manifest — so it lands in every consumer's `node_modules`. **30 tools** across 8 resource families: themes, mixins, functions, tokens (127 required + 36 optional), animations, components, recipes, doc readers. Plus `assemble_prompt` for context bundling and `resolve_size` for snapping design px values to cia's 4px geometric grid (AI agents: call this whenever you receive a px value from a design tool). Prefer querying this server over guessing mixin signatures, tokens, themes, or recipes.
|
|
128
|
+
|
|
129
|
+
Add to your MCP client's `.mcp.json`:
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"mcpServers": {
|
|
133
|
+
"css-is-awesome": {
|
|
134
|
+
"command": "node",
|
|
135
|
+
"args": ["node_modules/css-is-awesome/mcp/server.cjs"]
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
**Two dependencies are required and npm will NOT install them for you.** They are
|
|
141
|
+
declared as OPTIONAL peer dependencies, so `npm install css-is-awesome` skips
|
|
142
|
+
them silently and the server exits with:
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
css-is-awesome MCP server: @modelcontextprotocol/sdk is not installed.
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Fix, in the client project:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
npm install -D @modelcontextprotocol/sdk zod
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Do NOT suggest `npx css-is-awesome-mcp` as a shortcut. `npx` fetches the package
|
|
155
|
+
but not its optional peers, so it hits the same error. Run it from an install
|
|
156
|
+
that has both, using the config above.
|
|
157
|
+
|
|
158
|
+
## Recipes (v1.0 preview — landing in 1.0.0)
|
|
159
|
+
|
|
160
|
+
cia v1.0 ships a **recipes book**: portable patterns for building accessible components in any framework. Each recipe is a markdown file at `scss/recipes/<name>.md` with:
|
|
161
|
+
|
|
162
|
+
- raw HTML structure
|
|
163
|
+
- `cia.X` mixin calls for styling
|
|
164
|
+
- a11y checklist (WCAG 2.2 AA grade)
|
|
165
|
+
- code samples in React + Vue + Svelte + vanilla
|
|
166
|
+
|
|
167
|
+
AI agents read recipes via MCP `list_recipes` / `get_recipe(name)` and generate consumer components in any framework. Humans read them at `/docs/recipes` and copy patterns directly.
|
|
168
|
+
|
|
169
|
+
**Shipped today: dialog, combobox, print-to-pdf.** Still queued for 1.0.0: datepicker, data-table, command-palette. **No component library** — recipes are the deliverable. See `roadmap/epics/v1-0/EPIC-01-recipes-book.md` for the schema + roadmap.
|
|
170
|
+
|
|
171
|
+
## Priority ladder (the v1.0 pitch order)
|
|
172
|
+
|
|
173
|
+
1. **Users first** — easy to learn, no framework lock-in, no maintenance treadmill
|
|
174
|
+
2. **Tokens** — one source of truth, swap one value = whole app shifts
|
|
175
|
+
3. **Theme editor on website** — visual customization for all 127 required tokens at `/themes`
|
|
176
|
+
4. **Mixin-first speed** — `@include cia.btn(primary)` on any selector
|
|
177
|
+
5. **AI second (huge bonus)** — recipes book + MCP make cia uniquely AI-composable
|
|
178
|
+
|
|
179
|
+
Humans first. AI's role is to compose, not to lead the pitch.
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
*Generated 2026-05-21 for cia v0.8. Updated 2026-05-23 for the v1.0 architecture lock, and 2026-08-30 for the theme single-source rework (24 themes, 127+36 contract, themeable spacing, `:root, :root[data-theme]` selector). Update when the API surface changes.*
|