We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hey there,
I have a problem using the @extend rule in sass.
I have the following rules in the .scss file:
.box {width:100px;} .wrapper {background:black;} .box.wrapper {margin-right:8px;} .box1 {@extend .box; @extend .wrapper; background:red;} .box2 {@extend .box; @extend .wrapper; background:green;}
The output in the css file is as follows:
.box, .box1, .box2 {width: 100px; } .wrapper, .box1, .box2 {background: black; } .box.wrapper, .box1, .box1.box2, .box2 {margin-right: 8px; } .box1 {background: red; } .box2 {background: green; }
Everything is correct except for the combination .box1.box2 in this line:
.box.wrapper, .box1, .box1.box2, .box2 {margin-right: 8px; }
Why does the algorithm combine .box1.box2 and so forth and applys the rule that I had specified for .box.wrapper?
It gets very bloated, especially with more classes, because it should just say:
.box.wrapper, .box1, .box2 {margin-right:8px;}
Am I missing something? Is the interpretation from scss to css correct? Can I somehow avoid this redundant code?
The text was updated successfully, but these errors were encountered:
.box1.box2 should indeed be omitted here, since it's a subselector of both .box1 and .box2. I'll look into it.
.box1.box2
.box1
.box2
Sorry, something went wrong.
db51415
Normalize identifier escapes (sass#90)
4944e26
Closes sass#76
Fix typo in the doc about calculations (#76)
6bf4b67
No branches or pull requests
Hey there,
I have a problem using the @extend rule in sass.
I have the following rules in the .scss file:
The output in the css file is as follows:
Everything is correct except for the combination .box1.box2 in this line:
Why does the algorithm combine .box1.box2 and so forth and applys the rule that I had specified for .box.wrapper?
It gets very bloated, especially with more classes, because it should just say:
Am I missing something?
Is the interpretation from scss to css correct?
Can I somehow avoid this redundant code?
The text was updated successfully, but these errors were encountered: