Skip to content

Error recovery in :is(), :has() etc.? #122

@facelessuser

Description

@facelessuser

It seems a decision was recently made that CSS level 4 selectors that take selector lists (:has(), :is(), :nth-child(), etc.) will have error recovery. This will not apply to :not() though. Essentially :is(:nonsense) would translate to :is(:not(*)).

Some things are still unclear though. Does this mean that they take any bad syntax? Like, if we give something like :is(.some $crazy 222 << nonsense, div.valid), would we still get :is(div.valid) or is there some limit to recovery? Is it limited to bad pseudo-classes? Could it handle bad combinators, and how would you determine it without just accepting any kind of bad syntax? Do you just gobble up bad syntax until you hit either a , or )?

Aside from all of this, do we need this implemented? Something to think about.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions