Skip to content

Conversation

@DCR194
Copy link

@DCR194 DCR194 commented Nov 7, 2025

Hello, I was hoping to merge this to add support for css attr functions. There is also some renaming for consistency. Let me know if there's anything I should change :)

Copy link
Member

@emilio emilio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So... conceptually this looks fine, but at the very least we should rename look_for_var_or_env_functions in parser.rs too. Probably we should rename it to look_for_arbitrary_substitution_functions, which is the CSS-values concept: https://drafts.csswg.org/css-values-5/#arbitrary-substitution

That said, I don't think this quite works, you need attr() to be configurable at runtime, right? Otherwise you can't put attr() behind a pref, and that's a bit annoying because we want it to be behind a pref.

So maybe we should do something along the lines of #416, wdyt?

@emilio
Copy link
Member

emilio commented Nov 8, 2025

(The prefability aspect was not an issue with env() because env() wasn't valid anywhere else...)

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

Successfully merging this pull request may close these issues.

3 participants