Skip to content

Commit 98b889a

Browse files
committed
Replace regex for specific pseudo-elements with a check for any webkit/moz/ms prefix
1 parent 1318ca8 commit 98b889a

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

.changeset/lovely-drinks-sort.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
'@emotion/sheet': patch
33
---
44

5-
Do not log failed rule insertions in the speedy mode for even more vendor-prefixed pseudo-elements/classes like `-webkit-scrollbar-button`, `-webkit-scrollbar-thumb` and `-webkit-scrollbar-track`.
5+
Do not log failed rule insertions in the speedy mode for vendor-prefixed (Webkit, Mozilla and Microsoft) pseudo-elements/classes

packages/sheet/src/index.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,7 @@ export class StyleSheet {
147147
} catch (e) {
148148
if (
149149
process.env.NODE_ENV !== 'production' &&
150-
!/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal|-webkit-scrollbar-button:.*|-webkit-scrollbar-thumb:.*|-webkit-scrollbar-track:.*){/.test(
151-
rule
152-
)
150+
!/:(-webkit-.*:.*|-moz-.*|-ms-.*){/.test(rule)
153151
) {
154152
console.error(
155153
`There was a problem inserting the following rule: "${rule}"`,

0 commit comments

Comments
 (0)