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.

Once an application no longer requires constant development, it needs periodic maintenance for stable and secure operation. makandra offers monthly maintenance contracts that let you focus on your business while we make sure the lights stay on.

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