w3c / css-validator

W3C CSS Validation Service
https://jigsaw.w3.org/css-validator/
Other
205 stars 105 forks source link

Scientific notation is not properly supported in keyframe selectors #332

Closed stof closed 2 years ago

stof commented 2 years ago
@keyframes a {
    from {
        content: 'b';
    }
    to {
        content: 'c';
    }
    25% {
        content: 'd';
    }
    1.5E1% {
        content: 'e';
    }
    1E1% {
        content: 'f';
    }
}

The CSS spec about <percentage> allows any <number> before the %, which includes number in scientific notation. Both Firefox and Chromium parse the 1.5E1% and 1E1% properly, but this validator reports errors

ylafon commented 2 years ago

Fixed by https://github.com/w3c/css-validator/commit/988b7dccd52fcdaa359266b5df47d6b0f19795ce thanks for the report!

ylafon commented 2 years ago

spec link is https://www.w3.org/TR/2021/WD-css-values-4-20210715/#number-value (for reference)