Skip to content

Preserve Dark Mode details when using React Portals #468

@kotAPI

Description

@kotAPI

For components like AlertDialogs and other components that use Portals, we need to discuss and finalize on how these can be solved in the right way

The problem

  • Portal creates a dom element outside the tag making it get rendered outside the context of the global CSS variables. This makes the portal and its content lose its access to these variables breaking in.

image

Even Radix UI seems to be struggling with it as of date of writing this
image
https://www.radix-ui.com/primitives/docs/components/alert-dialog

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