Re: [csswg-drafts] [css-viewport] Behavior of `segments` when there is only 1 segment (#11957)

This has been discussed in the past unfortunately I can't find the discussion anymore.

Semantically a segment is a part of something that is divided. If the viewport is not divided, then there are no segments. When the device is not folded there are no division therefore no segments.

We don't want author to write code against one segment because they should treat that case as the same as if there wasn't any split (meaning the device is used flat in the case of a foldable) or it's just a regular device. Furthermore, that one segment will return the same information as the viewport size bringing no useful information.

Finally, not returning a single segment match the CSS part of this API where the MQs do not resolve for a value of one segment. In other words, MQs values are always >= 2 for the segments.



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


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

Received on Tuesday, 18 March 2025 17:11:20 UTC