Skip to content

[css-values-4] What happens to sign(%) when % has no meaning? #12204

Open
@andruud

Description

@andruud

Spin-off from #12192:

In e.g. width: calc(1px * sign(10% - 10px)), the result depends on what % resolves to, and that's fine. However, what about:

z-index: sign(10%);

Percentages aren't accepted by z-index, and so they don't really resolve against anything. #12192 (comment) suggest that sign() should take the value "as-is" (use the sign of the literal percentage value), but that doesn't work for e.g.:

z-index: sign(10% - 1);

By default I'd expect both examples to be invalid at parse-time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions