Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 991648f

Browse files
committed
fix(theming): match preceding selectors as well
* The theming service currently only matches from the beginning of the `md-default-theme`, but all preceding selectors are being ignored. Fixes #9480
1 parent 3854c4a commit 991648f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/services/theming/theming.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,7 @@ function parseRules(theme, colorType, rules) {
744744
// Don't apply a selector rule to the default theme, making it easier to override
745745
// styles of the base-component
746746
if (theme.name == 'default') {
747-
var themeRuleRegex = /((?:(?:(?: |>|\.|\w|-|:|\(|\)|\[|\]|"|'|=)+) )?)((?:(?:\w|\.|-)+)?)\.md-default-theme((?: |>|\.|\w|-|:|\(|\)|\[|\]|"|'|=)*)/g;
747+
var themeRuleRegex = /((?: |>|\.|\w|-|:|\(|\)|\[|\]|"|'|=)*)((?:(?:\w|\.|-)+)?)\.md-default-theme((?: |>|\.|\w|-|:|\(|\)|\[|\]|"|'|=)*)/g;
748748
newRule = newRule.replace(themeRuleRegex, function(match, prefix, target, suffix) {
749749
return match + ', ' + prefix + target + suffix;
750750
});

0 commit comments

Comments
 (0)