8000 [css-nesting-1] Example 4 : selectors starting with an identifier · Issue #7980 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content

[css-nesting-1] Example 4 : selectors starting with an identifier #7980

@romainmenke

Description

@romainmenke

https://drafts.csswg.org/css-nesting/

Example 4
However, starting the nested selector with an identifier (a type selector, in other words) is invalid:

Does this only apply to the first selector in a list or to each?

invalid :

div {
  color: red;

  input {
    margin: 1em;
  }
}

valid/invalid? :

div {
  color: red;

  :is(input), textarea {
    margin: 1em;
  }

  & input, textarea {
    margin: 1em;
  }
}

From a parser perspective only the first in the list is important. But from an author perspective this is less obvious.

If you remove :is(input) then you need to modify textarea to make it valid again.

I have no preference here, only need to know what to implement

Metadata

Metadata

Assignees

No one assigned

    Labels

    Closed as Question AnsweredUsed when the issue is more of a question than a problem, and it's been answered.css-nesting-1Current Work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0