Consider:
foo
{
color: red;
@media screen
{
background-color: blue;
}
}
This syntax is good because:
- It’s DRY (what if
foo was a really long selector?)
- It interacts well with nesting.
- Not only it interacts well with custom property sets, but it allows people to do things that would otherwise be impossible. Consider:
:root
{
--button:
{
color: red;
@media screen
{
background-color: blue;
}
};
}