Skip to content
This repository has been archived by the owner on May 15, 2023. It is now read-only.

Styles that use * are not specific enough under shady dom #21

Open
ebidel opened this issue Aug 3, 2015 · 3 comments
Open

Styles that use * are not specific enough under shady dom #21

ebidel opened this issue Aug 3, 2015 · 3 comments

Comments

@ebidel
Copy link

ebidel commented Aug 3, 2015

I have a reset stylesheet in my main page. A selector :host > ::content > * is not specific enough under shady dom and the padding/margins styles are never applied:

screen shot 2015-08-03 at 10 36 46 am

yles

https://github.com/PolymerElements/paper-dialog-behavior/blob/master/paper-dialog-common.css#L24

@ebidel ebidel changed the title Styles that use * are specific enough Styles that use * are specific enough under shady dom Aug 3, 2015
@valdrinkoshi
Copy link
Member

The only solution i can think of is applying the style like this:

:host > ::content > *,
:host > ::content > h2,
:host > ::content > div,
:host > ::content > p {
  margin-top: 20px;
  padding: 0 24px;
}

but is far from ideal...any other ideas?

@bicknellr
Copy link
Contributor

(PolymerElements/paper-checkbox#104 is related.)

@ebidel ebidel changed the title Styles that use * are specific enough under shady dom Styles that use * are not specific enough under shady dom Feb 6, 2016
@valdrinkoshi
Copy link
Member

Ideally, the styles shouldn't be applied to content (since content could be anything). We should instead have a content or body class that explicitly styles those elements. Otherwise, we should expect the Polymer user to style those.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants