polymer
polymer copied to clipboard
Shady DOM scoping of selectors
When you have content that is coming from a CMS (WYSIWYG) and injected into a component, you don't always have the ability to add classes and sometimes need to target those elements in CSS like so:
.elem__copy p:first-child {
margin-top: 0;
}
Unfortunately Polymer changes that selector to the following and it is never applied to the element:
.elem__copy.component p.component:first-child {
margin-top:0;
}