Skip to content

Commit

Permalink
Fix @layer colors override by default colors
Browse files Browse the repository at this point in the history
- Fix ##12480.
- Fix #12507.
- Replaces #12613.
  • Loading branch information
alexanderby committed Apr 19, 2024
1 parent dca627d commit 7bdf63e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/inject/dynamic-theme/modify-css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {getImageDetails, getFilteredImageURL, cleanImageProcessingCache, request
import type {CSSVariableModifier, VariablesStore} from './variables';
import {logWarn, logInfo} from '../utils/log';
import type {Theme} from '../../definitions';
import {isFirefox, isCSSColorSchemePropSupported} from '../../utils/platform';
import {isFirefox, isCSSColorSchemePropSupported, isLayerRuleSupported} from '../../utils/platform';
import type {ParsedGradient} from '../../utils/css-text/parse-gradient';
import {parseGradient} from '../../utils/css-text/parse-gradient';

Expand Down Expand Up @@ -145,6 +145,10 @@ export function getModifiedUserAgentStyle(theme: Theme, isIFrame: boolean, style
if (theme.selectionColor) {
lines.push(getModifiedSelectionStyle(theme));
}
if (isLayerRuleSupported) {
lines.unshift('@layer {');
lines.push('}');
}
return lines.join('\n');
}

Expand Down

0 comments on commit 7bdf63e

Please sign in to comment.