Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | 20x 20x | /**
* What every chart in fe-core draws with: recessive axes, and the marks'
* colours as whole class strings (Tailwind cannot see interpolated ones).
* Marks draw in `currentColor`, so a mark's class sets its light and dark
* colour and the SVG never holds a hex literal.
*/
/** Axes and ticks: recessive, in the text colour of a caption. */
export const AXIS = {
tick: { fontSize: 10, fill: "currentColor" },
stroke: "currentColor",
className: "text-gray-400 dark:text-gray-500",
};
/**
* A sparkline's two inks: its history in the de-emphasis grey, the current
* period in the accent. Checked with the dataviz palette validator against
* the card surfaces (white; gray-800 in dark): each clears 3:1, the pair is
* separable under every colour-vision deficiency, and both sit in the
* lightness band. The grey "fails" only the chroma floor, as a neutral must.
*/
export const SPARK = {
history: "text-gray-500",
current: "text-indigo-600 dark:text-indigo-500",
/** A day with nothing on it: a hairline on the baseline. */
empty: "text-gray-200 dark:text-gray-700",
/** A reference line (a pass mark, a target). */
reference: "stroke-gray-300 dark:stroke-gray-600",
} as const;
|