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

Self-chained selectors are flattened #3

Open
tbredin opened this issue Jun 5, 2017 · 0 comments
Open

Self-chained selectors are flattened #3

tbredin opened this issue Jun 5, 2017 · 0 comments

Comments

@tbredin
Copy link

tbredin commented Jun 5, 2017

Sometimes we want to chain a class selector with itself for a low-risk specificity increase. Why?
Details here: https://csswizardry.com/2014/07/hacks-for-dealing-with-specificity/#safely-increasing-specificity

eg
This scss:

.social__icon.social__icon { // require specificity to override
	// stuff
}

results in this css:

.social__icon {
	// stuff
}

So right now the chaining gets removed and we end up with a single low specify single class. Weird! Not sure why these are getting flattened, might be part of minification? Needs investigation

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

1 participant