ruby-sass: Do not use comments between selector definitions

Updated . Posted . Visible to the public. Deprecated.

This issue affects only the ruby-sass implementation which is deprecated.
Use node-sass or sassc instead.

Sass lets you easily specify multiple selectors at once like this:

.some-block
  &.has-hover,
  &:hover
    outline: 1px solid red

This will add a red outline on either real hover or when the has-hover class is present. However, adding a comment will void the definition of that line:

.some-block
  &.has-hover, // From hoverable.js <-- DON'T
  &:hover
    outline: 1px solid red

... will simply drop the &.has-hover part in ruby-sass Show archive.org snapshot (deprecated). sassc Show archive.org snapshot and Node Sass Show archive.org snapshot (Dart Sass transpiled to JS) are not affected by this problem.

Dominik Schöler
Last edit
Michael Leimstädtner
License
Source code in this card is licensed under the MIT License.
Posted by Dominik Schöler to makandra dev (2017-04-25 10:02)