Skip to content

[css-values] Friendlier attr() type syntax (at least for plain numbers) #11552

Open
@Crissov

Description

@Crissov

I've recently tried to use the new attr() syntax as settled on in #11035.

I very much despise having nested parentheses with type(), especially since it very often just contains a single type in angle brackets, e.g. attr(colspan type(<integer>), 1).

Didn't the old drafts use a keyword as? That would still read a lot nicer in such basic cases: attr(colspan as <integer>, 1). Can we still bring that back?
Alternatively, can we add special-casing for unit-less numbers, i.e. number (and perhaps integer) besides string and the units? attr(colspan number, 1)

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