You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, when the user resized a vertical browser panel that covers the entire viewport, the aspect ratio resolves to Infinity but users might expect it to evaluate to false.
Chrome always evaluates aspect-ratio to true when one side is 0, Firefox evaluates it to false when the viewport width is 0.
When written like [(color)], the media feature is evaluated in a boolean context. If the feature would be true for any value other than the number 0, a <dimension> with the value 0, the keyword none, or a value explicitly defined by that media feature to evaluate as false in a boolean context, the media feature evaluates to true. Otherwise, it evaluates to false.
For example, when the user resized a vertical browser panel that covers the entire viewport, the aspect ratio resolves to
Infinity
but users might expect it to evaluate to false.Chrome always evaluates
aspect-ratio
to true when one side is0
, Firefox evaluates it to false when the viewport width is0
.https://drafts.csswg.org/mediaqueries-5/#mq-boolean-context
aside: I would also add
no-preference
and a function resolving to one of these values (eg.calc(0)
,var(--feature)
) to the list of the "falsy" values.The text was updated successfully, but these errors were encountered: