This repository was archived by the owner on Oct 25, 2024. It is now read-only.
File tree 4 files changed +71
-5
lines changed
4 files changed +71
-5
lines changed Original file line number Diff line number Diff line change @@ -460,7 +460,7 @@ export default class Critters {
460
460
// Strip pseudo-elements and pseudo-classes, since we only care that their associated elements exist.
461
461
// This means any selector for a pseudo-element or having a pseudo-class will be inlined if the rest of the selector matches.
462
462
if ( sel !== ':root' ) {
463
- sel = sel . replace ( / (?: > \s * ) ? : : ? [ a - z - ] + \s * ( \{ | $ ) / gi , '$1 ' ) . trim ( ) ;
463
+ sel = sel . replace ( / (?< ! \\ ) : : ? [ a - z - ] + (? ! [ a - z - ( ] ) / gi , '' ) . replace ( / : : ? n o t \( \s * \) / g , '' ) . trim ( ) ;
464
464
}
465
465
if ( ! sel ) return false ;
466
466
Original file line number Diff line number Diff line change @@ -120,6 +120,18 @@ ul.navbar a {
120
120
text - decoration : none ;
121
121
}
122
122
123
+ ul.navbar:not(.hidden) li:hover a {
124
+ color : black ;
125
+ }
126
+
127
+ ul.navbar:not(:hover) li:hover a {
128
+ color : black ;
129
+ }
130
+
131
+ ul.navbar li:hover a {
132
+ color : red ;
133
+ }
134
+
123
135
a:link {
124
136
color : blue ;
125
137
}
@@ -132,10 +144,14 @@ footer {
132
144
margin - top : 1em ;
133
145
padding - top : 1em ;
134
146
border - top : thin dotted ;
147
+ }
148
+
149
+ .clazz\\\\:colon {
150
+ color : green ;
135
151
} </style>
136
152
</head>
137
153
<body>
138
- <ul class =\\"navbar\\">
154
+ <ul class =\\"navbar clazz:colon \\">
139
155
<li>
140
156
<a href =\\"index.html\\">Home page</a>
141
157
</li>
@@ -336,12 +352,22 @@ exports[`webpack compilation 1`] = `
336
352
ul.navbar a {
337
353
text - decoration : none ;
338
354
}
355
+ ul.navbar:not(.hidden) li:hover a {
356
+ color : black ;
357
+ }
358
+ ul.navbar:not(:hover) li:hover a {
359
+ color : black ;
360
+ }
361
+ ul.navbar li:hover a {
362
+ color : red ;
363
+ }
339
364
a:link {
340
365
color : blue ;
341
366
}
342
367
a:visited {
343
368
color : purple ;
344
369
}
370
+
345
371
footer {
346
372
margin - top : 1em ;
347
373
padding - top : 1em ;
@@ -350,10 +376,17 @@ exports[`webpack compilation 1`] = `
350
376
.extra-style {
351
377
font - size : 200 % ;
352
378
}
379
+ .hidden {
380
+ visibility : hidden ;
381
+ }
382
+
383
+ .clazz\\\\:colon {
384
+ color : green ;
385
+ }
353
386
</style>
354
387
</head>
355
388
<body>
356
- <ul class =\\"navbar\\">
389
+ <ul class =\\"navbar clazz:colon \\">
357
390
<li>
358
391
<a href =\\"index.html\\">Home page</a>
359
392
</li>
Original file line number Diff line number Diff line change @@ -56,6 +56,18 @@ ul.navbar a {
56
56
text - decoration : none ;
57
57
}
58
58
59
+ ul.navbar:not(.hidden) li:hover a {
60
+ color : black ;
61
+ }
62
+
63
+ ul.navbar:not(:hover) li:hover a {
64
+ color : black ;
65
+ }
66
+
67
+ ul.navbar li:hover a {
68
+ color : red ;
69
+ }
70
+
59
71
a:link {
60
72
color : blue ;
61
73
}
@@ -68,10 +80,14 @@ footer {
68
80
margin - top : 1em ;
69
81
padding - top : 1em ;
70
82
border - top : thin dotted ;
83
+ }
84
+
85
+ .clazz\\\\:colon {
86
+ color : green ;
71
87
} </style>
72
88
</head>
73
89
<body>
74
- <ul class =\\"navbar\\">
90
+ <ul class =\\"navbar clazz:colon \\">
75
91
<li>
76
92
<a href =\\"index.html\\">Home page</a>
77
93
</li>
Original file line number Diff line number Diff line change 30
30
ul .navbar a {
31
31
text-decoration : none;
32
32
}
33
+ ul .navbar : not (.hidden ) li : hover a {
34
+ color : black;
35
+ }
36
+ ul .navbar : not (: hover ) li : hover a {
37
+ color : black;
38
+ }
39
+ ul .navbar li : hover a {
40
+ color : red;
41
+ }
33
42
a : link {
34
43
color : blue;
35
44
}
36
45
a : visited {
37
46
color : purple;
38
47
}
48
+
39
49
footer {
40
50
margin-top : 1em ;
41
51
padding-top : 1em ;
44
54
.extra-style {
45
55
font-size : 200% ;
46
56
}
57
+ .hidden {
58
+ visibility : hidden;
59
+ }
60
+
61
+ .clazz\:colon {
62
+ color : green;
63
+ }
47
64
</ style >
48
65
</ head >
49
66
< body >
50
- < ul class ="navbar ">
67
+ < ul class ="navbar clazz:colon ">
51
68
< li >
52
69
< a href ="index.html "> Home page</ a >
53
70
</ li >
You can’t perform that action at this time.
0 commit comments