Posted over 2 years ago. Visible to the public. Repeats.

Sass: Do not use comments between selector definitions

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

Copy
.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:

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

… will simply drop the &.has-hover part.

makandra has been working exclusively with Ruby on Rails since 2007. Our laser focus on a single technology has made us a leader in this space.

Owner of this card:

Avatar
Dominik Schöler
Last edit:
over 2 years ago
by Arne Hartherz
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Dominik Schöler to makandra dev
This website uses cookies to improve usability and analyze traffic.
Accept or learn more