I want to merge these two CSS. What are the possible ways to do this
.home .site-content .content-area{width: 100%;}
.archive.category .site-content .content-area{width: 100%;}
These two line of CSS should me merged in a single line.
I want to merge these two CSS. What are the possible ways to do this
.home .site-content .content-area{width: 100%;}
.archive.category .site-content .content-area{width: 100%;}
These two line of CSS should me merged in a single line.
2
Answers
The vanilla CSS Selector would be:
As soon as you use a CSS Preprocessor such as SASS or LESS you can nest. Alternatively, you have to wait a while until WHATWG releases the specifications for CSS nesting. In SASS or LESS you can use:
If you want to display it in one line, you can ofc write it in one line for a minified version.
Use
:is()
.It’s pure css with MDN documentation