Skip to content

Commit 700426e

Browse files
committed
Use the last shorthand CSS prop value when
1 parent 805038a commit 700426e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/inject/dynamic-theme/css-rules.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function handleEmptyShorthand(shorthand: string, style: CSSStyleDeclaration, ite
109109
let escapedSelector = escapeRegExpSpecialChars(parentRule.selectorText);
110110
escapedSelector = escapedSelector.replaceAll(/\s+/g, '\\s*'); // Space count can differ
111111
escapedSelector = escapedSelector.replaceAll(/::/g, '::?'); // ::before can be :before
112-
const regexp = new RegExp(`${escapedSelector}\\s*{[^}]*?${shorthand}:\\s*([^;}]+)`);
112+
const regexp = new RegExp(`${escapedSelector}\\s*{[^}}]*${shorthand}:\\s*([^;}]+)`);
113113
const match = sourceCSSText.match(regexp);
114114
if (match) {
115115
iterate(shorthand, match[1]);

0 commit comments

Comments
 (0)