E
E
Evanre2015-06-21 13:48:28
Sass
Evanre, 2015-06-21 13:48:28

How to write a selector for immediate children in a nested sass hierarchy?

Actually, as from

.container {
      .div{ font-size: 16px; }
}

Get in css:
.container > .div {font-size: 16px;}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey B., 2015-06-21
@Evanre

.container {
   > .div{
      font-size: 16px;
   }
}
//или
.container {
   & > .div{
      font-size: 16px;
   }
}

D
D', 2015-06-21
@Denormalization

.container {
  > .div {
   font-size: 16px;
   }
}

Not?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question