Skip to content

Styling web component wrapper node #209

@jcfranco

Description

@jcfranco

Is there a recommended approach to style the root of a web component? Custom web components have a wrapper node and I couldn't find anything on it in the README nor the tutorials.

The went with following in the meantime:

foo-bar/index.m.css

/* custom element selector */
foo-bar { /* ... */ }

/* theme */
.root { /* ... */ }

/* fixed */
.rootFixed { /* ... */ }

I figured that adding a custom element selector would be fine since registered custom element names are expected to be unique anyways. Please let me know if there's a better way to do this.

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