Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/components/_tooltips.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
// Position
position: absolute;
z-index: 1;
inset-block-end: 50%;
// if --start / --end exist, then it's a line chart, and we calculate
// the larger of the two to place the tooltip above the line segment;
// if --start and --end don't exist, fallback to 0.5 * 100% = 50%,
// which is the default tooltip position for e.g. bar charts
inset-block-end: calc(max(var(--start, 0.5), var(--end, 0.5)) * 100%);
inset-inline-start: 50%;
width: max-content;
padding: 5px 10px;
Expand Down