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 Variable styling: using var(...) overrides a more specific selector #2272

Closed
doliver-pulsemining opened this issue Aug 14, 2015 · 1 comment

Comments

@doliver-pulsemining
Copy link

Setting Polymer elements CSS properties using CSS variables does not allow more specific CSS selectors to override the property unless they also are CSS variables.

The following code will result in all div elements being --red-color even when they have class='green'

<dom-module id='x-test'>
  <style>
    div {
      color: var(--red-color);
    }
    div.green {
      color: green;
    }
  </style>
  <template>
    <div class='green'>Green text is red</div>
  </template>
</dom-module>

Full example of issue: http://jsbin.com/xopovovema/edit?html,output

@sorvell
Copy link
Contributor

sorvell commented Aug 15, 2015

This is a known issue and is something we plan to address soon. Closing this issue in favor of #1873.

@sorvell sorvell closed this as completed Aug 15, 2015
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