use-css-light-dom
share your style sheets between LightDOM and ShadowDOM
Last updated
Was this helpful?
share your style sheets between LightDOM and ShadowDOM
Last updated
Was this helpful?
Was this helpful?
This hook creates a style tag in the lightDOM of the component, in order to insert that directly affect the lightDOM, before using this hook consider:
The css is not isolated as if it occurs in the shadowDOM.
It does not support the use of ::slotted selector.
import { useCssLightDom } from "@atomico/hooks/use-css-light-dom";
useCssLightDom(sheets: import("atomico").Sheets);
import { css } from "atomico";
import { useCssLightDom } from "@atomico/hooks/use-css-light-dom";
const sheet = css`
:host {
display: block;
background: black;
color: white;