Zoker
Zoker

Reputation: 2059

Wrap classes in CSS

I want to wrap classes in CSS with a id.

So something like:

#main {
    .whatever {
        padding: 20px;
    }

    body {
        font-size: 25px;
    }
}

I have to wrap a lot of classes and this would be much more easy than write the id in front of every class.

Is that possible?

Upvotes: 0

Views: 996

Answers (1)

Simone
Simone

Reputation: 21272

You can't do this in pure CSS. You may want to use a CSS preprocessor such as SASS or LESS.

Upvotes: 4

Related Questions