This repository was archived by the owner on Oct 25, 2024. It is now read-only.
Commit cf38bdf 1 parent 0f0bf76 commit cf38bdf Copy full SHA for cf38bdf
File tree 4 files changed +35
-5
lines changed
4 files changed +35
-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 ( / ( : : ? [ a - z - ] + ( \( . + ? \) ) ? \s * ) / gi , ' ' ) . 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 @@ -124,6 +124,10 @@ ul.navbar:not(.hidden) li:hover a {
124
124
color : black ;
125
125
}
126
126
127
+ ul.navbar:not(:hover) li:hover a {
128
+ color : black ;
129
+ }
130
+
127
131
ul.navbar li:hover a {
128
132
color : red ;
129
133
}
@@ -140,10 +144,14 @@ footer {
140
144
margin - top : 1em ;
141
145
padding - top : 1em ;
142
146
border - top : thin dotted ;
147
+ }
148
+
149
+ .clazz\\\\:colon {
150
+ color : green ;
143
151
} </style>
144
152
</head>
145
153
<body>
146
- <ul class =\\"navbar\\">
154
+ <ul class =\\"navbar clazz:colon \\">
147
155
<li>
148
156
<a href =\\"index.html\\">Home page</a>
149
157
</li>
@@ -347,6 +355,9 @@ exports[`webpack compilation 1`] = `
347
355
ul.navbar:not(.hidden) li:hover a {
348
356
color : black ;
349
357
}
358
+ ul.navbar:not(:hover) li:hover a {
359
+ color : black ;
360
+ }
350
361
ul.navbar li:hover a {
351
362
color : red ;
352
363
}
@@ -368,10 +379,14 @@ exports[`webpack compilation 1`] = `
368
379
.hidden {
369
380
visibility : hidden ;
370
381
}
382
+
383
+ .clazz\\\\:colon {
384
+ color : green ;
385
+ }
371
386
</style>
372
387
</head>
373
388
<body>
374
- <ul class =\\"navbar\\">
389
+ <ul class =\\"navbar clazz:colon \\">
375
390
<li>
376
391
<a href =\\"index.html\\">Home page</a>
377
392
</li>
Original file line number Diff line number Diff line change @@ -60,6 +60,10 @@ ul.navbar:not(.hidden) li:hover a {
60
60
color : black ;
61
61
}
62
62
63
+ ul.navbar:not(:hover) li:hover a {
64
+ color : black ;
65
+ }
66
+
63
67
ul.navbar li:hover a {
64
68
color : red ;
65
69
}
@@ -76,10 +80,14 @@ footer {
76
80
margin - top : 1em ;
77
81
padding - top : 1em ;
78
82
border - top : thin dotted ;
83
+ }
84
+
85
+ .clazz\\\\:colon {
86
+ color : green ;
79
87
} </style>
80
88
</head>
81
89
<body>
82
- <ul class =\\"navbar\\">
90
+ <ul class =\\"navbar clazz:colon \\">
83
91
<li>
84
92
<a href =\\"index.html\\">Home page</a>
85
93
</li>
Original file line number Diff line number Diff line change 33
33
ul .navbar : not (.hidden ) li : hover a {
34
34
color : black;
35
35
}
36
+ ul .navbar : not (: hover ) li : hover a {
37
+ color : black;
38
+ }
36
39
ul .navbar li : hover a {
37
40
color : red;
38
41
}
54
57
.hidden {
55
58
visibility : hidden;
56
59
}
60
+
61
+ .clazz\:colon {
62
+ color : green;
63
+ }
57
64
</ style >
58
65
</ head >
59
66
< body >
60
- < ul class ="navbar ">
67
+ < ul class ="navbar clazz:colon ">
61
68
< li >
62
69
< a href ="index.html "> Home page</ a >
63
70
</ li >
You can’t perform that action at this time.
0 commit comments