Skip to content

pantoken-root / plugins/pantoken/custom-theme-colors/src / CustomThemeColorsCssOptions

Interface: CustomThemeColorsCssOptions ​

Beta

Options for the customIcons plugin.

Properties ​

selector? ​

optional selector?: string

Beta

Selector prefix the conditional [data-pantoken-color="…"] rules are scoped under. Defaults to :root. Two callers can each pass a different selector (e.g. :root for a page's chrome and #some-tray for a nested widget) to run independent, non-interfering colour instances on the same page — each toggles its own attribute on its own element instead of sharing :root.


resetSelector? ​

optional resetSelector?: string

Beta

An additional selector whose subtree should always render the true, unremapped colours, regardless of what an ancestor's [data-pantoken-color] scope currently has active. Emits one unconditional rule pinning every token this plugin can override back to its own base value — e.g. a colour-swatch legend nested inside an already-themed page needs its reference swatches to stay constant rather than inherit the ancestor's remap.


custom? ​

optional custom?: string

Beta

A brand hex (#rgb/#rrggbb) to derive the custom scale from. When set, a [data-pantoken-color="custom"] rule is appended — see customColorCss.