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-env-1] environment variables as redundant mechanism #3350

Closed
srsgores opened this issue Nov 28, 2018 · 2 comments
Closed

[css-env-1] environment variables as redundant mechanism #3350

srsgores opened this issue Nov 28, 2018 · 2 comments

Comments

@srsgores
Copy link

After reading the proposal spec on CSS environment variables, I find the proposed env keyword redundant and misleading:

  1. Introduces a new function which essentially does the same thing as var()
  2. Lacks a clear specificity on how var() plays with env()
  3. Adds another level of complexity to CSS for new learners which may impede or slow down learning

Instead, I propose using the familiar var keyword already available. UAs can predefine custom properties to known variable names. It seems to me that the draft tries to solve a problem that really isn't there for most authors.

For fallbacks, the author may define those using the normal :root or specificity.

Instead of focusing on creating a new function, let's focus on a naming convention for UAs to follow that standardizes the variable names we can use.

@Loirooriol
Copy link
Contributor

See #3285, env() is more like calc() or attr() rather than var().

@tabatkins
Copy link
Member

Yup, env() serves a different purpose from var(), tho the two are roughly similar.

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

3 participants