Skip to content

CSS

Selectors

:horizontal, :verticala row or block drawn in that direction: .bar:vertical { … }

Variables you set

Named along the scale, so they work in both directions. Set them on a block, or on the row to reach all its blocks.

VariableDefault
--rhp-radius2pxa Bar’s corners: one length (for different corners, use the next two or border-radius)
--rhp-start-radius--rhp-radiusthe corners where a Bar starts
--rhp-end-radius--rhp-radiusthe corners where a Bar ends (its value)
--rhp-gap0pxempty space at the start of a Bar
--rhp-label-gap5px after a value, 8px before the chartthe space between a Label and what it labels
--rhp-label-size12pxa Label’s font size
--rhp-tick-width2pxa Tick’s width
--rhp-cell-gap1pxthe space around a Cell
--rhp-length-time, --rhp-length-ease.15s, ease-outhow values move (CSS version)
--rhp-slide-time, --rhp-slide-ease.3s, ease-in-outhow rows slide to new places

Variables you read

Variable
--rhp-toward-endthe direction from a Bar’s start to its end: linear-gradient(var(--rhp-toward-end), …)
--rhp-colorthe block’s color
--rhp-ink, --rhp-muted, --rhp-grid, --rhp-surfacetheme colors
--rhp-series-1 … --rhp-series-6the theme’s series colors
--rhp-positive, --rhp-negative, --rhp-low, --rhp-highthe other theme colors
--rhp-fontthe theme’s font