Skip to content

[css-nesting]The parent selector should not be placed inside the subselector #2909

@wangmeijian

Description

@wangmeijian

About The Nesting At-Rule: @nest

.foo {
  color: red;
  @nest .parent & {
    color: blue;
  }
}
/* equivalent to
   .foo { color: red; }
   .parent .foo { color: blue; }
 */

if .parent have three child selectors ".foo",".foo2",".foo3",I must write "@nest .parent &" in every child selectors,this is very tedious

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions