Conversation
|
I'm going to try and fix the above bug. Also I spotted some redundant selectors in the output, e.g., that ruby sass folds into: but I'll save that for another ticket/PR. |
|
Hey robocoder, I think i dit found a solution for the first problem you found where the :hover does not get extended right. |
|
@nessy thanks for digging into this again. The last line of your new change causes phpunit to fail with "Undefined offset: 0" when compiling tests/inputs/extends.scss and tests/inputs/placeholder_selector.scss |
|
Ok, I've fixed the first test case (mis-combined :hover). I'm still looking into the missing selectors from the nested test case. |
|
@leafo Ready for review. |
|
Much better, thanks! Found another difference, but I think it might be a bug in ruby one. Compare are how this is compiled: .btn:hover {
color: red;
}
.edit .actions button {
@extend .btn;
}
.edit .new .actions button {
@extend .btn;
}scssphp: .btn:hover, .edit .actions button:hover, .edit .new .actions button:hover {
color: red; }ruby scss: .btn:hover, .edit .actions button:hover {
color: red; } |
|
ruby scss has some optimizations to reduce selector bloat. |
|
@leafo & @robocoder I believe this is the logic in Ruby SCSS optimization explained sass/sass#324 (comment) |
Applied @nessy's patch from issue #29 but there are new errors reported by phpunit.
For example:
scssphp (before) -- wrong in retrospect:
scssphp (after):
sass-lang.com: