webcomponents / webcomponents/polyfills

[ShadyCSS] Specificity issue when mixing straight and module-style CSS

Open
#23 4 comments 0 reactions 0 assignees View on GitHub
Package: shadycss Severity: Medium Type: Bug wontfix
Dominant language
HTML
Stars
1.2k
Forks
168
PR merge metrics
No merged PRs in 30d

Description

_From @mercmobily on July 1, 2016 2:19_

If you have a simple file `test.html`:

```



window.Polymer = { lazyRegister: true, dom: 'shadow'};




h1 {
color: blue;
}

Extra CSS styles


What colour am I?




```

And `extra-styles.html` is:

```



h1 {
color: red;
}



Polymer({
is: 'extra-styles'
});

```

You will see that:

1) Using shadow DOM, the writing is blue
2) Using shady DOM, the writing is red.

This is because the style set in extra-styles is more specific:

```
h1:not([style-scope]):not(.style-scope)
```

_Copied from original issue: Polymer/polymer#3758_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.