0 votes
in HTML by
What Selector Nesting in Sass is used for?

1 Answer

0 votes
by

Sass let you nest your CSS selectors in a way that follows the same visual hierarchy of your HTML. CSS, on the other hand, doesn't have any visual hierarchy.

Consider example (scss):

.parent {
  color: red;

  .child {
    color: blue;
  }
}

Result (css):

.parent {
  color: red;
}

.parent .child {
  color: blue;
}

Related questions

+1 vote
+1 vote
asked Aug 17, 2020 in HTML by RShastri
0 votes
asked Aug 17, 2020 in HTML by RShastri
0 votes
asked Oct 23, 2019 in HTML by AdilsonLima
...