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

Styles priority #25

Open
KoderFPV opened this issue Sep 24, 2020 · 1 comment
Open

Styles priority #25

KoderFPV opened this issue Sep 24, 2020 · 1 comment

Comments

@KoderFPV
Copy link

KoderFPV commented Sep 24, 2020

Hi,
I have weird problem.
image

As you can see on the image, selected div has two classes:

container Products__mobilePadding__27tZs

.container class has

padding-right: 1.875rem; padding-left: 1.875rem;

And Products__mobilePadding__27tZs class has

padding: 0 1rem;

Why second in order class with a single padding definition does not exclude container class dual padding definition and their have a higher priority?

Thanks for help!

@theKashey
Copy link
Owner

The order of a class in className does not matter - only the order of a rule in the result css file matters.
As I could see from your screenshot - .container has a bigger priority (defined later) on index.scss as well.

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

No branches or pull requests

2 participants