tailwindcss 0.0.0-insiders.ebc1c7a → 0.0.0-insiders.ec0049a
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/LICENSE +1 -2
- package/README.md +18 -11
- package/dist/chunk-AZANAYY2.mjs +1 -0
- package/dist/chunk-CH45MXZF.mjs +10 -0
- package/dist/chunk-V2K3XTS4.mjs +1 -0
- package/dist/colors-b_6i0Oi7.d.ts +295 -0
- package/dist/colors.d.mts +295 -0
- package/dist/colors.d.ts +5 -0
- package/dist/colors.js +1 -0
- package/dist/colors.mjs +1 -0
- package/dist/default-theme.d.mts +1147 -0
- package/dist/default-theme.d.ts +1147 -0
- package/dist/default-theme.js +1 -0
- package/dist/default-theme.mjs +1 -0
- package/dist/flatten-color-palette.d.mts +6 -0
- package/dist/flatten-color-palette.d.ts +6 -0
- package/dist/flatten-color-palette.js +1 -0
- package/dist/flatten-color-palette.mjs +1 -0
- package/dist/lib.d.mts +260 -0
- package/dist/lib.d.ts +3 -0
- package/dist/lib.js +33 -0
- package/dist/lib.mjs +24 -0
- package/dist/plugin.d.mts +11 -0
- package/dist/plugin.d.ts +104 -0
- package/dist/plugin.js +1 -0
- package/dist/plugin.mjs +1 -0
- package/dist/resolve-config-BIFUA2FY.d.ts +29 -0
- package/dist/resolve-config-QUZ9b-Gn.d.mts +190 -0
- package/dist/types-B254mqw1.d.mts +98 -0
- package/index.css +865 -0
- package/package.json +73 -110
- package/preflight.css +383 -0
- package/theme.css +453 -0
- package/CHANGELOG.md +0 -1742
- package/base.css +0 -1
- package/colors.js +0 -304
- package/components.css +0 -1
- package/defaultConfig.js +0 -4
- package/defaultTheme.js +0 -4
- package/lib/cli-peer-dependencies.js +0 -20
- package/lib/cli.js +0 -765
- package/lib/constants.js +0 -37
- package/lib/corePluginList.js +0 -8
- package/lib/corePlugins.js +0 -2977
- package/lib/css/LICENSE +0 -25
- package/lib/css/preflight.css +0 -354
- package/lib/featureFlags.js +0 -60
- package/lib/index.js +0 -31
- package/lib/lib/collapseAdjacentRules.js +0 -43
- package/lib/lib/evaluateTailwindFunctions.js +0 -192
- package/lib/lib/expandApplyAtRules.js +0 -245
- package/lib/lib/expandTailwindAtRules.js +0 -260
- package/lib/lib/generateRules.js +0 -362
- package/lib/lib/getModuleDependencies.js +0 -53
- package/lib/lib/normalizeTailwindDirectives.js +0 -68
- package/lib/lib/resolveDefaultsAtRules.js +0 -105
- package/lib/lib/setupContextUtils.js +0 -643
- package/lib/lib/setupTrackingContext.js +0 -190
- package/lib/lib/setupWatchingContext.js +0 -331
- package/lib/lib/sharedState.js +0 -29
- package/lib/lib/substituteScreenAtRules.js +0 -31
- package/lib/processTailwindFeatures.js +0 -57
- package/lib/util/bigSign.js +0 -10
- package/lib/util/buildMediaQuery.js +0 -36
- package/lib/util/cloneDeep.js +0 -18
- package/lib/util/cloneNodes.js +0 -18
- package/lib/util/color.js +0 -74
- package/lib/util/configurePlugins.js +0 -19
- package/lib/util/createPlugin.js +0 -33
- package/lib/util/createUtilityPlugin.js +0 -51
- package/lib/util/defaults.js +0 -20
- package/lib/util/escapeClassName.js +0 -21
- package/lib/util/escapeCommas.js +0 -10
- package/lib/util/flattenColorPalette.js +0 -15
- package/lib/util/getAllConfigs.js +0 -22
- package/lib/util/hashConfig.js +0 -16
- package/lib/util/isKeyframeRule.js +0 -10
- package/lib/util/isPlainObject.js +0 -15
- package/lib/util/log.js +0 -38
- package/lib/util/nameClass.js +0 -32
- package/lib/util/negateValue.js +0 -20
- package/lib/util/parseAnimationValue.js +0 -60
- package/lib/util/parseDependency.js +0 -74
- package/lib/util/parseObjectStyles.js +0 -28
- package/lib/util/pluginUtils.js +0 -318
- package/lib/util/prefixSelector.js +0 -23
- package/lib/util/resolveConfig.js +0 -289
- package/lib/util/resolveConfigPath.js +0 -59
- package/lib/util/responsive.js +0 -18
- package/lib/util/tap.js +0 -11
- package/lib/util/toColorValue.js +0 -10
- package/lib/util/toPath.js +0 -11
- package/lib/util/transformThemeValue.js +0 -32
- package/lib/util/withAlphaVariable.js +0 -65
- package/nesting/README.md +0 -42
- package/nesting/index.js +0 -12
- package/nesting/plugin.js +0 -41
- package/peers/index.js +0 -87302
- package/plugin.js +0 -3
- package/prettier.config.js +0 -19
- package/resolveConfig.js +0 -7
- package/screens.css +0 -1
- package/scripts/create-plugin-list.js +0 -10
- package/scripts/install-integrations.js +0 -27
- package/scripts/rebuildFixtures.js +0 -68
- package/src/cli-peer-dependencies.js +0 -9
- package/src/cli.js +0 -759
- package/src/constants.js +0 -17
- package/src/corePluginList.js +0 -1
- package/src/corePlugins.js +0 -2228
- package/src/css/LICENSE +0 -25
- package/src/css/preflight.css +0 -354
- package/src/featureFlags.js +0 -48
- package/src/index.js +0 -34
- package/src/lib/collapseAdjacentRules.js +0 -39
- package/src/lib/evaluateTailwindFunctions.js +0 -195
- package/src/lib/expandApplyAtRules.js +0 -251
- package/src/lib/expandTailwindAtRules.js +0 -262
- package/src/lib/generateRules.js +0 -319
- package/src/lib/getModuleDependencies.js +0 -39
- package/src/lib/normalizeTailwindDirectives.js +0 -77
- package/src/lib/resolveDefaultsAtRules.js +0 -105
- package/src/lib/setupContextUtils.js +0 -639
- package/src/lib/setupTrackingContext.js +0 -181
- package/src/lib/setupWatchingContext.js +0 -306
- package/src/lib/sharedState.js +0 -13
- package/src/lib/substituteScreenAtRules.js +0 -16
- package/src/processTailwindFeatures.js +0 -41
- package/src/util/bigSign.js +0 -3
- package/src/util/buildMediaQuery.js +0 -24
- package/src/util/cloneDeep.js +0 -11
- package/src/util/cloneNodes.js +0 -11
- package/src/util/color.js +0 -56
- package/src/util/configurePlugins.js +0 -23
- package/src/util/createPlugin.js +0 -27
- package/src/util/createUtilityPlugin.js +0 -46
- package/src/util/defaults.js +0 -11
- package/src/util/escapeClassName.js +0 -8
- package/src/util/escapeCommas.js +0 -3
- package/src/util/flattenColorPalette.js +0 -13
- package/src/util/getAllConfigs.js +0 -19
- package/src/util/hashConfig.js +0 -5
- package/src/util/isKeyframeRule.js +0 -3
- package/src/util/isPlainObject.js +0 -8
- package/src/util/log.js +0 -28
- package/src/util/nameClass.js +0 -22
- package/src/util/negateValue.js +0 -14
- package/src/util/parseAnimationValue.js +0 -62
- package/src/util/parseDependency.js +0 -45
- package/src/util/parseObjectStyles.js +0 -19
- package/src/util/pluginUtils.js +0 -295
- package/src/util/prefixSelector.js +0 -15
- package/src/util/resolveConfig.js +0 -282
- package/src/util/resolveConfigPath.js +0 -55
- package/src/util/responsive.js +0 -10
- package/src/util/tap.js +0 -4
- package/src/util/toColorValue.js +0 -3
- package/src/util/toPath.js +0 -4
- package/src/util/transformThemeValue.js +0 -37
- package/src/util/withAlphaVariable.js +0 -44
- package/stubs/defaultConfig.stub.js +0 -884
- package/stubs/defaultPostCssConfig.stub.js +0 -6
- package/stubs/simpleConfig.stub.js +0 -8
- package/tailwind.css +0 -5
- package/variants.css +0 -1
package/lib/css/LICENSE
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) Nicolas Gallagher
|
|
4
|
-
Copyright (c) Jonathan Neal
|
|
5
|
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
6
|
-
Copyright (c) Adam Wathan
|
|
7
|
-
Copyright (c) Jonathan Reinink
|
|
8
|
-
|
|
9
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
-
in the Software without restriction, including without limitation the rights
|
|
12
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
-
furnished to do so, subject to the following conditions:
|
|
15
|
-
|
|
16
|
-
The above copyright notice and this permission notice shall be included in all
|
|
17
|
-
copies or substantial portions of the Software.
|
|
18
|
-
|
|
19
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
|
-
SOFTWARE.
|
package/lib/css/preflight.css
DELETED
|
@@ -1,354 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
|
3
|
-
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
*,
|
|
7
|
-
::before,
|
|
8
|
-
::after {
|
|
9
|
-
box-sizing: border-box; /* 1 */
|
|
10
|
-
border-width: 0; /* 2 */
|
|
11
|
-
border-style: solid; /* 2 */
|
|
12
|
-
border-color: currentColor; /* 2 */
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/*
|
|
16
|
-
1. Use a consistent sensible line-height in all browsers.
|
|
17
|
-
2. Prevent adjustments of font size after orientation changes in iOS.
|
|
18
|
-
3. Use a more readable tab size.
|
|
19
|
-
4. Use the user's configured `sans` font-family by default.
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
html {
|
|
23
|
-
line-height: 1.5; /* 1 */
|
|
24
|
-
-webkit-text-size-adjust: 100%; /* 2 */
|
|
25
|
-
-moz-tab-size: 4; /* 3 */
|
|
26
|
-
tab-size: 4; /* 3 */
|
|
27
|
-
font-family: theme('fontFamily.sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); /* 4 */
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/*
|
|
31
|
-
1. Remove the margin in all browsers.
|
|
32
|
-
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
|
-
body {
|
|
36
|
-
margin: 0; /* 1 */
|
|
37
|
-
line-height: inherit; /* 2 */
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/*
|
|
41
|
-
1. Add the correct height in Firefox.
|
|
42
|
-
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
|
|
43
|
-
3. Ensure horizontal rules are visible by default.
|
|
44
|
-
*/
|
|
45
|
-
|
|
46
|
-
hr {
|
|
47
|
-
height: 0; /* 1 */
|
|
48
|
-
color: inherit; /* 2 */
|
|
49
|
-
border-top-width: 1px; /* 3 */
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/*
|
|
53
|
-
Add the correct text decoration in Chrome, Edge, and Safari.
|
|
54
|
-
*/
|
|
55
|
-
|
|
56
|
-
abbr[title] {
|
|
57
|
-
text-decoration: underline dotted;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/*
|
|
61
|
-
Remove the default font size and weight for headings.
|
|
62
|
-
*/
|
|
63
|
-
|
|
64
|
-
h1,
|
|
65
|
-
h2,
|
|
66
|
-
h3,
|
|
67
|
-
h4,
|
|
68
|
-
h5,
|
|
69
|
-
h6 {
|
|
70
|
-
font-size: inherit;
|
|
71
|
-
font-weight: inherit;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/*
|
|
75
|
-
Reset links to optimize for opt-in styling instead of opt-out.
|
|
76
|
-
*/
|
|
77
|
-
|
|
78
|
-
a {
|
|
79
|
-
color: inherit;
|
|
80
|
-
text-decoration: inherit;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/*
|
|
84
|
-
Add the correct font weight in Edge and Safari.
|
|
85
|
-
*/
|
|
86
|
-
|
|
87
|
-
b,
|
|
88
|
-
strong {
|
|
89
|
-
font-weight: bolder;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/*
|
|
93
|
-
1. Use the user's configured `mono` font family by default.
|
|
94
|
-
2. Correct the odd `em` font sizing in all browsers.
|
|
95
|
-
*/
|
|
96
|
-
|
|
97
|
-
code,
|
|
98
|
-
kbd,
|
|
99
|
-
samp,
|
|
100
|
-
pre {
|
|
101
|
-
font-family: theme('fontFamily.mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace); /* 1 */
|
|
102
|
-
font-size: 1em; /* 2 */
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/*
|
|
106
|
-
Add the correct font size in all browsers.
|
|
107
|
-
*/
|
|
108
|
-
|
|
109
|
-
small {
|
|
110
|
-
font-size: 80%;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/*
|
|
114
|
-
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
|
|
115
|
-
*/
|
|
116
|
-
|
|
117
|
-
sub,
|
|
118
|
-
sup {
|
|
119
|
-
font-size: 75%;
|
|
120
|
-
line-height: 0;
|
|
121
|
-
position: relative;
|
|
122
|
-
vertical-align: baseline;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
sub {
|
|
126
|
-
bottom: -0.25em;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
sup {
|
|
130
|
-
top: -0.5em;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/*
|
|
134
|
-
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
|
|
135
|
-
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
|
|
136
|
-
3. Remove gaps between table borders by default.
|
|
137
|
-
*/
|
|
138
|
-
|
|
139
|
-
table {
|
|
140
|
-
text-indent: 0; /* 1 */
|
|
141
|
-
border-color: inherit; /* 2 */
|
|
142
|
-
border-collapse: collapse; /* 3 */
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/*
|
|
146
|
-
1. Change the font styles in all browsers.
|
|
147
|
-
2. Remove the margin in Firefox and Safari.
|
|
148
|
-
3. Remove default padding in all browsers.
|
|
149
|
-
*/
|
|
150
|
-
|
|
151
|
-
button,
|
|
152
|
-
input,
|
|
153
|
-
optgroup,
|
|
154
|
-
select,
|
|
155
|
-
textarea {
|
|
156
|
-
font-family: inherit; /* 1 */
|
|
157
|
-
font-size: 100%; /* 1 */
|
|
158
|
-
line-height: inherit; /* 1 */
|
|
159
|
-
color: inherit; /* 1 */
|
|
160
|
-
margin: 0; /* 2 */
|
|
161
|
-
padding: 0; /* 3 */
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/*
|
|
165
|
-
Remove the inheritance of text transform in Edge and Firefox.
|
|
166
|
-
*/
|
|
167
|
-
|
|
168
|
-
button,
|
|
169
|
-
select {
|
|
170
|
-
text-transform: none;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/*
|
|
174
|
-
1. Correct the inability to style clickable types in iOS and Safari.
|
|
175
|
-
2. Remove default button styles.
|
|
176
|
-
*/
|
|
177
|
-
|
|
178
|
-
button,
|
|
179
|
-
[type='button'],
|
|
180
|
-
[type='reset'],
|
|
181
|
-
[type='submit'] {
|
|
182
|
-
-webkit-appearance: button; /* 1 */
|
|
183
|
-
background-color: transparent; /* 2 */
|
|
184
|
-
background-image: none; /* 2 */
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
/*
|
|
188
|
-
Use the modern Firefox focus style for all focusable elements.
|
|
189
|
-
*/
|
|
190
|
-
|
|
191
|
-
:-moz-focusring {
|
|
192
|
-
outline: auto;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
/*
|
|
196
|
-
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
|
|
197
|
-
*/
|
|
198
|
-
|
|
199
|
-
:-moz-ui-invalid {
|
|
200
|
-
box-shadow: none;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
/*
|
|
204
|
-
Add the correct vertical alignment in Chrome and Firefox.
|
|
205
|
-
*/
|
|
206
|
-
|
|
207
|
-
progress {
|
|
208
|
-
vertical-align: baseline;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
/*
|
|
212
|
-
Correct the cursor style of increment and decrement buttons in Safari.
|
|
213
|
-
*/
|
|
214
|
-
|
|
215
|
-
::-webkit-inner-spin-button,
|
|
216
|
-
::-webkit-outer-spin-button {
|
|
217
|
-
height: auto;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/*
|
|
221
|
-
1. Correct the odd appearance in Chrome and Safari.
|
|
222
|
-
2. Correct the outline style in Safari.
|
|
223
|
-
*/
|
|
224
|
-
|
|
225
|
-
[type='search'] {
|
|
226
|
-
-webkit-appearance: textfield; /* 1 */
|
|
227
|
-
outline-offset: -2px; /* 2 */
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
/*
|
|
231
|
-
Remove the inner padding in Chrome and Safari on macOS.
|
|
232
|
-
*/
|
|
233
|
-
|
|
234
|
-
::-webkit-search-decoration {
|
|
235
|
-
-webkit-appearance: none;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
/*
|
|
239
|
-
1. Correct the inability to style clickable types in iOS and Safari.
|
|
240
|
-
2. Change font properties to `inherit` in Safari.
|
|
241
|
-
*/
|
|
242
|
-
|
|
243
|
-
::-webkit-file-upload-button {
|
|
244
|
-
-webkit-appearance: button; /* 1 */
|
|
245
|
-
font: inherit; /* 2 */
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
/*
|
|
249
|
-
Add the correct display in Chrome and Safari.
|
|
250
|
-
*/
|
|
251
|
-
|
|
252
|
-
summary {
|
|
253
|
-
display: list-item;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
/*
|
|
257
|
-
Removes the default spacing and border for appropriate elements.
|
|
258
|
-
*/
|
|
259
|
-
|
|
260
|
-
blockquote,
|
|
261
|
-
dl,
|
|
262
|
-
dd,
|
|
263
|
-
h1,
|
|
264
|
-
h2,
|
|
265
|
-
h3,
|
|
266
|
-
h4,
|
|
267
|
-
h5,
|
|
268
|
-
h6,
|
|
269
|
-
hr,
|
|
270
|
-
figure,
|
|
271
|
-
p,
|
|
272
|
-
pre {
|
|
273
|
-
margin: 0;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
fieldset {
|
|
277
|
-
margin: 0;
|
|
278
|
-
padding: 0;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
legend {
|
|
282
|
-
padding: 0;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
ol,
|
|
286
|
-
ul {
|
|
287
|
-
list-style: none;
|
|
288
|
-
margin: 0;
|
|
289
|
-
padding: 0;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
/*
|
|
293
|
-
Prevent resizing textareas horizontally by default.
|
|
294
|
-
*/
|
|
295
|
-
|
|
296
|
-
textarea {
|
|
297
|
-
resize: vertical;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
/*
|
|
301
|
-
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
|
|
302
|
-
2. Set the default placeholder color to the user's configured gray 400 color.
|
|
303
|
-
*/
|
|
304
|
-
|
|
305
|
-
input::placeholder,
|
|
306
|
-
textarea::placeholder {
|
|
307
|
-
opacity: 1; /* 1 */
|
|
308
|
-
color: theme('colors.gray.400', #9ca3af); /* 2 */
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
/*
|
|
312
|
-
Set the default cursor for buttons.
|
|
313
|
-
*/
|
|
314
|
-
|
|
315
|
-
button,
|
|
316
|
-
[role="button"] {
|
|
317
|
-
cursor: pointer;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
/*
|
|
321
|
-
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
|
|
322
|
-
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
|
|
323
|
-
This can trigger a poorly considered lint error in some tools but is included by design.
|
|
324
|
-
*/
|
|
325
|
-
|
|
326
|
-
img,
|
|
327
|
-
svg,
|
|
328
|
-
video,
|
|
329
|
-
canvas,
|
|
330
|
-
audio,
|
|
331
|
-
iframe,
|
|
332
|
-
embed,
|
|
333
|
-
object {
|
|
334
|
-
display: block; /* 1 */
|
|
335
|
-
vertical-align: middle; /* 2 */
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
/*
|
|
339
|
-
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
|
|
340
|
-
*/
|
|
341
|
-
|
|
342
|
-
img,
|
|
343
|
-
video {
|
|
344
|
-
max-width: 100%;
|
|
345
|
-
height: auto;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
/*
|
|
349
|
-
Ensure the default browser behavior of the `hidden` attribute.
|
|
350
|
-
*/
|
|
351
|
-
|
|
352
|
-
[hidden] {
|
|
353
|
-
display: none;
|
|
354
|
-
}
|
package/lib/featureFlags.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.flagEnabled = flagEnabled;
|
|
7
|
-
exports.issueFlagNotices = issueFlagNotices;
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _chalk = _interopRequireDefault(require("chalk"));
|
|
11
|
-
|
|
12
|
-
var _log = _interopRequireDefault(require("./util/log"));
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
const featureFlags = {
|
|
17
|
-
future: [],
|
|
18
|
-
experimental: ['optimizeUniversalDefaults']
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
function flagEnabled(config, flag) {
|
|
22
|
-
if (featureFlags.future.includes(flag)) {
|
|
23
|
-
var _config$future$flag, _config$future;
|
|
24
|
-
|
|
25
|
-
return config.future === 'all' || ((_config$future$flag = config === null || config === void 0 ? void 0 : (_config$future = config.future) === null || _config$future === void 0 ? void 0 : _config$future[flag]) !== null && _config$future$flag !== void 0 ? _config$future$flag : false);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
if (featureFlags.experimental.includes(flag)) {
|
|
29
|
-
var _config$experimental$, _config$experimental;
|
|
30
|
-
|
|
31
|
-
return config.experimental === 'all' || ((_config$experimental$ = config === null || config === void 0 ? void 0 : (_config$experimental = config.experimental) === null || _config$experimental === void 0 ? void 0 : _config$experimental[flag]) !== null && _config$experimental$ !== void 0 ? _config$experimental$ : false);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function experimentalFlagsEnabled(config) {
|
|
38
|
-
var _config$experimental2;
|
|
39
|
-
|
|
40
|
-
if (config.experimental === 'all') {
|
|
41
|
-
return featureFlags.experimental;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
return Object.keys((_config$experimental2 = config === null || config === void 0 ? void 0 : config.experimental) !== null && _config$experimental2 !== void 0 ? _config$experimental2 : {}).filter(flag => featureFlags.experimental.includes(flag) && config.experimental[flag]);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function issueFlagNotices(config) {
|
|
48
|
-
if (process.env.JEST_WORKER_ID !== undefined) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (experimentalFlagsEnabled(config).length > 0) {
|
|
53
|
-
const changes = experimentalFlagsEnabled(config).map(s => _chalk.default.yellow(s)).join(', ');
|
|
54
|
-
|
|
55
|
-
_log.default.warn([`You have enabled experimental features: ${changes}`, 'Experimental features are not covered by semver, may introduce breaking changes, and can change at any time.']);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
var _default = featureFlags;
|
|
60
|
-
exports.default = _default;
|
package/lib/index.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _setupTrackingContext = _interopRequireDefault(require("./lib/setupTrackingContext"));
|
|
4
|
-
|
|
5
|
-
var _setupWatchingContext = _interopRequireDefault(require("./lib/setupWatchingContext"));
|
|
6
|
-
|
|
7
|
-
var _processTailwindFeatures = _interopRequireDefault(require("./processTailwindFeatures"));
|
|
8
|
-
|
|
9
|
-
var _sharedState = require("./lib/sharedState");
|
|
10
|
-
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
|
|
13
|
-
module.exports = function tailwindcss(configOrPath) {
|
|
14
|
-
return {
|
|
15
|
-
postcssPlugin: 'tailwindcss',
|
|
16
|
-
plugins: [_sharedState.env.DEBUG && function (root) {
|
|
17
|
-
console.log('\n');
|
|
18
|
-
console.time('JIT TOTAL');
|
|
19
|
-
return root;
|
|
20
|
-
}, function (root, result) {
|
|
21
|
-
let setupContext = _sharedState.env.TAILWIND_MODE === 'watch' ? (0, _setupWatchingContext.default)(configOrPath) : (0, _setupTrackingContext.default)(configOrPath);
|
|
22
|
-
(0, _processTailwindFeatures.default)(setupContext)(root, result);
|
|
23
|
-
}, _sharedState.env.DEBUG && function (root) {
|
|
24
|
-
console.timeEnd('JIT TOTAL');
|
|
25
|
-
console.log('\n');
|
|
26
|
-
return root;
|
|
27
|
-
}].filter(Boolean)
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
module.exports.postcss = true;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = collapseAdjacentRules;
|
|
7
|
-
let comparisonMap = {
|
|
8
|
-
atrule: ['name', 'params'],
|
|
9
|
-
rule: ['selector']
|
|
10
|
-
};
|
|
11
|
-
let types = new Set(Object.keys(comparisonMap));
|
|
12
|
-
|
|
13
|
-
function collapseAdjacentRules() {
|
|
14
|
-
return root => {
|
|
15
|
-
let currentRule = null;
|
|
16
|
-
root.each(node => {
|
|
17
|
-
if (!types.has(node.type)) {
|
|
18
|
-
currentRule = null;
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (currentRule === null) {
|
|
23
|
-
currentRule = node;
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
let properties = comparisonMap[node.type];
|
|
28
|
-
|
|
29
|
-
if (node.type === 'atrule' && node.name === 'font-face') {
|
|
30
|
-
currentRule = node;
|
|
31
|
-
} else if (properties.every(property => {
|
|
32
|
-
var _node$property, _currentRule$property;
|
|
33
|
-
|
|
34
|
-
return ((_node$property = node[property]) !== null && _node$property !== void 0 ? _node$property : '').replace(/\s+/g, ' ') === ((_currentRule$property = currentRule[property]) !== null && _currentRule$property !== void 0 ? _currentRule$property : '').replace(/\s+/g, ' ');
|
|
35
|
-
})) {
|
|
36
|
-
currentRule.append(node.nodes);
|
|
37
|
-
node.remove();
|
|
38
|
-
} else {
|
|
39
|
-
currentRule = node;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
}
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = _default;
|
|
7
|
-
|
|
8
|
-
var _dlv = _interopRequireDefault(require("dlv"));
|
|
9
|
-
|
|
10
|
-
var _didyoumean = _interopRequireDefault(require("didyoumean"));
|
|
11
|
-
|
|
12
|
-
var _transformThemeValue = _interopRequireDefault(require("../util/transformThemeValue"));
|
|
13
|
-
|
|
14
|
-
var _postcssValueParser = _interopRequireDefault(require("postcss-value-parser"));
|
|
15
|
-
|
|
16
|
-
var _buildMediaQuery = _interopRequireDefault(require("../util/buildMediaQuery"));
|
|
17
|
-
|
|
18
|
-
var _toPath = require("../util/toPath");
|
|
19
|
-
|
|
20
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
|
-
function isObject(input) {
|
|
23
|
-
return typeof input === 'object' && input !== null;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function findClosestExistingPath(theme, path) {
|
|
27
|
-
let parts = (0, _toPath.toPath)(path);
|
|
28
|
-
|
|
29
|
-
do {
|
|
30
|
-
parts.pop();
|
|
31
|
-
if ((0, _dlv.default)(theme, parts) !== undefined) break;
|
|
32
|
-
} while (parts.length);
|
|
33
|
-
|
|
34
|
-
return parts.length ? parts : undefined;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function pathToString(path) {
|
|
38
|
-
if (typeof path === 'string') return path;
|
|
39
|
-
return path.reduce((acc, cur, i) => {
|
|
40
|
-
if (cur.includes('.')) return `${acc}[${cur}]`;
|
|
41
|
-
return i === 0 ? cur : `${acc}.${cur}`;
|
|
42
|
-
}, '');
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function list(items) {
|
|
46
|
-
return items.map(key => `'${key}'`).join(', ');
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function listKeys(obj) {
|
|
50
|
-
return list(Object.keys(obj));
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function validatePath(config, path, defaultValue) {
|
|
54
|
-
const pathString = Array.isArray(path) ? pathToString(path) : path.replace(/^['"]+/g, '').replace(/['"]+$/g, '');
|
|
55
|
-
const pathSegments = Array.isArray(path) ? path : (0, _toPath.toPath)(pathString);
|
|
56
|
-
const value = (0, _dlv.default)(config.theme, pathString, defaultValue);
|
|
57
|
-
|
|
58
|
-
if (value === undefined) {
|
|
59
|
-
let error = `'${pathString}' does not exist in your theme config.`;
|
|
60
|
-
const parentSegments = pathSegments.slice(0, -1);
|
|
61
|
-
const parentValue = (0, _dlv.default)(config.theme, parentSegments);
|
|
62
|
-
|
|
63
|
-
if (isObject(parentValue)) {
|
|
64
|
-
const validKeys = Object.keys(parentValue).filter(key => validatePath(config, [...parentSegments, key]).isValid);
|
|
65
|
-
const suggestion = (0, _didyoumean.default)(pathSegments[pathSegments.length - 1], validKeys);
|
|
66
|
-
|
|
67
|
-
if (suggestion) {
|
|
68
|
-
error += ` Did you mean '${pathToString([...parentSegments, suggestion])}'?`;
|
|
69
|
-
} else if (validKeys.length > 0) {
|
|
70
|
-
error += ` '${pathToString(parentSegments)}' has the following valid keys: ${list(validKeys)}`;
|
|
71
|
-
}
|
|
72
|
-
} else {
|
|
73
|
-
const closestPath = findClosestExistingPath(config.theme, pathString);
|
|
74
|
-
|
|
75
|
-
if (closestPath) {
|
|
76
|
-
const closestValue = (0, _dlv.default)(config.theme, closestPath);
|
|
77
|
-
|
|
78
|
-
if (isObject(closestValue)) {
|
|
79
|
-
error += ` '${pathToString(closestPath)}' has the following keys: ${listKeys(closestValue)}`;
|
|
80
|
-
} else {
|
|
81
|
-
error += ` '${pathToString(closestPath)}' is not an object.`;
|
|
82
|
-
}
|
|
83
|
-
} else {
|
|
84
|
-
error += ` Your theme has the following top-level keys: ${listKeys(config.theme)}`;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
return {
|
|
89
|
-
isValid: false,
|
|
90
|
-
error
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
if (!(typeof value === 'string' || typeof value === 'number' || typeof value === 'function' || value instanceof String || value instanceof Number || Array.isArray(value))) {
|
|
95
|
-
let error = `'${pathString}' was found but does not resolve to a string.`;
|
|
96
|
-
|
|
97
|
-
if (isObject(value)) {
|
|
98
|
-
let validKeys = Object.keys(value).filter(key => validatePath(config, [...pathSegments, key]).isValid);
|
|
99
|
-
|
|
100
|
-
if (validKeys.length) {
|
|
101
|
-
error += ` Did you mean something like '${pathToString([...pathSegments, validKeys[0]])}'?`;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
return {
|
|
106
|
-
isValid: false,
|
|
107
|
-
error
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
const [themeSection] = pathSegments;
|
|
112
|
-
return {
|
|
113
|
-
isValid: true,
|
|
114
|
-
value: (0, _transformThemeValue.default)(themeSection)(value)
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function extractArgs(node, vNodes, functions) {
|
|
119
|
-
vNodes = vNodes.map(vNode => resolveVNode(node, vNode, functions));
|
|
120
|
-
let args = [''];
|
|
121
|
-
|
|
122
|
-
for (let vNode of vNodes) {
|
|
123
|
-
if (vNode.type === 'div' && vNode.value === ',') {
|
|
124
|
-
args.push('');
|
|
125
|
-
} else {
|
|
126
|
-
args[args.length - 1] += _postcssValueParser.default.stringify(vNode);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
return args;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
function resolveVNode(node, vNode, functions) {
|
|
134
|
-
if (vNode.type === 'function' && functions[vNode.value] !== undefined) {
|
|
135
|
-
let args = extractArgs(node, vNode.nodes, functions);
|
|
136
|
-
vNode.type = 'word';
|
|
137
|
-
vNode.value = functions[vNode.value](node, ...args);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
return vNode;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
function resolveFunctions(node, input, functions) {
|
|
144
|
-
return (0, _postcssValueParser.default)(input).walk(vNode => {
|
|
145
|
-
resolveVNode(node, vNode, functions);
|
|
146
|
-
}).toString();
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
let nodeTypePropertyMap = {
|
|
150
|
-
atrule: 'params',
|
|
151
|
-
decl: 'value'
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
function _default({
|
|
155
|
-
tailwindConfig: config
|
|
156
|
-
}) {
|
|
157
|
-
let functions = {
|
|
158
|
-
theme: (node, path, ...defaultValue) => {
|
|
159
|
-
const {
|
|
160
|
-
isValid,
|
|
161
|
-
value,
|
|
162
|
-
error
|
|
163
|
-
} = validatePath(config, path, defaultValue.length ? defaultValue : undefined);
|
|
164
|
-
|
|
165
|
-
if (!isValid) {
|
|
166
|
-
throw node.error(error);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
return value;
|
|
170
|
-
},
|
|
171
|
-
screen: (node, screen) => {
|
|
172
|
-
screen = screen.replace(/^['"]+/g, '').replace(/['"]+$/g, '');
|
|
173
|
-
|
|
174
|
-
if (config.theme.screens[screen] === undefined) {
|
|
175
|
-
throw node.error(`The '${screen}' screen does not exist in your theme.`);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
return (0, _buildMediaQuery.default)(config.theme.screens[screen]);
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
return root => {
|
|
182
|
-
root.walk(node => {
|
|
183
|
-
let property = nodeTypePropertyMap[node.type];
|
|
184
|
-
|
|
185
|
-
if (property === undefined) {
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
node[property] = resolveFunctions(node, node[property], functions);
|
|
190
|
-
});
|
|
191
|
-
};
|
|
192
|
-
}
|