Skip to content

selector-pseudo-class-no-unknown: support :defined #4080

Closed
@lkraav

Description

What is the problem you're trying to solve?

https://html.spec.whatwg.org/multipage/semantics-other.html#selector-defined

Best practice for eliminating FOUC when using custom elements https://developers.google.com/web/fundamentals/web-components/customelements#prestyle

Example:

app-drawer:not(:defined) {
  /* Pre-style, give layout, replicate app-drawer's eventual styles, etc. */
  display: inline-block;
  height: 100vh;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

What solution would you like to see?

selector-pseudo-class-no-unknown: should probably natively support :defined, as it's already shipped in modern browsers.

Your thoughts?

Metadata

Assignees

No one assigned

    Labels

    status: wipis being worked on by someone

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions