make danger buttons less obnoxious

This commit is contained in:
Henry Jameson 2026-05-05 19:49:32 +03:00
commit 17b82be1a4
2 changed files with 7 additions and 2 deletions

View file

@ -54,7 +54,7 @@ export default {
{ {
variant: 'danger', variant: 'danger',
directives: { directives: {
background: '--cRed', background: '$blend(--cRed 0.25 --inheritedBackground)',
}, },
}, },
{ {

View file

@ -499,7 +499,12 @@ export const init = ({
}), }),
) )
const lastVariantRule = variantRules[variantRules.length - 1] const lastVariantRule = variantRules[variantRules.length - 1]
if (lastVariantRule) { const lastVariantSelector = ruleToSelector(
lastVariantRule,
true,
)
if (lastVariantRule && lastVariantSelector !== selector) {
inheritRule = lastVariantRule inheritRule = lastVariantRule
} else { } else {
const normalRules = ruleset.filter( const normalRules = ruleset.filter(