csswg-drafts icon indicating copy to clipboard operation
csswg-drafts copied to clipboard

[cssom-1] Serialization of feature values

Open cdoublev opened this issue 4 months ago • 4 comments

Serializing Media Feature Values is poorly defined.

This is not really important but hey, it could simply be replaced with serializing a CSS component value: keywords in lowercase, base 10 numbers, etc.

In current version of Chrome and FF:

Input Chrome FF Expected
orientation: PORTRAIT orientation: portrait orientation: portrait orientation: portrait
aspect-ratio: 1 aspect-ratio: 1 / 1 aspect-ratio: 1 / 1 aspect-ratio: 1 / 1
width: 0 width: 0 width: 0px width: 0px
width: 1.0px width: 1px width: 1px width: 1px
width: calc(1px * 2) width: calc(2px) width: calc(2px) width: calc(2px)

cdoublev avatar Oct 16 '24 11:10 cdoublev