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

Feature request: Support for context #54

Closed
hagenburger opened this issue Jul 24, 2017 · 1 comment
Closed

Feature request: Support for context #54

hagenburger opened this issue Jul 24, 2017 · 1 comment

Comments

@hagenburger
Copy link

Thanks a lot for your project and the work you put into it. This is very useful!

Do you plan to support context for variables in a way similar how media queries and hover effects work?

Existing functionality:

/* Works well: */

:root {
  --color: blue;
}

a {
  color: var(--color);
}
/* =>
  a {
    color: blue;
  }
*/

a:hover {
  --color: green;
}
/* =>
  a:hover {
    color: green;
  }
*/

New functionality:

/* Not supported: */

:root {
  --color: blue;
}

a {
  color: var(--color);
}
/* =>
  a {
    color: blue;
  }
*/

.my-theme {
  --color: red;
}
/* =>
  .my-theme a {
    color: red;
  }
*/
@MadLittleMods
Copy link
Owner

MadLittleMods commented Jul 24, 2017

No plans to expand on non-explicit relationships.

But I would expect this sort of thing to work and it currently doesn't 😢 I created #55 to track it.

:root {
  --color: blue;
}

.my-theme {
  --color: red;
}

:root,
.my-theme {
  a {
     color: var(--color);
  }
}

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

2 participants