Skip to content

Is there a conventional way to increase the specificity of a component's style? #28

Discussion options

You must be logged in to vote

Not really. Unfortunately this is what happens when people set global styles.

Best you can do is to manually add these back. We can't control what other people set in their global styles, and the :host selector has lower specificity than the * selector.

wa-divider:not([vertical]) {
  border-top: solid var(--width) var(--color);
}

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
5 replies
@KonnorRogers
Comment options

@jusko
Comment options

@KonnorRogers
Comment options

@davekaro
Comment options

@b-d-m-p
Comment options

Answer selected by jusko
Comment options

You must be logged in to vote
1 reply
@timsnadden
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
6 participants