2 replies [Last post]
MoxC
MoxC's picture
Offline
newbie
Last seen: 6 weeks 2 days ago
Timezone: GMT+2
Joined: 2022-06-23
Posts: 1
Points: 2

Is this code possible?

#myDiv
{
   p
   {
      color:red;
   }
   h1
   {
      color:blue;
   }
}

What I want is to apply style to all child elements inside #myDiv.
That's the way I want to do it.
I know that it can be done like #myDiv > p, but the problem is that I have a lot of lines and I would just like to do it in this or similar way.

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 23 hours 38 min ago
Timezone: GMT-4
Joined: 2009-10-09
Posts: 2051
Points: 2283

SASS has

SASS has nesting.

https://sass-lang.com/

fatamorg84
fatamorg84's picture
Offline
newbie
NYC USA
Last seen: 3 days 1 hour ago
NYC USA
Timezone: GMT+3
Joined: 2022-08-03
Posts: 1
Points: 1

useful information

useful information