3 replies [Last post]
MoxC
MoxC's picture
Offline
newbie
Last seen: 24 weeks 1 day 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: 3 weeks 2 days ago
Timezone: GMT-5
Joined: 2009-10-09
Posts: 2054
Points: 2286

SASS has

SASS has nesting.

https://sass-lang.com/

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

useful information

useful information

asfandali
asfandali's picture
Offline
newbie
Last seen: 4 days 15 hours ago
Timezone: GMT+5
Joined: 2022-11-23
Posts: 1
Points: 1

Verschwindende wrote: SASS

Verschwindende wrote:

SASS has nesting.

https://sass-lang.com/

nesting ?