Skip to content

Override for Shadow DOM Encapsulation #2967

@brianblakely

Description

@brianblakely

Feature Request

Description of Problem:

I have been working on a third-party theme for Perspective and have run into a couple friction points:

  1. Not everything I want to style is exposed by Perspective via CSS Variables.
  2. Some of the styles which are exposed do not have full CSS compatibility due to the affected elements being encapsulated in Shadow DOM. For example, I cannot pass my own CSS Variables to --d3fc-series variables, as the d3fc plugins are encapsulated and cannot see my variables.

Potential Solutions:

perspective-viewer-datagrid has an undocumented renderTarget property that helps a lot with regular-table styling when it is set to light, before any datagrid components are instantiated. Make this an attribute for perspective-viewer and propagate it to all subcomponents.

This lays the groundwork for encapsulating all subcomponents by default, making them safer while still keeping a back door unlocked for DX. It also doesn't require the whenDefined API on the application's side, which can be vulnerable to race conditions.

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