Skip to content

[css-mediaqueries] “inner” @media rules #531

@ghost

Description

Consider:

foo
{
    color: red;
    @media screen
    {
        background-color: blue;
    }
}

This syntax is good because:

  1. It’s DRY (what if foo was a really long selector?)
  2. It interacts well with nesting.
  3. 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;
        }
    };
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions