Skip to content

Automatically add styles required on the root document outside shadow root #1461

Description

@aklinker1

Feature Request

In createShadowRootUi, some styles, like @property styles, must be added outside the shadow root. See tailwindlabs/tailwindcss#15005

WXT should automatically extract these styles from the CSS here and add them outside the shadow root instead.

if (ctx.options?.cssInjectionMode === 'ui') {
const entryCss = await loadCss();
// Replace :root selectors with :host since we're in a shadow root
css.push(entryCss.replaceAll(':root', ':host'));
}

Is your feature request related to a bug?

#1457

What are the alternatives?

Wait for Tailwind to do something about it?

Activity

  1. added
    good first issue
    on Feb 27, 2025
  2. krisalcordo commented on Mar 9, 2025

    @krisalcordo

    @aklinker1 I'm looking for a good first contrib, I'm assuming this issue is inactionable at the moment based on the links provided?

  3. nishu-murmu commented on Mar 10, 2025

    @nishu-murmu
    Collaborator

    I was already working on it. @krisalcordo but go ahead if you'd like to contribute. 👍🏽
    @aklinker1 make him assignee for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    contribution welcomegood first issue

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions