From 1318ca811acad61d0743098f6f993df574b7ff16 Mon Sep 17 00:00:00 2001 From: Silas Lenz Date: Wed, 17 Jan 2024 09:28:55 +0100 Subject: [PATCH] Add -webkit-scrollbar pseudo-elements to ignored prefixes --- .changeset/lovely-drinks-sort.md | 5 +++++ packages/sheet/src/index.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/lovely-drinks-sort.md diff --git a/.changeset/lovely-drinks-sort.md b/.changeset/lovely-drinks-sort.md new file mode 100644 index 000000000..6b52ed63c --- /dev/null +++ b/.changeset/lovely-drinks-sort.md @@ -0,0 +1,5 @@ +--- +'@emotion/sheet': patch +--- + +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`. diff --git a/packages/sheet/src/index.js b/packages/sheet/src/index.js index 4fa90fbb6..09196a0d8 100644 --- a/packages/sheet/src/index.js +++ b/packages/sheet/src/index.js @@ -147,7 +147,7 @@ export class StyleSheet { } catch (e) { if ( process.env.NODE_ENV !== 'production' && - !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test( + !/:(-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( rule ) ) {