Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Crissov opened this issue Jan 21, 2025 · 0 comments
Open

Comments

@Crissov
Copy link
Contributor

Crissov commented Jan 21, 2025

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant