Re: [csswg-drafts] [css-values-5] Boolean values in CSS custom properties (#10593)

While CSS has properties with just two valid values available, it does not have boolean values, i.e. keywords like `true` and `false`. This verbosity makes it easier to extend the property later on. Queries have boolean results, though. Pseudo functions need to return valid values, so cannot be boolean in the sense requested here. 

I understand that some authors use Custom Properties as if there were boolean values, probably because they are used to them from Javascript or other programming languages. I do not think this should be anything more than condoned by the specification. 

The furthest it could go, in my opinion, would be to add two descriptors to `@property` that would each take one value value that will be considered truish and falsish, respectively. 

-- 
GitHub Notification of comment by Crissov
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10593#issuecomment-2252125161 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 26 July 2024 07:16:49 UTC