Skip to content

[css-conditional-6] Behavior of style(0 = 0px) #12236

Open
@andruud

Description

@andruud

A literal 0 may be used for any numeric value where a unit would normally be expected, e.g. width: 0. Should this unitless behavior also work for style() range syntax? In other words, is style(0 = 0px) "false" due to a type mismatch, or is it "true"?

This was also discussed in #8376, and the consensus seems to be that 0 = 0px => "true" is the correct behavior. (cc @mirisuzanne ,@kizu)

There was also a question about whether or not we currently allow unitless zero in MQs with range syntax (@emilio), and the answer to that is "yes" (https://jsbin.com/taleroderi).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions