-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Move CSS env()
/var()
functions into css.types.*
#25645
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that we should also move var()
if we're moving env()
, WDYT?
Good point, that probably makes sense. PS: Wouldn't it also make sense to introduce |
307db11
to
e6de5ae
Compare
env()
function into css.types.*
env()
/var()
functions into css.types.*
@Elchi3 Please let me know if you have any concerns here. |
I'm fine with this PR.
Previously: No, don't do this. Types are a bit dubious to begin with and giving functions their own namespace would compound the error. It would also trigger a lot of needless work for consumers. Types are a convenience for specification authors, much like IDL mixins. Browsers don't actually have to implement the specified type system, just the properties and descriptors that consume concrete values that correspond to their specified type. There are many examples of supported BCD "types" that only work incompletely across all the properties spec'd to use that type or whole types that are partially implemented (#18198). It's messy and fixing it would require significant work, comparable to flattening mixins (#8929). Besides, a lot of CSS functions are a functional notation for a type (e.g., |
Summary
Moves
env()
fromcss.properties.custom-property
tocss.types
.Test results and supporting details
Related issues
Fixes #14668.