tailwindcss 3.0.0 → 3.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.
@@ -71,6 +71,8 @@ function extractElementSelector(selector) {
71
71
  export default function resolveDefaultsAtRules({ tailwindConfig }) {
72
72
  return (root) => {
73
73
  let variableNodeMap = new Map()
74
+
75
+ /** @type {Set<import('postcss').AtRule>} */
74
76
  let universals = new Set()
75
77
 
76
78
  root.walkAtRules('defaults', (rule) => {
@@ -90,31 +92,50 @@ export default function resolveDefaultsAtRules({ tailwindConfig }) {
90
92
  })
91
93
 
92
94
  for (let universal of universals) {
93
- let selectors = new Set()
95
+ /** @type {Map<string, Set<string>>} */
96
+ let selectorGroups = new Map()
94
97
 
95
98
  let rules = variableNodeMap.get(universal.params) ?? []
96
99
 
97
100
  for (let rule of rules) {
98
101
  for (let selector of extractElementSelector(rule.selector)) {
102
+ // If selector contains a vendor prefix after a pseudo element or class,
103
+ // we consider them separately because merging the declarations into
104
+ // a single rule will cause browsers that do not understand the
105
+ // vendor prefix to throw out the whole rule
106
+ let selectorGroupName =
107
+ selector.includes(':-') || selector.includes('::-') ? selector : '__DEFAULT__'
108
+
109
+ let selectors = selectorGroups.get(selectorGroupName) ?? new Set()
110
+ selectorGroups.set(selectorGroupName, selectors)
111
+
99
112
  selectors.add(selector)
100
113
  }
101
114
  }
102
115
 
103
- if (selectors.size === 0) {
116
+ if (selectorGroups.size === 0) {
104
117
  universal.remove()
105
118
  continue
106
119
  }
107
120
 
108
- let universalRule = postcss.rule()
109
-
110
121
  if (flagEnabled(tailwindConfig, 'optimizeUniversalDefaults')) {
111
- universalRule.selectors = [...selectors]
122
+ for (let [, selectors] of selectorGroups) {
123
+ let universalRule = postcss.rule()
124
+
125
+ universalRule.selectors = [...selectors]
126
+
127
+ universalRule.append(universal.nodes.map((node) => node.clone()))
128
+ universal.before(universalRule)
129
+ }
112
130
  } else {
131
+ let universalRule = postcss.rule()
132
+
113
133
  universalRule.selectors = ['*', '::before', '::after']
134
+
135
+ universalRule.append(universal.nodes)
136
+ universal.before(universalRule)
114
137
  }
115
138
 
116
- universalRule.append(universal.nodes)
117
- universal.before(universalRule)
118
139
  universal.remove()
119
140
  }
120
141
  }
package/peers/.svgo.yml DELETED
@@ -1,75 +0,0 @@
1
- # replace default config
2
-
3
- # multipass: true
4
- # full: true
5
-
6
- plugins:
7
-
8
- # - name
9
- #
10
- # or:
11
- # - name: false
12
- # - name: true
13
- #
14
- # or:
15
- # - name:
16
- # param1: 1
17
- # param2: 2
18
-
19
- - removeDoctype
20
- - removeXMLProcInst
21
- - removeComments
22
- - removeMetadata
23
- - removeXMLNS
24
- - removeEditorsNSData
25
- - cleanupAttrs
26
- - inlineStyles
27
- - minifyStyles
28
- - convertStyleToAttrs
29
- - cleanupIDs
30
- - prefixIds
31
- - removeRasterImages
32
- - removeUselessDefs
33
- - cleanupNumericValues
34
- - cleanupListOfValues
35
- - convertColors
36
- - removeUnknownsAndDefaults
37
- - removeNonInheritableGroupAttrs
38
- - removeUselessStrokeAndFill
39
- - removeViewBox
40
- - cleanupEnableBackground
41
- - removeHiddenElems
42
- - removeEmptyText
43
- - convertShapeToPath
44
- - convertEllipseToCircle
45
- - moveElemsAttrsToGroup
46
- - moveGroupAttrsToElems
47
- - collapseGroups
48
- - convertPathData
49
- - convertTransform
50
- - removeEmptyAttrs
51
- - removeEmptyContainers
52
- - mergePaths
53
- - removeUnusedNS
54
- - sortAttrs
55
- - sortDefsChildren
56
- - removeTitle
57
- - removeDesc
58
- - removeDimensions
59
- - removeAttrs
60
- - removeAttributesBySelector
61
- - removeElementsByAttr
62
- - addClassesToSVGElement
63
- - removeStyleElement
64
- - removeScriptElement
65
- - addAttributesToSVGElement
66
- - removeOffCanvasPaths
67
- - reusePaths
68
-
69
- # configure the indent (default 4 spaces) used by `--pretty` here:
70
- #
71
- # @see https://github.com/svg/svgo/blob/master/lib/svgo/js2svg.js#L6 for more config options
72
- #
73
- # js2svg:
74
- # pretty: true
75
- # indent: ' '
@@ -1,299 +0,0 @@
1
- [
2
- "all",
3
- "display",
4
- "position",
5
- "top",
6
- "right",
7
- "bottom",
8
- "left",
9
- "offset-inline-start",
10
- "offset-inline-end",
11
- "offset-block-start",
12
- "offset-block-end",
13
- "grid",
14
- "grid-area",
15
- "grid-auto-columns",
16
- "grid-auto-flow",
17
- "grid-auto-rows",
18
- "grid-column",
19
- "grid-column-end",
20
- "grid-column-start",
21
- "grid-row",
22
- "grid-row-end",
23
- "grid-row-start",
24
- "grid-template",
25
- "grid-template-areas",
26
- "grid-template-columns",
27
- "grid-template-rows",
28
- "flex",
29
- "flex-basis",
30
- "flex-direction",
31
- "flex-flow",
32
- "flex-grow",
33
- "flex-shrink",
34
- "flex-wrap",
35
- "box-decoration-break",
36
- "place-content",
37
- "place-items",
38
- "place-self",
39
- "align-content",
40
- "align-items",
41
- "align-self",
42
- "justify-content",
43
- "justify-items",
44
- "justify-self",
45
- "vertical-align",
46
- "order",
47
- "float",
48
- "clear",
49
- "shape-margin",
50
- "shape-outside",
51
- "shape-image-threshold",
52
- "orphans",
53
- "columns",
54
- "column-gap",
55
- "column-fill",
56
- "column-rule",
57
- "column-rule-color",
58
- "column-rule-style",
59
- "column-rule-width",
60
- "column-span",
61
- "column-count",
62
- "column-width",
63
- "break-before",
64
- "break-after",
65
- "break-inside",
66
- "page-break-before",
67
- "page-break-after",
68
- "page-break-inside",
69
- "transform",
70
- "transform-box",
71
- "transform-origin",
72
- "transform-style",
73
- "rotate",
74
- "scale",
75
-
76
- "perspective",
77
- "perspective-origin",
78
- "visibility",
79
- "opacity",
80
- "z-index",
81
- "mix-blend-mode",
82
- "backface-visibility",
83
- "backdrop-filter",
84
- "clip-path",
85
- "mask",
86
- "mask-clip",
87
- "mask-image",
88
- "mask-origin",
89
- "mask-position",
90
- "mask-repeat",
91
- "mask-size",
92
- "mask-type",
93
- "filter",
94
- "animation",
95
- "animation-name",
96
- "animation-duration",
97
- "animation-fill-mode",
98
- "animation-play-state",
99
- "animation-timing-function",
100
- "animation-delay",
101
- "animation-iteration-count",
102
- "animation-direction",
103
- "transition",
104
- "transition-delay",
105
- "transition-duration",
106
- "transition-property",
107
- "transition-timing-function",
108
- "will-change",
109
- "counter-increment",
110
- "counter-reset",
111
- "cursor",
112
-
113
- "box-sizing",
114
- "margin",
115
- "margin-top",
116
- "margin-right",
117
- "margin-bottom",
118
- "margin-left",
119
- "margin-inline-start",
120
- "margin-inline-end",
121
- "margin-block-start",
122
- "margin-block-end",
123
- "outline",
124
- "outline-color",
125
- "outline-offset",
126
- "outline-style",
127
- "outline-width",
128
- "box-shadow",
129
- "border",
130
- "border-top",
131
- "border-right",
132
- "border-bottom",
133
- "border-left",
134
- "border-width",
135
- "border-top-width",
136
- "border-right-width",
137
- "border-bottom-width",
138
- "border-left-width",
139
- "border-style",
140
- "border-top-style",
141
- "border-right-style",
142
- "border-bottom-style",
143
- "border-left-style",
144
- "border-radius",
145
- "border-top-right-radius",
146
- "border-top-left-radius",
147
- "border-bottom-right-radius",
148
- "border-bottom-left-radius",
149
- "border-color",
150
- "border-top-color",
151
- "border-right-color",
152
- "border-bottom-color",
153
- "border-left-color",
154
- "border-inline-start",
155
- "border-inline-start-color",
156
- "border-inline-start-style",
157
- "border-inline-start-width",
158
- "border-inline-end",
159
- "border-inline-end-color",
160
- "border-inline-end-style",
161
- "border-inline-end-width",
162
- "border-block-start",
163
- "border-block-start-color",
164
- "border-block-start-style",
165
- "border-block-start-width",
166
- "border-block-end",
167
- "border-block-end-color",
168
- "border-block-end-style",
169
- "border-block-end-width",
170
- "border-image",
171
- "border-image-outset",
172
- "border-image-repeat",
173
- "border-image-slice",
174
- "border-image-source",
175
- "border-image-width",
176
- "border-collapse",
177
- "border-spacing",
178
- "background",
179
- "background-attachment",
180
- "background-blend-mode",
181
- "background-clip",
182
- "background-color",
183
- "background-image",
184
- "background-origin",
185
- "background-position",
186
- "background-position-x",
187
- "background-position-y",
188
- "background-repeat",
189
- "background-size",
190
- "isolation",
191
- "padding",
192
- "padding-top",
193
- "padding-right",
194
- "padding-bottom",
195
- "padding-left",
196
- "padding-inline-start",
197
- "padding-inline-end",
198
- "padding-block-start",
199
- "padding-block-end",
200
- "image-orientation",
201
- "image-rendering",
202
-
203
- "width",
204
- "min-width",
205
- "max-width",
206
- "height",
207
- "min-height",
208
- "max-height",
209
- "inline-size",
210
- "min-inline-size",
211
- "max-inline-size",
212
- "block-size",
213
- "min-block-size",
214
- "max-block-size",
215
- "table-layout",
216
- "caption-side",
217
- "empty-cells",
218
- "overflow",
219
- "overflow-x",
220
- "overflow-y",
221
- "resize",
222
- "object-fit",
223
- "object-position",
224
- "scroll-behavior",
225
- "scroll-snap-coordinate",
226
- "scroll-snap-destination",
227
- "scroll-snap-type",
228
- "touch-action",
229
- "pointer-events",
230
-
231
- "ruby-align",
232
- "ruby-position",
233
- "color",
234
- "caret-color",
235
- "font",
236
- "font-family",
237
- "font-feature-settings",
238
- "font-kerning",
239
- "font-language-override",
240
- "font-size",
241
- "font-optical-sizing",
242
- "font-size-adjust",
243
- "font-stretch",
244
- "font-style",
245
- "font-synthesis",
246
- "font-variant",
247
- "font-variant-alternates",
248
- "font-variant-caps",
249
- "font-variant-east-asian",
250
- "font-variant-ligatures",
251
- "font-variant-numeric",
252
- "font-variant-position",
253
- "font-weight",
254
- "hyphens",
255
- "initial-letter",
256
- "initial-letter-align",
257
- "letter-spacing",
258
- "line-break",
259
- "line-height",
260
- "list-style",
261
- "list-style-image",
262
- "list-style-position",
263
- "list-style-type",
264
- "writing-mode",
265
- "direction",
266
- "unicode-bidi",
267
- "unicode-range",
268
- "user-select",
269
- "text-combine-upright",
270
- "text-align",
271
- "text-align-last",
272
- "text-decoration",
273
- "text-decoration-color",
274
- "text-decoration-line",
275
- "text-decoration-skip",
276
- "text-decoration-style",
277
- "text-decoration-skip-ink",
278
- "text-emphasis",
279
- "text-emphasis-position",
280
- "text-emphasis-color",
281
- "text-emphasis-style",
282
- "text-indent",
283
- "text-justify",
284
- "text-underline-position",
285
- "text-orientation",
286
- "text-overflow",
287
- "text-rendering",
288
- "text-shadow",
289
- "text-size-adjust",
290
- "text-transform",
291
- "white-space",
292
- "word-break",
293
- "word-spacing",
294
- "overflow-wrap",
295
- "quotes",
296
- "tab-size",
297
- "content",
298
- "widows"
299
- ]