DEV Community

Discussion on: Web components in 2021: the Good, the Bad and the Ugly

Collapse
 
christianulbrich profile image
Christian Ulbrich

You seem to have not really used Web Components, they are offering all what you are mentioning today:

  • basic infra -> lit.dev and go bundleless
  • "bleed-through" of CSS -> either use CSS custom properties or Shadow Parts
  • transport all your glorious state, like you are used to know using either attributes, properties or projected content via default slots; i.e. you have everything at your hand, that the DOM offers
  • placeholders -> slot fallback content
  • DOM nesting restrictions? / template -> Huh? Use slots and / or nested slots