csstree / validator

CSS validator based on CSSTree
MIT License
65 stars 14 forks source link

Code background-position:0-24px doesn't show an error #40

Closed PavelFil closed 1 month ago

PavelFil commented 1 month ago

Hello. This code doesn't show an error:

.test::before{
    background-position:0-24px
}
lahmatiy commented 1 month ago

From a CSS perspective, that’s not an error. 0-24px is treated as two separate parts: 0 (which is a number token) and -24px (which is a dimension token). Because these two parts aren’t being combined into one new token, no space is needed between them. Any browser will accept this as a valid value.