0

I have a following css

#container { border:1px solid black; } #container #header { color:blue; } #container #footer { color:red; } 

Can i write it as

#container { border:1px solid black; #header { color:blue; } #footer { color:red; } } 

So the #header and #footer are still select as #container's childs element. Or i need to use some css framework like .LESS ?

3 Answers 3

1

Nope, CSS doesn't support that. I agree, it would be useful. However, you're right, it looks like LESS supports it.

Sign up to request clarification or add additional context in comments.

1 Comment

thanks you very much~ I have a look on CSS3, it still not support. :(
1

Yes only if you use SASS, not possible in vanilla CSS.

Comments

0

CSS doesn't support that syntax out of the box, so yes you would have to use .LESS

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.