@graphprotocol/gds-css 0.0.1
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 +80 -0
- package/dist/component-registry.d.ts +90 -0
- package/dist/component-registry.d.ts.map +1 -0
- package/dist/component-registry.js +93 -0
- package/dist/component-registry.js.map +1 -0
- package/dist/css-props/getCSSPropRawValue.d.ts +4 -0
- package/dist/css-props/getCSSPropRawValue.d.ts.map +1 -0
- package/dist/css-props/getCSSPropRawValue.js +41 -0
- package/dist/css-props/getCSSPropRawValue.js.map +1 -0
- package/dist/css-props/index.d.ts +5 -0
- package/dist/css-props/index.d.ts.map +1 -0
- package/dist/css-props/index.js +5 -0
- package/dist/css-props/index.js.map +1 -0
- package/dist/css-props/parseCSSPropValue.d.ts +7 -0
- package/dist/css-props/parseCSSPropValue.d.ts.map +1 -0
- package/dist/css-props/parseCSSPropValue.js +70 -0
- package/dist/css-props/parseCSSPropValue.js.map +1 -0
- package/dist/css-props/registerCSSProps.d.ts +7 -0
- package/dist/css-props/registerCSSProps.d.ts.map +1 -0
- package/dist/css-props/registerCSSProps.js +231 -0
- package/dist/css-props/registerCSSProps.js.map +1 -0
- package/dist/css-props/types.d.ts +29 -0
- package/dist/css-props/types.d.ts.map +1 -0
- package/dist/css-props/types.js +2 -0
- package/dist/css-props/types.js.map +1 -0
- package/dist/css-states/index.d.ts +3 -0
- package/dist/css-states/index.d.ts.map +1 -0
- package/dist/css-states/index.js +3 -0
- package/dist/css-states/index.js.map +1 -0
- package/dist/css-states/registerCSSStates.d.ts +23 -0
- package/dist/css-states/registerCSSStates.d.ts.map +1 -0
- package/dist/css-states/registerCSSStates.js +119 -0
- package/dist/css-states/registerCSSStates.js.map +1 -0
- package/dist/css-states/states.d.ts +71 -0
- package/dist/css-states/states.d.ts.map +1 -0
- package/dist/css-states/states.js +140 -0
- package/dist/css-states/states.js.map +1 -0
- package/dist/design-tokens.generated.d.ts +1167 -0
- package/dist/design-tokens.generated.d.ts.map +1 -0
- package/dist/design-tokens.generated.js +2675 -0
- package/dist/design-tokens.generated.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/tailwind-customizations/index.d.ts +3 -0
- package/dist/tailwind-customizations/index.d.ts.map +1 -0
- package/dist/tailwind-customizations/index.js +3 -0
- package/dist/tailwind-customizations/index.js.map +1 -0
- package/dist/tailwind-customizations/registerUtilities.d.ts +9 -0
- package/dist/tailwind-customizations/registerUtilities.d.ts.map +1 -0
- package/dist/tailwind-customizations/registerUtilities.js +59 -0
- package/dist/tailwind-customizations/registerUtilities.js.map +1 -0
- package/dist/tailwind-customizations/registerVariants.d.ts +8 -0
- package/dist/tailwind-customizations/registerVariants.d.ts.map +1 -0
- package/dist/tailwind-customizations/registerVariants.js +197 -0
- package/dist/tailwind-customizations/registerVariants.js.map +1 -0
- package/dist/tailwind-customizations/variants.d.ts +72 -0
- package/dist/tailwind-customizations/variants.d.ts.map +1 -0
- package/dist/tailwind-customizations/variants.js +153 -0
- package/dist/tailwind-customizations/variants.js.map +1 -0
- package/dist/tailwind-plugin.d.ts +4 -0
- package/dist/tailwind-plugin.d.ts.map +1 -0
- package/dist/tailwind-plugin.js +12 -0
- package/dist/tailwind-plugin.js.map +1 -0
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/cssUnescape.d.ts +20 -0
- package/dist/utils/cssUnescape.d.ts.map +1 -0
- package/dist/utils/cssUnescape.js +44 -0
- package/dist/utils/cssUnescape.js.map +1 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/pxToTw.d.ts +3 -0
- package/dist/utils/pxToTw.d.ts.map +1 -0
- package/dist/utils/pxToTw.js +5 -0
- package/dist/utils/pxToTw.js.map +1 -0
- package/dist/utils/twToPx.d.ts +3 -0
- package/dist/utils/twToPx.d.ts.map +1 -0
- package/dist/utils/twToPx.js +5 -0
- package/dist/utils/twToPx.js.map +1 -0
- package/dist/utils/twToRem.d.ts +3 -0
- package/dist/utils/twToRem.d.ts.map +1 -0
- package/dist/utils/twToRem.js +5 -0
- package/dist/utils/twToRem.js.map +1 -0
- package/dist/utils/wrapSelector.d.ts +10 -0
- package/dist/utils/wrapSelector.d.ts.map +1 -0
- package/dist/utils/wrapSelector.js +57 -0
- package/dist/utils/wrapSelector.js.map +1 -0
- package/package.json +65 -0
- package/src/component-registry.ts +213 -0
- package/src/css-props/getCSSPropRawValue.ts +52 -0
- package/src/css-props/index.ts +4 -0
- package/src/css-props/parseCSSPropValue.ts +81 -0
- package/src/css-props/registerCSSProps.ts +274 -0
- package/src/css-props/types.ts +35 -0
- package/src/css-states/index.ts +2 -0
- package/src/css-states/registerCSSStates.ts +136 -0
- package/src/css-states/states.ts +160 -0
- package/src/design-tokens.generated.ts +2799 -0
- package/src/index.ts +6 -0
- package/src/tailwind-customizations/index.ts +2 -0
- package/src/tailwind-customizations/registerUtilities.ts +65 -0
- package/src/tailwind-customizations/registerVariants.ts +296 -0
- package/src/tailwind-customizations/variants.ts +190 -0
- package/src/tailwind-plugin.ts +14 -0
- package/src/types.ts +4 -0
- package/src/utils/cssUnescape.ts +49 -0
- package/src/utils/index.ts +5 -0
- package/src/utils/pxToTw.ts +4 -0
- package/src/utils/twToPx.ts +4 -0
- package/src/utils/twToRem.ts +4 -0
- package/src/utils/wrapSelector.ts +60 -0
- package/styles/fonts/EuclidCircularA-Bold.woff2 +0 -0
- package/styles/fonts/EuclidCircularA-BoldItalic.woff2 +0 -0
- package/styles/fonts/EuclidCircularA-Light.woff2 +0 -0
- package/styles/fonts/EuclidCircularA-LightItalic.woff2 +0 -0
- package/styles/fonts/EuclidCircularA-Medium.woff2 +0 -0
- package/styles/fonts/EuclidCircularA-MediumItalic.woff2 +0 -0
- package/styles/fonts/EuclidCircularA-Regular.woff2 +0 -0
- package/styles/fonts/EuclidCircularA-RegularItalic.woff2 +0 -0
- package/styles/fonts/EuclidCircularA-Semibold.woff2 +0 -0
- package/styles/fonts/EuclidCircularA-SemiboldItalic.woff2 +0 -0
- package/styles/fonts.css +83 -0
- package/styles/global.css +203 -0
- package/styles/layers.css +8 -0
- package/styles/tailwind.css +13 -0
- package/styles/tailwind.vscode.css +11 -0
- package/styles/theme.css +420 -0
- package/styles/typography.css +198 -0
- package/styles/utilities.css +305 -0
- package/styles/variants.css +34 -0
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extend Tailwind's `scheme-*` properties, then register utilities to force a specific theme / color scheme
|
|
3
|
+
* for a subtree. We don't use `@utility` for those because we want to prevent variants being used on them
|
|
4
|
+
* (as it would break selectors like the one used in the `light` variant or in the React package's global styles).
|
|
5
|
+
*/
|
|
6
|
+
@utility scheme-only-dark {
|
|
7
|
+
--gds-color-scheme: dark;
|
|
8
|
+
}
|
|
9
|
+
@utility scheme-only-light {
|
|
10
|
+
--gds-color-scheme: light;
|
|
11
|
+
}
|
|
12
|
+
@utility scheme-light-dark {
|
|
13
|
+
@media (prefers-color-scheme: dark) {
|
|
14
|
+
--gds-color-scheme: dark;
|
|
15
|
+
}
|
|
16
|
+
@media (prefers-color-scheme: light) {
|
|
17
|
+
--gds-color-scheme: light;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
@layer utilities {
|
|
21
|
+
.gds-dark {
|
|
22
|
+
@apply scheme-only-dark;
|
|
23
|
+
}
|
|
24
|
+
.gds-light {
|
|
25
|
+
@apply scheme-only-light;
|
|
26
|
+
}
|
|
27
|
+
.gds-system {
|
|
28
|
+
@apply scheme-light-dark;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Add `root-{display}` utilities for components to force their inner display type independently from their
|
|
34
|
+
* outer one, which may be controlled by the consumer (e.g. `<Avatar className="inline" />`).
|
|
35
|
+
*/
|
|
36
|
+
@theme static {
|
|
37
|
+
--root-display-inside-block: flow-root;
|
|
38
|
+
--root-display-inside-inline: flow;
|
|
39
|
+
--root-display-inside-flex: flex;
|
|
40
|
+
--root-display-inside-grid: grid;
|
|
41
|
+
--root-display-inside-table: table;
|
|
42
|
+
--root-display-outside-block: block;
|
|
43
|
+
--root-display-outside-inline: inline;
|
|
44
|
+
}
|
|
45
|
+
@utility root-* {
|
|
46
|
+
@variant u {
|
|
47
|
+
--gds-display-inside: --value(--root-display-inside- *);
|
|
48
|
+
--gds-display-outside: block;
|
|
49
|
+
--gds-display-outside: --value('inline');
|
|
50
|
+
--gds-display-outside: --modifier(--root-display-outside- *);
|
|
51
|
+
--gds-display-none: initial;
|
|
52
|
+
}
|
|
53
|
+
@variant i {
|
|
54
|
+
display: var(--gds-display-none, var(--gds-display-outside) var(--gds-display-inside));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Extend the display utilities to support the `root-{display}` utilities.
|
|
60
|
+
*/
|
|
61
|
+
@utility hidden {
|
|
62
|
+
--gds-display-none: none;
|
|
63
|
+
}
|
|
64
|
+
@utility flow-root {
|
|
65
|
+
--gds-display-outside: block;
|
|
66
|
+
--gds-display-none: initial;
|
|
67
|
+
}
|
|
68
|
+
@utility block {
|
|
69
|
+
--gds-display-outside: block;
|
|
70
|
+
--gds-display-none: initial;
|
|
71
|
+
}
|
|
72
|
+
@utility flex {
|
|
73
|
+
--gds-display-outside: block;
|
|
74
|
+
--gds-display-none: initial;
|
|
75
|
+
}
|
|
76
|
+
@utility grid {
|
|
77
|
+
--gds-display-outside: block;
|
|
78
|
+
--gds-display-none: initial;
|
|
79
|
+
}
|
|
80
|
+
@utility table {
|
|
81
|
+
--gds-display-outside: block;
|
|
82
|
+
--gds-display-none: initial;
|
|
83
|
+
}
|
|
84
|
+
@utility inline {
|
|
85
|
+
--gds-display-outside: inline;
|
|
86
|
+
--gds-display-none: initial;
|
|
87
|
+
}
|
|
88
|
+
@utility inline-block {
|
|
89
|
+
--gds-display-outside: inline;
|
|
90
|
+
--gds-display-none: initial;
|
|
91
|
+
}
|
|
92
|
+
@utility inline-flex {
|
|
93
|
+
--gds-display-outside: inline;
|
|
94
|
+
--gds-display-none: initial;
|
|
95
|
+
}
|
|
96
|
+
@utility inline-grid {
|
|
97
|
+
--gds-display-outside: inline;
|
|
98
|
+
--gds-display-none: initial;
|
|
99
|
+
}
|
|
100
|
+
@utility inline-table {
|
|
101
|
+
--gds-display-outside: inline;
|
|
102
|
+
--gds-display-none: initial;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Extend the default pointer events utilities to allow restoring the pointer events on an element
|
|
107
|
+
* with the `pointer-events-previous` utility after an ancestor disabled them with `pointer-events-none`,
|
|
108
|
+
* while respecting any consumer's `pointer-events-none` higher up the tree.
|
|
109
|
+
*/
|
|
110
|
+
:root {
|
|
111
|
+
--gds-pointer-events: auto;
|
|
112
|
+
--gds-pointer-events-previous: auto;
|
|
113
|
+
}
|
|
114
|
+
@utility pointer-events-none {
|
|
115
|
+
--gds-pointer-events-previous: var(--gds-pointer-events);
|
|
116
|
+
:where(&) > * {
|
|
117
|
+
--gds-pointer-events: none;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
@utility pointer-events-auto {
|
|
121
|
+
--gds-pointer-events-previous: var(--gds-pointer-events);
|
|
122
|
+
:where(&) > * {
|
|
123
|
+
--gds-pointer-events: auto;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
@utility pointer-events-previous {
|
|
127
|
+
--gds-pointer-events-previous: revert;
|
|
128
|
+
--gds-pointer-events: var(--gds-pointer-events-previous) !important;
|
|
129
|
+
pointer-events: var(--gds-pointer-events);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Extend the `grid-template-columns` utilities to support responsive grids with a simple syntax
|
|
134
|
+
* (`auto-fill` or `auto-fit` columns with the specified minimum width).
|
|
135
|
+
*/
|
|
136
|
+
@utility grid-cols-auto-fill-* {
|
|
137
|
+
grid-template-columns: repeat(auto-fill, minmax(min(--spacing(--value(integer)), 100%), 1fr));
|
|
138
|
+
grid-template-columns: repeat(
|
|
139
|
+
auto-fill,
|
|
140
|
+
minmax(min(--value(--spacing-*, [percentage], [length]), 100%), 1fr)
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
@utility grid-cols-auto-fit-* {
|
|
144
|
+
grid-template-columns: repeat(auto-fit, minmax(min(--spacing(--value(integer)), 100%), 1fr));
|
|
145
|
+
grid-template-columns: repeat(
|
|
146
|
+
auto-fit,
|
|
147
|
+
minmax(min(--value(--spacing-*, [percentage], [length]), 100%), 1fr)
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* Tab size utilities */
|
|
152
|
+
@utility tab-* {
|
|
153
|
+
tab-size: --value('2', '4', '8', integer);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/* Scrollbar width utilities */
|
|
157
|
+
@utility scrollbar-none {
|
|
158
|
+
scrollbar-width: none;
|
|
159
|
+
&::-webkit-scrollbar {
|
|
160
|
+
display: none;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
@utility scrollbar-thin {
|
|
164
|
+
scrollbar-width: thin;
|
|
165
|
+
&::-webkit-scrollbar {
|
|
166
|
+
display: initial;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
@utility scrollbar-auto {
|
|
170
|
+
scrollbar-width: auto;
|
|
171
|
+
&::-webkit-scrollbar {
|
|
172
|
+
display: initial;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/* Gradient mask utilities */
|
|
177
|
+
@utility gradient-mask-x {
|
|
178
|
+
@supports (animation-timeline: scroll(x self)) {
|
|
179
|
+
--gds-gradient-mask-size: 32px;
|
|
180
|
+
--gds-gradient-mask-offset: 0px;
|
|
181
|
+
--gds-gradient-mask-inline-start: var(--gds-gradient-mask-left);
|
|
182
|
+
--gds-gradient-mask-inline-end: var(--gds-gradient-mask-right);
|
|
183
|
+
@variant rtl {
|
|
184
|
+
--gds-gradient-mask-inline-start: var(--gds-gradient-mask-right);
|
|
185
|
+
--gds-gradient-mask-inline-end: var(--gds-gradient-mask-left);
|
|
186
|
+
}
|
|
187
|
+
animation-name: gradient-mask-left, gradient-mask-right;
|
|
188
|
+
animation-timing-function: linear, linear;
|
|
189
|
+
animation-timeline: scroll(x self), scroll(x self);
|
|
190
|
+
animation-range:
|
|
191
|
+
0 calc(var(--gds-gradient-mask-size) / 2),
|
|
192
|
+
calc(100% - calc(var(--gds-gradient-mask-size) / 2)) 100%;
|
|
193
|
+
animation-fill-mode: both, both;
|
|
194
|
+
mask-image: linear-gradient(
|
|
195
|
+
to right,
|
|
196
|
+
var(--gds-gradient-mask-inline-start) var(--gds-gradient-mask-offset),
|
|
197
|
+
black calc(var(--gds-gradient-mask-offset) + var(--gds-gradient-mask-size)),
|
|
198
|
+
black calc(100% - var(--gds-gradient-mask-size) - var(--gds-gradient-mask-offset)),
|
|
199
|
+
var(--gds-gradient-mask-inline-end) calc(100% - var(--gds-gradient-mask-offset))
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
@utility gradient-mask-y {
|
|
204
|
+
@supports (animation-timeline: scroll(y self)) {
|
|
205
|
+
--gds-gradient-mask-size: 32px;
|
|
206
|
+
--gds-gradient-mask-offset: 0px;
|
|
207
|
+
--gds-gradient-mask-block-start: var(--gds-gradient-mask-top);
|
|
208
|
+
--gds-gradient-mask-block-end: var(--gds-gradient-mask-bottom);
|
|
209
|
+
animation-name: gradient-mask-top, gradient-mask-bottom;
|
|
210
|
+
animation-timing-function: linear, linear;
|
|
211
|
+
animation-timeline: scroll(y self), scroll(y self);
|
|
212
|
+
animation-range:
|
|
213
|
+
0 calc(var(--gds-gradient-mask-size) / 2),
|
|
214
|
+
calc(100% - calc(var(--gds-gradient-mask-size) / 2)) 100%;
|
|
215
|
+
animation-fill-mode: both, both;
|
|
216
|
+
mask-image: linear-gradient(
|
|
217
|
+
to bottom,
|
|
218
|
+
var(--gds-gradient-mask-block-start) var(--gds-gradient-mask-offset),
|
|
219
|
+
black calc(var(--gds-gradient-mask-offset) + var(--gds-gradient-mask-size)),
|
|
220
|
+
black calc(100% - var(--gds-gradient-mask-size) - var(--gds-gradient-mask-offset)),
|
|
221
|
+
var(--gds-gradient-mask-block-end) calc(100% - var(--gds-gradient-mask-offset))
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
@utility gradient-mask-* {
|
|
226
|
+
--gds-gradient-mask-size: --spacing(--value(integer));
|
|
227
|
+
--gds-gradient-mask-size: --value([length]);
|
|
228
|
+
}
|
|
229
|
+
@utility gradient-mask-offset-* {
|
|
230
|
+
--gds-gradient-mask-offset: --spacing(--value(integer));
|
|
231
|
+
--gds-gradient-mask-offset: --value([length]);
|
|
232
|
+
}
|
|
233
|
+
@utility gradient-mask-reverse {
|
|
234
|
+
@variant not-safari {
|
|
235
|
+
--gds-gradient-mask-inline-start: var(--gds-gradient-mask-right);
|
|
236
|
+
--gds-gradient-mask-inline-end: var(--gds-gradient-mask-left);
|
|
237
|
+
--gds-gradient-mask-block-start: var(--gds-gradient-mask-bottom);
|
|
238
|
+
--gds-gradient-mask-block-end: var(--gds-gradient-mask-top);
|
|
239
|
+
@variant rtl {
|
|
240
|
+
--gds-gradient-mask-inline-start: var(--gds-gradient-mask-left);
|
|
241
|
+
--gds-gradient-mask-inline-end: var(--gds-gradient-mask-right);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
@property --gds-gradient-mask-left {
|
|
246
|
+
syntax: '<color>';
|
|
247
|
+
inherits: false;
|
|
248
|
+
initial-value: black;
|
|
249
|
+
}
|
|
250
|
+
@property --gds-gradient-mask-right {
|
|
251
|
+
syntax: '<color>';
|
|
252
|
+
inherits: false;
|
|
253
|
+
initial-value: black;
|
|
254
|
+
}
|
|
255
|
+
@property --gds-gradient-mask-top {
|
|
256
|
+
syntax: '<color>';
|
|
257
|
+
inherits: false;
|
|
258
|
+
initial-value: black;
|
|
259
|
+
}
|
|
260
|
+
@property --gds-gradient-mask-bottom {
|
|
261
|
+
syntax: '<color>';
|
|
262
|
+
inherits: false;
|
|
263
|
+
initial-value: black;
|
|
264
|
+
}
|
|
265
|
+
@keyframes gradient-mask-left {
|
|
266
|
+
from {
|
|
267
|
+
--gds-gradient-mask-left: black;
|
|
268
|
+
}
|
|
269
|
+
to {
|
|
270
|
+
--gds-gradient-mask-left: transparent;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
@keyframes gradient-mask-right {
|
|
274
|
+
from {
|
|
275
|
+
--gds-gradient-mask-right: transparent;
|
|
276
|
+
}
|
|
277
|
+
to {
|
|
278
|
+
--gds-gradient-mask-right: black;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
@keyframes gradient-mask-top {
|
|
282
|
+
from {
|
|
283
|
+
--gds-gradient-mask-top: black;
|
|
284
|
+
}
|
|
285
|
+
to {
|
|
286
|
+
--gds-gradient-mask-top: transparent;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
@keyframes gradient-mask-bottom {
|
|
290
|
+
from {
|
|
291
|
+
--gds-gradient-mask-bottom: transparent;
|
|
292
|
+
}
|
|
293
|
+
to {
|
|
294
|
+
--gds-gradient-mask-bottom: black;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/* Use an element's background as its border (gradient border hack) */
|
|
299
|
+
@utility border-bg {
|
|
300
|
+
border-color: transparent;
|
|
301
|
+
background-origin: border-box;
|
|
302
|
+
mask-image: linear-gradient(#fff 0 0), linear-gradient(#fff 0 0);
|
|
303
|
+
mask-clip: padding-box, border-box;
|
|
304
|
+
mask-composite: exclude, exclude;
|
|
305
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* "Disable" Tailwind's `dark` variant and add a `light` variant */
|
|
2
|
+
@custom-variant dark {
|
|
3
|
+
--error: 'The dark variant is not supported by GDS';
|
|
4
|
+
}
|
|
5
|
+
@custom-variant light {
|
|
6
|
+
@container style(--gds-color-scheme: light) {
|
|
7
|
+
@slot;
|
|
8
|
+
}
|
|
9
|
+
@supports (-moz-orient: inline) {
|
|
10
|
+
&:is(.gds-light *):not(.gds-light .gds-dark *) {
|
|
11
|
+
@slot;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Override Tailwind's `ltr` and `rtl` variants to prioritize functionality over legacy browser support */
|
|
17
|
+
@custom-variant ltr (&:where(:dir(ltr)));
|
|
18
|
+
@custom-variant rtl (&:where(:dir(rtl)));
|
|
19
|
+
|
|
20
|
+
/* Hover/touch capability */
|
|
21
|
+
@custom-variant can-hover (@media (any-hover: hover));
|
|
22
|
+
@custom-variant can-touch (@media (any-pointer: coarse));
|
|
23
|
+
|
|
24
|
+
/* Browser detection (for hacks, e.g. working around CSS bugs) */
|
|
25
|
+
@custom-variant safari (@supports (-webkit-appearance: -apple-pay-button));
|
|
26
|
+
@custom-variant firefox (@supports (-moz-orient: inline));
|
|
27
|
+
|
|
28
|
+
/* Unimportant and important */
|
|
29
|
+
@custom-variant uuu (@layer uuu);
|
|
30
|
+
@custom-variant uu (@layer uu);
|
|
31
|
+
@custom-variant u (@layer u);
|
|
32
|
+
@custom-variant i (&:is(#i, *));
|
|
33
|
+
@custom-variant ii (&:is(#i#i, *));
|
|
34
|
+
@custom-variant iii (&:is(#i#i#i, *));
|