Skip to content

Commit e2063ba

Browse files
authored
postcss-is-pseudo-class : fix not pseudo interaction (#828)
1 parent b768e8b commit e2063ba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+546
-3193
lines changed

plugin-packs/postcss-preset-env/test/basic.autoprefixer.expect.css

+2-14
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
}
8888
}
8989

90-
@custom-selector :--heading h1, h2, h3, h4, h5, h6;
90+
@custom-selector :--heading h1, h2, h3, h4, h5, h6, .heading-7;
9191

9292
.test-custom-selectors:--heading {
9393
order:12;
@@ -262,19 +262,7 @@
262262
background-color: yellow;
263263
}
264264

265-
.a:focus {
266-
order: 27;
267-
}
268-
269-
.a:hover {
270-
order: 27;
271-
}
272-
273-
.b:focus {
274-
order: 27;
275-
}
276-
277-
.b:hover {
265+
.a:focus, .a:hover, .b:focus, .b:hover {
278266
order: 27;
279267
}
280268

plugin-packs/postcss-preset-env/test/basic.autoprefixer.false.expect.css

+2-14
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
}
8888
}
8989

90-
@custom-selector :--heading h1, h2, h3, h4, h5, h6;
90+
@custom-selector :--heading h1, h2, h3, h4, h5, h6, .heading-7;
9191

9292
.test-custom-selectors:--heading {
9393
order:12;
@@ -262,19 +262,7 @@
262262
background-color: yellow;
263263
}
264264

265-
.a:focus {
266-
order: 27;
267-
}
268-
269-
.a:hover {
270-
order: 27;
271-
}
272-
273-
.b:focus {
274-
order: 27;
275-
}
276-
277-
.b:hover {
265+
.a:focus, .a:hover, .b:focus, .b:hover {
278266
order: 27;
279267
}
280268

plugin-packs/postcss-preset-env/test/basic.ch38.expect.css

+2-14
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
}
8181
}
8282

83-
@custom-selector :--heading h1, h2, h3, h4, h5, h6;
83+
@custom-selector :--heading h1, h2, h3, h4, h5, h6, .heading-7;
8484

8585
.test-custom-selectors:--heading {
8686
order:12;
@@ -173,19 +173,7 @@
173173
background-color: yellow;
174174
}
175175

176-
.a:focus {
177-
order: 27;
178-
}
179-
180-
.a:hover {
181-
order: 27;
182-
}
183-
184-
.b:focus {
185-
order: 27;
186-
}
187-
188-
.b:hover {
176+
.a:focus, .a:hover, .b:focus, .b:hover {
189177
order: 27;
190178
}
191179

plugin-packs/postcss-preset-env/test/basic.ch88-ff78-saf10.expect.css

+2-34
Original file line numberDiff line numberDiff line change
@@ -87,27 +87,7 @@
8787
}
8888
}
8989

90-
h1.test-custom-selectors {
91-
order:12;
92-
}
93-
94-
h2.test-custom-selectors {
95-
order:12;
96-
}
97-
98-
h3.test-custom-selectors {
99-
order:12;
100-
}
101-
102-
h4.test-custom-selectors {
103-
order:12;
104-
}
105-
106-
h5.test-custom-selectors {
107-
order:12;
108-
}
109-
110-
h6.test-custom-selectors {
90+
h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.does-not-exist), h3.test-custom-selectors:not(.does-not-exist), h4.test-custom-selectors:not(.does-not-exist), h5.test-custom-selectors:not(.does-not-exist), h6.test-custom-selectors:not(.does-not-exist), .test-custom-selectors.heading-7 {
11191
order:12;
11292
}
11393

@@ -193,19 +173,7 @@ h6.test-custom-selectors {
193173
background-color: yellow;
194174
}
195175

196-
.a:focus {
197-
order: 27;
198-
}
199-
200-
.a:hover {
201-
order: 27;
202-
}
203-
204-
.b:focus {
205-
order: 27;
206-
}
207-
208-
.b:hover {
176+
.a:focus, .a:hover, .b:focus, .b:hover {
209177
order: 27;
210178
}
211179

plugin-packs/postcss-preset-env/test/basic.ch88-ff78.expect.css

+2-34
Original file line numberDiff line numberDiff line change
@@ -87,27 +87,7 @@
8787
}
8888
}
8989

90-
h1.test-custom-selectors {
91-
order:12;
92-
}
93-
94-
h2.test-custom-selectors {
95-
order:12;
96-
}
97-
98-
h3.test-custom-selectors {
99-
order:12;
100-
}
101-
102-
h4.test-custom-selectors {
103-
order:12;
104-
}
105-
106-
h5.test-custom-selectors {
107-
order:12;
108-
}
109-
110-
h6.test-custom-selectors {
90+
h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.does-not-exist), h3.test-custom-selectors:not(.does-not-exist), h4.test-custom-selectors:not(.does-not-exist), h5.test-custom-selectors:not(.does-not-exist), h6.test-custom-selectors:not(.does-not-exist), .test-custom-selectors.heading-7 {
11191
order:12;
11292
}
11393

@@ -193,19 +173,7 @@ h6.test-custom-selectors {
193173
background-color: yellow;
194174
}
195175

196-
.a:focus {
197-
order: 27;
198-
}
199-
200-
.a:hover {
201-
order: 27;
202-
}
203-
204-
.b:focus {
205-
order: 27;
206-
}
207-
208-
.b:hover {
176+
.a:focus, .a:hover, .b:focus, .b:hover {
209177
order: 27;
210178
}
211179

plugin-packs/postcss-preset-env/test/basic.ch88-ff78.no-is-pseudo.expect.css

+2-34
Original file line numberDiff line numberDiff line change
@@ -87,27 +87,7 @@
8787
}
8888
}
8989

