Skip to content

[open-stylable] Collection of user stories #1052

@michaelwarren1106

Description

@michaelwarren1106

Let’s let this issue serve as the single place to collect user stories around the “open-stylable shadow roots” proposal.

#909

Submit user stories as comments and I will do my best to collate theme here in this top comment for easy viewing/referral.

User Stories

  • As a component author, I want to build unstyled components that only manage behavior. I want to give my consumers full control and achieve maximum compatibility with their existing styling solutions. I am ok with the tradeoff that DOM changes can break consumer's styles
  • "As a website author, I want to use shadow DOM for my own components (that I author and consume myself). I want to use my existing CSS system, including any global resets, utility classes, and hand-rolled scoped classes. Crucially, I want these styles to be usable in DSD without causing FOUC."
  • As a page author/WC user, I would like to have a way to say, as @chriscoyier put it, "I know what I'm doing" and go wild overwriting anything I want (and not be at the mercy of the WC author).
  • As a performance minded web app developer, I would like a way to benefit from the styles encapsulation of the shadow DOM to avoid style recalculation's performance hit as described by @captainbrosset's at CSS Day 2023 (slides).
  • As an application developer developing apps for company-internal use, I want to re-use web components that represent common logic across various projects regardless of what tech stack they individually use. When frameworks are used that require extra classes, I want to extend the components to use templates and have the framework classes available automatically inside the component.
  • As a web app I’ve already written the styles for various user interface elements (e.g. buttons, form controls). Now I have a larger composition that I need to repeat throughout the app which includes a number of these elements (e.g. a modal dialog that includes a few buttons) and I would like to use the shadow DOM for this. The component doesn’t need the composition slots provide. Parts require me to rewrite my CSS. I would love to write the styles for these elements once, then allow the web components in my app use them, ideally without requiring my entire stylesheet also be applied to the shadow root.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions