master-co / css

The CSS Language and Framework

Home Page:https://css.master.co

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ’– Shorthand rules automatically inherit related rule variables

1aron opened this issue Β· comments

commented

Current

config.variables

{
        'font-family': {
            sans: ['InterVariable', 'Noto Sans TC', ...variables['font-family'].sans],
            mono: ['Fira Code', ...variables['font-family'].mono]
        },
        'font-feature-settings': {
            sans: "'cv06', 'cv10', 'cv11', 'cv12', 'cv13'"
        }
}

config.rules

{
    font: {
        match: /^f:/,
        layer: Layer.CoreNativeShorthand,
        variables: [
            'font-family',
            'font-variant',
            'font-weight',
            'font-size',
            'font-style',
            'line-height'
        ]
    } as RuleDefinition,
}

Expected

config.rules

{
    font: {
        match: /^f:/,
        layer: Layer.CoreNativeShorthand,
-       variables: [
-           'font-family',
-           'font-variant',
-           'font-weight',
-           'font-size',
-           'font-style',
-           'line-height'
-       ]
    } as RuleDefinition,
}

Inherits variables from any non-shorthand rule matching --font-.*.