90-
h1.test-custom-selectors {
91-
order:12;
92-
}
93-
94-
h2.test-custom-selectors {
95-
order:12;
96-
}
97-
98-
h3.test-custom-selectors {
99-
order:12;
100-
}
101-
102-
h4.test-custom-selectors {
103-
order:12;
104-
}
105-
106-
h5.test-custom-selectors {
107-
order:12;
108-
}
109-
110-
h6.test-custom-selectors {
90+
h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.does-not-exist), h3.test-custom-selectors:not(.does-not-exist), h4.test-custom-selectors:not(.does-not-exist), h5.test-custom-selectors:not(.does-not-exist), h6.test-custom-selectors:not(.does-not-exist), .test-custom-selectors.heading-7 {
11191
order:12;
11292
}
11393

@@ -193,19 +173,7 @@ h6.test-custom-selectors {
193173
background-color: yellow;
194174
}
195175

196-
.a:focus {
197-
order: 27;
198-
}
199-
200-
.a:hover {
201-
order: 27;
202-
}
203-
204-
.b:focus {
205-
order: 27;
206-
}
207-
208-
.b:hover {
176+
.a:focus, .a:hover, .b:focus, .b:hover {
209177
order: 27;
210178
}
211179

plugin-packs/postcss-preset-env/test/basic.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
}
7575
}
7676

77-
@custom-selector :--heading h1, h2, h3, h4, h5, h6;
77+
@custom-selector :--heading h1, h2, h3, h4, h5, h6, .heading-7;
7878

7979
.test-custom-selectors:--heading {
8080
order:12;

plugin-packs/postcss-preset-env/test/basic.expect.css

+2-14
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
}
8989
}
9090

91-
@custom-selector :--heading h1, h2, h3, h4, h5, h6;
91+
@custom-selector :--heading h1, h2, h3, h4, h5, h6, .heading-7;
9292

9393
.test-custom-selectors:--heading {
9494
order:12;
@@ -280,19 +280,7 @@
280280
background-color: yellow;
281281
}
282282

283-
.a:focus {
284-
order: 27;
285-
}
286-
287-
.a:hover {
288-
order: 27;
289-
}
290-
291-
.b:focus {
292-
order: 27;
293-
}
294-
295-
.b:hover {
283+
.a:focus, .a:hover, .b:focus, .b:hover {
296284
order: 27;
297285
}
298286

plugin-packs/postcss-preset-env/test/basic.ff49.expect.css

+2-14
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
}
8787
}
8888

89-
@custom-selector :--heading h1, h2, h3, h4, h5, h6;
89+
@custom-selector :--heading h1, h2, h3, h4, h5, h6, .heading-7;
9090

9191
.test-custom-selectors:--heading {
9292
order:12;
@@ -177,19 +177,7 @@
177177
background-color: yellow;
178178
}
179179

180-
.a:focus {
181-
order: 27;
182-
}
183-
184-
.a:hover {
185-
order: 27;
186-
}
187-
188-
.b:focus {
189-
order: 27;
190-
}
191-
192-
.b:hover {
180+
.a:focus, .a:hover, .b:focus, .b:hover {
193181
order: 27;
194182
}
195183

plugin-packs/postcss-preset-env/test/basic.ff66.expect.css

+2-14
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
}
8686
}
8787

88-
@custom-selector :--heading h1, h2, h3, h4, h5, h6;
88+
@custom-selector :--heading h1, h2, h3, h4, h5, h6, .heading-7;
8989

9090
.test-custom-selectors:--heading {
9191
order:12;
@@ -172,19 +172,7 @@
172172
background-color: yellow;
173173
}
174174

175-
.a:focus {
176-
order: 27;
177-
}
178-
179-
.a:hover {
180-
order: 27;
181-
}
182-
183-
.b:focus {
184-
order: 27;
185-
}
186-
187-
.b:hover {
175+
.a:focus, .a:hover, .b:focus, .b:hover {
188176
order: 27;
189177
}
190178

plugin-packs/postcss-preset-env/test/basic.hebrew.expect.css

+2-34
Original file line numberDiff line numberDiff line change
@@ -88,27 +88,7 @@
8888
}
8989
}
9090

91-
h1.test-custom-selectors {
92-
order:12;
93-
}
94-
95-
h2.test-custom-selectors {
96-
order:12;
97-
}
98-
99-
h3.test-custom-selectors {
100-
order:12;
101-
}
102-
103-
h4.test-custom-selectors {
104-
order:12;
105-
}
106-
107-
h5.test-custom-selectors {
108-
order:12;
109-
}
110-
111-
h6.test-custom-selectors {
91+
h1.test-custom-selectors:not(.does-not-exist), h2.test-custom-selectors:not(.does-not-exist), h3.test-custom-selectors:not(.does-not-exist), h4.test-custom-selectors:not(.does-not-exist), h5.test-custom-selectors:not(.does-not-exist), h6.test-custom-selectors:not(.does-not-exist), .test-custom-selectors.heading-7 {
11292
order:12;
11393
}
11494

@@ -298,19 +278,7 @@ h6.test-custom-selectors {
298278
background-color: yellow;
299279
}
300280

301-
.a:focus {
302-
order: 27;
303-
}
304-
305-
.a:hover {
306-
order: 27;
307-
}
308-
309-
.b:focus {
310-
order: 27;
311-
}
312-
313-
.b:hover {
281+
.a:focus, .a:hover, .b:focus, .b:hover {
314282
order: 27;
315283
}
316284

0 commit comments

Comments
 (0)