Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nesting multiple direct descendant selectors in SASS [closed]

Tags:

css

sass

Not sure if it's possible or not but this has been bugging me for a while.

Is it possible in SASS to select multiple direct descendants within a nested block?

// This works
div
{
  > .one
  {
    /* ... */
  }
}

// This doesn't work
div
{
  > .one,
  > .two
  {
    /* ... */
  }
}
like image 394
Daniel Imms Avatar asked Jan 16 '23 18:01

Daniel Imms


1 Answers

It works, you do something wrong. More then, you can look at compiled css here: http://sass-lang.com/try.html , in your case it provides:

div > .one {
  /* ... */ }

div > .one,
div > .two {
  /* ... */ }

So it works.

like image 120
Danil Speransky Avatar answered Feb 16 '23 21:02

Danil Speransky