Skip to content

Is <attr-unit> parse-time behavior intentional? #13060

@emilio

Description

@emilio

Per spec, getting a wrong <attr-unit> causes the whole declaration to be invalid:

div {
  width: 100px;
  height: attr(foo cool-new-unit, 100px);
}

That's probably fine but is it intentional?

It feels a bit weird that attr(foo cool-new-unit, fallback) wouldn't use the fallback (or trigger IACVT).

I could see arguments the other way around I guess? But feels a bit like env(something-random) to me, which does trigger fallback / doesn't validate the identifier.

cc @dshin-moz @tabatkins @andruud

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