@semanticus/semanticus-css 0.7.0 → 0.9.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/README.md +8 -10
- package/dist/semanticus-semantics.css +11 -1
- package/dist/semanticus.css +13 -1
- package/dist/semanticus.palette.amber.css +1 -1
- package/dist/semanticus.palette.blue.css +1 -1
- package/dist/semanticus.palette.cyan.css +1 -1
- package/dist/semanticus.palette.fuchsia.css +1 -1
- package/dist/semanticus.palette.green.css +1 -1
- package/dist/semanticus.palette.grey.css +1 -1
- package/dist/semanticus.palette.indigo.css +1 -1
- package/dist/semanticus.palette.jade.css +1 -1
- package/dist/semanticus.palette.lime.css +1 -1
- package/dist/semanticus.palette.orange.css +1 -1
- package/dist/semanticus.palette.pink.css +1 -1
- package/dist/semanticus.palette.pumpkin.css +1 -1
- package/dist/semanticus.palette.purple.css +1 -1
- package/dist/semanticus.palette.red.css +1 -1
- package/dist/semanticus.palette.sand.css +1 -1
- package/dist/semanticus.palette.slate.css +1 -1
- package/dist/semanticus.palette.violet.css +1 -1
- package/dist/semanticus.palette.yellow.css +1 -1
- package/dist/semanticus.palette.zinc.css +1 -1
- package/dist/semanticus.size.pico.css +1 -0
- package/package.json +13 -14
- package/src/index.css +11 -4
- package/src/palettes/amber.css +3 -3
- package/src/palettes/blue.css +3 -3
- package/src/palettes/cyan.css +3 -3
- package/src/palettes/fuchsia.css +3 -3
- package/src/palettes/green.css +3 -3
- package/src/palettes/grey.css +3 -3
- package/src/palettes/indigo.css +3 -3
- package/src/palettes/jade.css +3 -3
- package/src/palettes/lime.css +3 -3
- package/src/palettes/orange.css +3 -3
- package/src/palettes/pink.css +3 -3
- package/src/palettes/pumpkin.css +3 -3
- package/src/palettes/purple.css +3 -3
- package/src/palettes/red.css +3 -3
- package/src/palettes/sand.css +3 -3
- package/src/palettes/slate.css +3 -3
- package/src/palettes/violet.css +3 -3
- package/src/palettes/yellow.css +3 -3
- package/src/palettes/zinc.css +3 -3
- package/src/semantics/_misc.css +3 -0
- package/src/semantics/attributes/_popover.css +13 -0
- package/src/semantics/attributes/_role-group-search.css +140 -0
- package/src/semantics/elements/_abbr.css +5 -0
- package/src/semantics/elements/_address.css +7 -0
- package/src/semantics/elements/_article.css +6 -0
- package/src/semantics/{_aside.css → elements/_aside.css} +3 -3
- package/src/semantics/elements/_blockquote.css +18 -0
- package/src/semantics/{_button.css → elements/_button.css} +2 -2
- package/src/semantics/{_code.css → elements/_code.css} +10 -7
- package/src/semantics/elements/_del.css +3 -0
- package/src/semantics/{_details.css → elements/_details.css} +10 -10
- package/src/semantics/elements/_dialog.css +117 -0
- package/src/semantics/elements/_footer.css +13 -0
- package/src/semantics/elements/_header.css +13 -0
- package/src/semantics/elements/_headings.css +34 -0
- package/src/semantics/elements/_hgroup.css +14 -0
- package/src/semantics/{_hr.css → elements/_hr.css} +1 -1
- package/src/semantics/{_input.css → elements/_input.css} +3 -4
- package/src/semantics/elements/_ins.css +4 -0
- package/src/semantics/{_links.css → elements/_links.css} +11 -4
- package/src/semantics/elements/_lists.css +22 -0
- package/src/semantics/elements/_main.css +7 -0
- package/src/semantics/elements/_mark.css +6 -0
- package/src/semantics/{_nav.css → elements/_nav.css} +4 -4
- package/src/semantics/elements/_p.css +11 -0
- package/src/semantics/{_progress.css → elements/_progress.css} +1 -1
- package/src/semantics/elements/_section.css +7 -0
- package/src/semantics/elements/_strong.css +4 -0
- package/src/semantics/elements/_sub.css +7 -0
- package/src/semantics/elements/_sup.css +7 -0
- package/src/semantics/{_table.css → elements/_table.css} +7 -2
- package/src/semantics/index.css +9 -4
- package/src/semantics/modules.css +47 -32
- package/src/sizes/pico.css +100 -0
- package/src/utilities/_variables.css +19 -214
- package/src/utilities/borders/_border-radius.css +24 -0
- package/src/utilities/borders/_border-width.css +8 -0
- package/src/utilities/colors/_background-colors.css +51 -44
- package/src/utilities/colors/_border-colors.css +14 -14
- package/src/utilities/colors/_text-colors.css +80 -80
- package/src/utilities/effects/_shadows.css +10 -10
- package/src/utilities/layout/_flexbox.css +16 -1
- package/src/utilities/layout/_misc.css +2 -2
- package/src/utilities/modules.css +6 -0
- package/src/utilities/spacing/_gap.css +63 -0
- package/src/utilities/spacing/_margin.css +145 -0
- package/src/utilities/spacing/_padding.css +145 -0
- package/src/utilities/typography/_font-sizes.css +0 -15
- package/src/variables/_all.css +15 -739
- package/src/variables/_breakpoints.css +10 -0
- package/src/variables/_colors.css +355 -0
- package/src/variables/_components.css +330 -0
- package/src/variables/_elements.css +194 -0
- package/src/variables/_icons.css +55 -0
- package/src/variables/_layout.css +123 -0
- package/src/variants/_contrast.css +28 -14
- package/src/variants/_ghost.css +36 -29
- package/src/variants/_pane-panel-card.css +54 -0
- package/src/variants/_secondary.css +25 -12
- package/src/variants/_sidebar.css +49 -9
- package/src/variants/modules.css +4 -6
- package/dist/semanticus-utilities.css +0 -7
- package/dist/semanticus-variants.css +0 -1
- package/dist/semanticus.size.slim.css +0 -1
- package/src/semantics/_article.css +0 -12
- package/src/semantics/_dialog.css +0 -157
- package/src/semantics/_footer.css +0 -12
- package/src/semantics/_header.css +0 -12
- package/src/semantics/_main.css +0 -10
- package/src/semantics/_role-group-search.css +0 -129
- package/src/semantics/_section.css +0 -9
- package/src/semantics/_typography.css +0 -146
- package/src/sizes/slim.css +0 -41
- package/src/utilities/index.css +0 -14
- package/src/variables/_shared.css +0 -121
- package/src/variants/_card.css +0 -45
- package/src/variants/_flow.css +0 -15
- package/src/variants/_panel.css +0 -18
- package/src/variants/index.css +0 -9
- /package/src/semantics/{_aria-busy.css → attributes/_aria-busy.css} +0 -0
- /package/src/semantics/{_hidden.css → attributes/_hidden.css} +0 -0
- /package/src/semantics/{_role-toolbar.css → attributes/_role-toolbar.css} +0 -0
- /package/src/semantics/{_role-tooltip.css → attributes/_role-tooltip.css} +0 -0
- /package/src/semantics/{_body.css → elements/_body.css} +0 -0
- /package/src/semantics/{_document.css → elements/_document.css} +0 -0
- /package/src/semantics/{_embedded.css → elements/_embedded.css} +0 -0
- /package/src/semantics/{_figure.css → elements/_figure.css} +0 -0
- /package/src/semantics/{_type-checkbox-radio.css → elements/_type-checkbox-radio.css} +0 -0
- /package/src/semantics/{_type-color.css → elements/_type-color.css} +0 -0
- /package/src/semantics/{_type-date.css → elements/_type-date.css} +0 -0
- /package/src/semantics/{_type-file.css → elements/_type-file.css} +0 -0
- /package/src/semantics/{_type-range.css → elements/_type-range.css} +0 -0
- /package/src/semantics/{_type-search.css → elements/_type-search.css} +0 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Element-Scoped Variables
|
|
3
|
+
==========================================================================
|
|
4
|
+
|
|
5
|
+
These selectors override global :root variables on a per-element basis
|
|
6
|
+
so each component can have its own defaults (font-size, weight,
|
|
7
|
+
line-height, border-radius, etc.) without class-name bloat.
|
|
8
|
+
|
|
9
|
+
This enables semantic HTML elements to have appropriate styling
|
|
10
|
+
out of the box.
|
|
11
|
+
========================================================================== */
|
|
12
|
+
|
|
13
|
+
/* Links */
|
|
14
|
+
a {
|
|
15
|
+
--text-decoration: underline;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* Small text */
|
|
19
|
+
small {
|
|
20
|
+
--font-size: 0.875em;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* ==========================================================================
|
|
24
|
+
Heading Typography
|
|
25
|
+
========================================================================== */
|
|
26
|
+
|
|
27
|
+
h1,
|
|
28
|
+
h2,
|
|
29
|
+
h3,
|
|
30
|
+
h4,
|
|
31
|
+
h5,
|
|
32
|
+
h6 {
|
|
33
|
+
--font-weight: 700;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
h1 {
|
|
37
|
+
--font-size: var(--fs-1);
|
|
38
|
+
--line-height: 1.125;
|
|
39
|
+
--typography-headings-top: 3rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
h2 {
|
|
43
|
+
--font-size: var(--fs-2);
|
|
44
|
+
--line-height: 1.15;
|
|
45
|
+
--typography-headings-top: 2.625rem;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
h3 {
|
|
49
|
+
--font-size: var(--fs-3);
|
|
50
|
+
--line-height: 1.175;
|
|
51
|
+
--typography-headings-top: 2.25rem;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
h4 {
|
|
55
|
+
--font-size: var(--fs-4);
|
|
56
|
+
--line-height: 1.2;
|
|
57
|
+
--typography-headings-top: 1.874rem;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
h5 {
|
|
61
|
+
--font-size: var(--fs-5);
|
|
62
|
+
--line-height: 1.225;
|
|
63
|
+
--typography-headings-top: 1.6875rem;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
h6 {
|
|
67
|
+
--font-size: var(--fs-6);
|
|
68
|
+
--line-height: 1.25;
|
|
69
|
+
--typography-headings-top: 1.5rem;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* ==========================================================================
|
|
73
|
+
Table Elements
|
|
74
|
+
========================================================================== */
|
|
75
|
+
|
|
76
|
+
thead th,
|
|
77
|
+
thead td,
|
|
78
|
+
tfoot th,
|
|
79
|
+
tfoot td {
|
|
80
|
+
--font-weight: 600;
|
|
81
|
+
--border-width: 0.1875rem;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* ==========================================================================
|
|
85
|
+
Code Elements
|
|
86
|
+
========================================================================== */
|
|
87
|
+
|
|
88
|
+
pre,
|
|
89
|
+
code,
|
|
90
|
+
kbd,
|
|
91
|
+
samp {
|
|
92
|
+
--font-family: var(--font-family-monospace);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
kbd {
|
|
96
|
+
--font-weight: bolder;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* ==========================================================================
|
|
100
|
+
Form Elements
|
|
101
|
+
========================================================================== */
|
|
102
|
+
|
|
103
|
+
/* Text-style form inputs use a thinner outline */
|
|
104
|
+
input:not(
|
|
105
|
+
[type="submit"],
|
|
106
|
+
[type="button"],
|
|
107
|
+
[type="reset"],
|
|
108
|
+
[type="checkbox"],
|
|
109
|
+
[type="radio"],
|
|
110
|
+
[type="file"]
|
|
111
|
+
),
|
|
112
|
+
:where(select, textarea) {
|
|
113
|
+
--outline-width: 0.0625rem;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Search inputs are pill-shaped */
|
|
117
|
+
[type="search"] {
|
|
118
|
+
--border-radius: 5rem;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* Checkboxes & radios use a slightly thicker border */
|
|
122
|
+
[type="checkbox"],
|
|
123
|
+
[type="radio"] {
|
|
124
|
+
--border-width: 0.125rem;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* Toggle switches get an even thicker border */
|
|
128
|
+
[type="checkbox"][role="switch"] {
|
|
129
|
+
--border-width: 0.1875rem;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* Search role wrappers are pill-shaped */
|
|
133
|
+
[role="search"] {
|
|
134
|
+
--border-radius: 5rem;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* ==========================================================================
|
|
138
|
+
Button Group Focus Ring Overrides
|
|
139
|
+
========================================================================== */
|
|
140
|
+
|
|
141
|
+
/* Secondary button focus in groups */
|
|
142
|
+
[role="search"]:has(
|
|
143
|
+
button.secondary:focus,
|
|
144
|
+
[type="submit"].secondary:focus,
|
|
145
|
+
[type="button"].secondary:focus,
|
|
146
|
+
[role="button"].secondary:focus
|
|
147
|
+
),
|
|
148
|
+
[role="group"]:has(
|
|
149
|
+
button.secondary:focus,
|
|
150
|
+
[type="submit"].secondary:focus,
|
|
151
|
+
[type="button"].secondary:focus,
|
|
152
|
+
[role="button"].secondary:focus
|
|
153
|
+
) {
|
|
154
|
+
--group-shadow-focus-with-button: 0 0 0 var(--outline-width) var(--color-secondary-focus);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* Contrast button focus in groups */
|
|
158
|
+
[role="search"]:has(
|
|
159
|
+
button.contrast:focus,
|
|
160
|
+
[type="submit"].contrast:focus,
|
|
161
|
+
[type="button"].contrast:focus,
|
|
162
|
+
[role="button"].contrast:focus
|
|
163
|
+
),
|
|
164
|
+
[role="group"]:has(
|
|
165
|
+
button.contrast:focus,
|
|
166
|
+
[type="submit"].contrast:focus,
|
|
167
|
+
[type="button"].contrast:focus,
|
|
168
|
+
[role="button"].contrast:focus
|
|
169
|
+
) {
|
|
170
|
+
--group-shadow-focus-with-button: 0 0 0 var(--outline-width) var(--color-contrast-focus);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/* Buttons inside search/group combos get wider horizontal padding */
|
|
174
|
+
[role="search"] button,
|
|
175
|
+
[role="search"] [type="submit"],
|
|
176
|
+
[role="search"] [type="button"],
|
|
177
|
+
[role="search"] [role="button"],
|
|
178
|
+
[role="group"] button,
|
|
179
|
+
[role="group"] [type="submit"],
|
|
180
|
+
[role="group"] [type="button"],
|
|
181
|
+
[role="group"] [role="button"] {
|
|
182
|
+
--form-element-spacing-horizontal: 1rem;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/* ==========================================================================
|
|
186
|
+
Form Element Accent Color
|
|
187
|
+
========================================================================== */
|
|
188
|
+
|
|
189
|
+
/* Native browser accent-color for checkboxes, radios, and range sliders */
|
|
190
|
+
[type="checkbox"],
|
|
191
|
+
[type="radio"],
|
|
192
|
+
[type="range"] {
|
|
193
|
+
accent-color: rgb(var(--color-primary-rgb));
|
|
194
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Theme-Aware Icon Variables
|
|
3
|
+
==========================================================================
|
|
4
|
+
|
|
5
|
+
Validation icons that change color based on the current theme.
|
|
6
|
+
These are defined separately from base icons because they use
|
|
7
|
+
theme-specific colors (success/danger) for stroke values.
|
|
8
|
+
|
|
9
|
+
Base icons (checkbox, chevron, date, time, search, close, loading)
|
|
10
|
+
are defined in _layout.css as they use consistent colors across themes.
|
|
11
|
+
========================================================================== */
|
|
12
|
+
|
|
13
|
+
:root,
|
|
14
|
+
:host {
|
|
15
|
+
--icon-checkbox: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
|
|
16
|
+
--icon-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");
|
|
17
|
+
--icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
|
|
18
|
+
--icon-date: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
|
|
19
|
+
--icon-time: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
|
|
20
|
+
--icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
|
|
21
|
+
--icon-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
|
|
22
|
+
--icon-loading: url("data:image/svg+xml,%3Csvg fill='none' height='24' width='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E g %7B animation: rotate 2s linear infinite; transform-origin: center center; %7D circle %7B stroke-dasharray: 75,100; stroke-dashoffset: -5; animation: dash 1.5s ease-in-out infinite; stroke-linecap: round; %7D @keyframes rotate %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D @keyframes dash %7B 0%25 %7B stroke-dasharray: 1,100; stroke-dashoffset: 0; %7D 50%25 %7B stroke-dasharray: 44.5,100; stroke-dashoffset: -17.5; %7D 100%25 %7B stroke-dasharray: 44.5,100; stroke-dashoffset: -62; %7D %7D %3C/style%3E%3Cg%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='rgb(136, 145, 164)' stroke-width='4' /%3E%3C/g%3E%3C/svg%3E");
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* ==========================================================================
|
|
26
|
+
Light Theme Validation Icons
|
|
27
|
+
========================================================================== */
|
|
28
|
+
|
|
29
|
+
[data-theme="light"],
|
|
30
|
+
:root:not([data-theme="dark"]),
|
|
31
|
+
:host(:not([data-theme="dark"])) {
|
|
32
|
+
--icon-valid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(43, 122, 76)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
|
|
33
|
+
--icon-invalid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(197, 47, 33)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* ==========================================================================
|
|
37
|
+
Dark Theme Validation Icons (System Preference)
|
|
38
|
+
========================================================================== */
|
|
39
|
+
|
|
40
|
+
@media only screen and (prefers-color-scheme: dark) {
|
|
41
|
+
:root:not([data-theme]),
|
|
42
|
+
:host(:not([data-theme])) {
|
|
43
|
+
--icon-valid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(110, 213, 157)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
|
|
44
|
+
--icon-invalid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(243, 143, 121)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* ==========================================================================
|
|
49
|
+
Dark Theme Validation Icons (Explicit)
|
|
50
|
+
========================================================================== */
|
|
51
|
+
|
|
52
|
+
[data-theme="dark"] {
|
|
53
|
+
--icon-valid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(110, 213, 157)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
|
|
54
|
+
--icon-invalid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(243, 143, 121)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
|
|
55
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Layout & Typography Variables
|
|
3
|
+
==========================================================================
|
|
4
|
+
|
|
5
|
+
Global sizing, spacing, and typography variables. These define the
|
|
6
|
+
foundational rhythm of the design system.
|
|
7
|
+
|
|
8
|
+
Includes:
|
|
9
|
+
- Font families and typography scale
|
|
10
|
+
- Spacing units and component padding
|
|
11
|
+
- Border radius and border widths
|
|
12
|
+
- Responsive typography adjustments
|
|
13
|
+
========================================================================== */
|
|
14
|
+
|
|
15
|
+
:root,
|
|
16
|
+
:host {
|
|
17
|
+
/* Font Families */
|
|
18
|
+
--font-family-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
19
|
+
--font-family-sans-serif: system-ui, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, Helvetica, Arial, "Helvetica Neue", sans-serif, var(--font-family-emoji);
|
|
20
|
+
--font-family-monospace: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace, var(--font-family-emoji);
|
|
21
|
+
--font-family: var(--font-family-sans-serif);
|
|
22
|
+
|
|
23
|
+
/* Typography - base defaults */
|
|
24
|
+
--line-height: 1.5;
|
|
25
|
+
--font-weight: 400;
|
|
26
|
+
--font-size: 97%;
|
|
27
|
+
--text-underline-offset: 0.1rem;
|
|
28
|
+
|
|
29
|
+
/* Font Size Scale - semantic heading sizes (h1-h6) */
|
|
30
|
+
--fs-1: 2rem;
|
|
31
|
+
--fs-2: 1.75rem;
|
|
32
|
+
--fs-3: 1.5rem;
|
|
33
|
+
--fs-4: 1.25rem;
|
|
34
|
+
--fs-5: 1.125rem;
|
|
35
|
+
--fs-6: 1rem;
|
|
36
|
+
|
|
37
|
+
/* Borders & Effects */
|
|
38
|
+
--border-radius: 0.25rem;
|
|
39
|
+
--border-width: 0.0625rem;
|
|
40
|
+
--outline-width: 0.125rem;
|
|
41
|
+
--transition: 0.2s ease-in-out;
|
|
42
|
+
|
|
43
|
+
/* Spacing - shared base unit */
|
|
44
|
+
--base-spacing: 0.75rem;
|
|
45
|
+
--responsive-multiplier: 1;
|
|
46
|
+
--spacing: calc(var(--base-spacing) * var(--responsive-multiplier));
|
|
47
|
+
--typography-spacing-vertical: 1rem;
|
|
48
|
+
--grid-column-gap: var(--spacing);
|
|
49
|
+
--grid-row-gap: var(--spacing);
|
|
50
|
+
--form-element-spacing-vertical: 0.5rem;
|
|
51
|
+
--form-element-spacing-horizontal: 0.7rem;
|
|
52
|
+
|
|
53
|
+
/* Group Shadows */
|
|
54
|
+
--group-shadow: 0 0 0 rgba(0, 0, 0, 0);
|
|
55
|
+
--group-shadow-focus-with-button: 0 0 0 var(--outline-width) var(--color-primary-focus);
|
|
56
|
+
--group-shadow-focus-with-input: 0 0 0 0.0625rem var(--form-border-color);
|
|
57
|
+
|
|
58
|
+
/* Navigation */
|
|
59
|
+
--nav-link-spacing: calc(var(--spacing) * 0.5);
|
|
60
|
+
--nav-breadcrumb-divider: ">";
|
|
61
|
+
|
|
62
|
+
/* Sidebar */
|
|
63
|
+
--sidebar-width: 25%;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* ==========================================================================
|
|
67
|
+
Responsive Typography & Layout Adjustments
|
|
68
|
+
========================================================================== */
|
|
69
|
+
|
|
70
|
+
@media (--breakpoint-sm) {
|
|
71
|
+
:root,
|
|
72
|
+
:host {
|
|
73
|
+
--font-size: 98%;
|
|
74
|
+
--sidebar-width: max(25%, 150px);
|
|
75
|
+
--responsive-multiplier: 1.1;
|
|
76
|
+
--spacing: calc(var(--base-spacing) * var(--responsive-multiplier));
|
|
77
|
+
--nav-link-spacing: calc(var(--spacing) * 0.5);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@media (--breakpoint-md) {
|
|
82
|
+
:root,
|
|
83
|
+
:host {
|
|
84
|
+
--font-size: 99%;
|
|
85
|
+
--sidebar-width: max(22%, 180px);
|
|
86
|
+
--responsive-multiplier: 1.2;
|
|
87
|
+
--spacing: calc(var(--base-spacing) * var(--responsive-multiplier));
|
|
88
|
+
--nav-link-spacing: calc(var(--spacing) * 0.5);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@media (--breakpoint-lg) {
|
|
93
|
+
:root,
|
|
94
|
+
:host {
|
|
95
|
+
--font-size: 100%;
|
|
96
|
+
--sidebar-width: max(20%, 200px);
|
|
97
|
+
--responsive-multiplier: 1.3;
|
|
98
|
+
--spacing: calc(var(--base-spacing) * var(--responsive-multiplier));
|
|
99
|
+
--nav-link-spacing: calc(var(--spacing) * 0.5);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@media (--breakpoint-xl) {
|
|
104
|
+
:root,
|
|
105
|
+
:host {
|
|
106
|
+
--font-size: 101%;
|
|
107
|
+
--sidebar-width: max(18%, 220px);
|
|
108
|
+
--responsive-multiplier: 1.4;
|
|
109
|
+
--spacing: calc(var(--base-spacing) * var(--responsive-multiplier));
|
|
110
|
+
--nav-link-spacing: calc(var(--spacing) * 0.5);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@media (--breakpoint-xxl) {
|
|
115
|
+
:root,
|
|
116
|
+
:host {
|
|
117
|
+
--font-size: 102%;
|
|
118
|
+
--sidebar-width: clamp(240px, 16%, 300px);
|
|
119
|
+
--responsive-multiplier: 1.5;
|
|
120
|
+
--spacing: calc(var(--base-spacing) * var(--responsive-multiplier));
|
|
121
|
+
--nav-link-spacing: calc(var(--spacing) * 0.5);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
:where(a:not([role="button"])),
|
|
8
8
|
[role="link"] {
|
|
9
9
|
&.contrast {
|
|
10
|
-
--color-text: var(--color-contrast);
|
|
10
|
+
--color-text: rgb(var(--color-contrast-rgb));
|
|
11
11
|
--underline: var(--color-contrast-underline);
|
|
12
12
|
|
|
13
13
|
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
|
|
@@ -17,21 +17,23 @@
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
:is(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
:is(button, [type="submit"], [type="button"], [role="button"]) {
|
|
21
|
+
&.contrast {
|
|
22
|
+
--color-background: var(--color-contrast-bg);
|
|
23
|
+
--border-color: var(--color-contrast-border);
|
|
24
|
+
--color-text: var(--color-contrast-inverse);
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
26
|
+
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
|
|
27
|
+
--color-background: var(--color-contrast-hover-bg);
|
|
28
|
+
--border-color: var(--color-contrast-hover-border);
|
|
29
|
+
--color-text: var(--color-contrast-inverse);
|
|
30
|
+
}
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
&:focus,
|
|
33
|
+
&:is([aria-current]:not([aria-current="false"])):focus {
|
|
34
|
+
--shadow-lg: var(--button-shadow-hover, 0 0 0 rgba(0, 0, 0, 0)), 0 0 0 var(--outline-width) var(--color-contrast-focus);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
/* Accordion chevron dark mode override */
|
|
@@ -45,3 +47,15 @@
|
|
|
45
47
|
[data-theme="dark"] details summary[role="button"].contrast::after {
|
|
46
48
|
filter: brightness(0);
|
|
47
49
|
}
|
|
50
|
+
|
|
51
|
+
:is(.card, .pane, .panel).contrast {
|
|
52
|
+
--color-text: rgb(var(--color-contrast-emphasis-rgb)) !important;
|
|
53
|
+
--color-heading-base: color-mix(in srgb, var(--color-text), black 18%);
|
|
54
|
+
--pane-bg: var(--color-contrast-bg-subtle);
|
|
55
|
+
--pane-section-bg: rgba(var(--color-contrast-rgb), 0.6);
|
|
56
|
+
--pane-section-border: var(--color-contrast-border-subtle);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:is(.panel).contrast {
|
|
60
|
+
--pane-border: var(--color-contrast-border);
|
|
61
|
+
}
|
package/src/variants/_ghost.css
CHANGED
|
@@ -10,47 +10,54 @@
|
|
|
10
10
|
background-color: var(--color-background) !important;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
:is(button, [type="submit"], [type="button"], [role="button"])
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
:is(button, [type="submit"], [type="button"], [role="button"]) {
|
|
14
|
+
&.ghost {
|
|
15
|
+
--color-background: transparent;
|
|
16
|
+
--border-color: rgb(var(--color-primary-rgb));
|
|
17
|
+
--color-text: rgb(var(--color-primary-rgb));
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
19
|
+
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
|
|
20
|
+
--color-background: var(--color-primary-hover-bg);
|
|
21
|
+
--border-color: var(--color-primary-hover-border);
|
|
22
|
+
--color-text: var(--color-primary-inverse);
|
|
23
|
+
}
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
&.secondary {
|
|
26
|
+
--color-background: transparent;
|
|
27
|
+
--border-color: rgb(var(--color-secondary-rgb));
|
|
28
|
+
--color-text: rgb(var(--color-secondary-rgb));
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
|
|
31
|
+
--color-background: var(--color-secondary-hover-bg);
|
|
32
|
+
--border-color: var(--color-secondary-hover-border);
|
|
33
|
+
--color-text: var(--color-secondary-inverse);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
34
36
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
&.contrast {
|
|
38
|
+
--color-background: transparent;
|
|
39
|
+
--border-color: rgb(var(--color-contrast-rgb));
|
|
40
|
+
--color-text: rgb(var(--color-contrast-rgb));
|
|
39
41
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
|
|
43
|
+
--color-background: var(--color-contrast-hover-bg);
|
|
44
|
+
--border-color: var(--color-contrast-hover-border);
|
|
45
|
+
--color-text: var(--color-contrast-inverse);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
43
49
|
}
|
|
44
50
|
|
|
45
51
|
/* Reset buttons */
|
|
46
52
|
[type="reset"].ghost {
|
|
47
53
|
--color-background: transparent;
|
|
48
|
-
--color
|
|
49
|
-
--
|
|
54
|
+
--border-color: rgb(var(--color-secondary-rgb));
|
|
55
|
+
--color-text: rgb(var(--color-secondary-rgb));
|
|
50
56
|
|
|
51
57
|
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
|
|
52
|
-
--color-
|
|
53
|
-
--border-color: var(--color-secondary-hover);
|
|
58
|
+
--color-background: var(--color-secondary-hover-bg);
|
|
59
|
+
--border-color: var(--color-secondary-hover-border);
|
|
60
|
+
--color-text: var(--color-secondary-inverse);
|
|
54
61
|
}
|
|
55
62
|
}
|
|
56
63
|
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pane, Panel and Card
|
|
3
|
+
* A container component for grouped content with visual pane, panel and card styling
|
|
4
|
+
* Can be applied to any element (article, div, section, etc.)
|
|
5
|
+
*/
|
|
6
|
+
.pane,
|
|
7
|
+
.panel,
|
|
8
|
+
.card {
|
|
9
|
+
padding-block: var(--spacing);
|
|
10
|
+
padding-inline: var(--spacing);
|
|
11
|
+
margin-bottom: var(--spacing);
|
|
12
|
+
border-radius: var(--border-radius);
|
|
13
|
+
border: var(--border-width) solid var(--pane-border);
|
|
14
|
+
background: var(--pane-bg);
|
|
15
|
+
box-shadow: var(--pane-shadow);
|
|
16
|
+
|
|
17
|
+
& > header,
|
|
18
|
+
& > footer {
|
|
19
|
+
width: auto;
|
|
20
|
+
margin-inline: calc(var(--spacing) * -1);
|
|
21
|
+
padding-inline: var(--spacing);
|
|
22
|
+
background-color: var(--pane-section-bg);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
& > header {
|
|
26
|
+
margin-top: calc(var(--spacing) * -1);
|
|
27
|
+
border-bottom: var(--border-width) solid var(--pane-section-border);
|
|
28
|
+
border-top-right-radius: var(--border-radius);
|
|
29
|
+
border-top-left-radius: var(--border-radius);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
& > footer {
|
|
33
|
+
margin-bottom: calc(var(--spacing) * -1);
|
|
34
|
+
border-top: var(--border-width) solid var(--pane-section-border);
|
|
35
|
+
border-bottom-right-radius: var(--border-radius);
|
|
36
|
+
border-bottom-left-radius: var(--border-radius);
|
|
37
|
+
display: flex;
|
|
38
|
+
justify-content: end;
|
|
39
|
+
gap: calc(var(--nav-link-spacing) * 1.5);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.pane,
|
|
44
|
+
.panel {
|
|
45
|
+
--pane-shadow: none;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.panel {
|
|
49
|
+
--pane-border: var(--pane-section-border);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.card {
|
|
53
|
+
--pane-shadow: var(--shadow-lg);
|
|
54
|
+
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
:where(a:not([role="button"])),
|
|
8
8
|
[role="link"] {
|
|
9
9
|
&.secondary {
|
|
10
|
-
--color-text: var(--color-secondary);
|
|
10
|
+
--color-text: rgb(var(--color-secondary-rgb));
|
|
11
11
|
--underline: var(--color-secondary-underline);
|
|
12
12
|
|
|
13
13
|
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
|
|
@@ -17,19 +17,32 @@
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
:is(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
:is(button, [type="submit"], [type="button"], [role="button"]) {
|
|
21
|
+
&.secondary {
|
|
22
|
+
--color-background: var(--color-secondary-bg);
|
|
23
|
+
--border-color: var(--color-secondary-border);
|
|
24
|
+
--color-text: var(--color-secondary-inverse);
|
|
25
|
+
|
|
26
|
+
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
|
|
27
|
+
--color-background: var(--color-secondary-hover-bg);
|
|
28
|
+
--border-color: var(--color-secondary-hover-border);
|
|
29
|
+
--color-text: var(--color-secondary-inverse);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&:focus,
|
|
33
|
+
&:is([aria-current]:not([aria-current="false"])):focus {
|
|
34
|
+
--shadow-lg: var(--button-shadow-hover, 0 0 0 rgba(0, 0, 0, 0)), 0 0 0 var(--outline-width) var(--color-secondary-focus);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
24
37
|
}
|
|
25
38
|
|
|
26
|
-
:is(
|
|
27
|
-
--color-
|
|
28
|
-
--
|
|
29
|
-
--
|
|
39
|
+
:is(.card, .pane, .panel).secondary {
|
|
40
|
+
--color-text: rgb(var(--color-secondary-emphasis-rgb)) !important;
|
|
41
|
+
--color-heading-base: color-mix(in srgb, var(--color-text), black 18%);
|
|
42
|
+
--pane-bg: var(--color-secondary-bg-subtle);
|
|
30
43
|
}
|
|
31
44
|
|
|
32
|
-
:is(
|
|
33
|
-
:
|
|
34
|
-
--
|
|
45
|
+
:is(.panel).secondary {
|
|
46
|
+
--pane-section-border: var(--color-secondary-border-subtle);
|
|
47
|
+
--pane-border: var(--color-secondary-border-subtle);
|
|
35
48
|
}
|