Chart tooltip: app-owned token styling, drop vega-tooltip's default sheet

This commit is contained in:
2026-06-14 01:25:58 +03:00
parent e4d1466ab0
commit 236b1c8a37
2 changed files with 74 additions and 0 deletions
+8
View File
@@ -173,6 +173,14 @@ export async function renderSpec(
actions: false, // Astrolabe owns its own export/copy affordances
renderer,
config,
// Suppress vega-tooltip's bundled light/dark stylesheet so the app owns the
// tooltip's look. With the default style gone, the single `#vg-tooltip-element`
// it appends to <body> is styled entirely from our design tokens in base.css —
// surface, type, and the key/value table — and follows `[data-theme]` for free
// (the element inherits the cascade from <html>). vega-tooltip still positions
// the element (inline top/left) and toggles `.visible`; our CSS supplies the
// structural rules (position/visibility/z-index) the default sheet used to.
tooltip: { disableDefaultStyle: true },
});
return {