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

deliver zero specificity CSS #383

Closed
1 task done
AndyOGo opened this issue Apr 3, 2018 · 2 comments
Closed
1 task done

deliver zero specificity CSS #383

AndyOGo opened this issue Apr 3, 2018 · 2 comments

Comments

@AndyOGo
Copy link

AndyOGo commented Apr 3, 2018

Are you reporting a bug or a feature?

  • Feature

Expected Behavior

It's expected that our consumers don't have to deal with CSS specificity hell originating form the patterns-library itself.

The goal is to avoid .adjoining.classes or .parent .classes and only get the desired CSS by

  • proper cascading order
  • @media queries

Let's discuss how we want to approach this and if we need common rules.

I think the downside is:

  • same modifier/state classes have to be added to multiple DOM nodes (performance decrease)
  • bigger maintenance and more efforts needed for implementation

Actual Behavior

States and some modifiers increase CSS specificity slightly.

@LucaMele
Copy link
Contributor

LucaMele commented Apr 6, 2018

We always should provide one level of specifity (class ONLY selector, no children no ID, no TAGS). This helps the consumer of the library if they have to override styles

@AndyOGo AndyOGo modified the milestone: Build Apr 17, 2018
@AndyOGo AndyOGo mentioned this issue Apr 27, 2018
6 tasks
@AndyOGo AndyOGo mentioned this issue Aug 30, 2018
10 tasks
@LucaMele
Copy link
Contributor

closing as new plib version is live. If issue is with v2 still relevant, please re-open

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

No branches or pull requests

3 participants