Skip to content

Bug: Errors reported when CSS variables are defined with certain legal values #343

Closed
@tmb-github

Description

@tmb-github

'none' is a valid value for 'transform': https://developer.mozilla.org/en-US/docs/Web/CSS/transform#syntax
'inherit' is a valid value for 'margin': https://developer.mozilla.org/en-US/docs/Web/CSS/margin#syntax

Setting the 1st and 2nd CSS variables to 'none' and 'inherit' respectively causes the validator to issue errors for those values:

:root {
    --list-transform: none;
    --list-margin: inherit;
}

.list-transform {
    transform: var(--list-transform);
}

.list-margin {
    margin: var(--list-margin);
}


Using different values for those CSS variables eliminates the error reporting:

:root {
    --list-transform: matrix(1.0, 2.0, 3.0, 4.0, 5.0, 6.0);
    --list-margin: 1em;
}

.list-transform {
    transform: var(--list-transform);
}

.list-margin {
    margin: var(--list-margin);
}

The absence of the variable definitions also eliminates the error reporting:


.list-transform {
    transform: var(--list-transform);
}

.list-margin {
    margin: var(--list-margin);
}


Untitled

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions