Repository navigation
v2.3.0
Dark mode, and a Tailwind theme that reads the --rnx-* tokens. npm test
reports 907 passing, exit 0.
Added
- Dark mode.
setMode('light' | 'dark' | 'system'),getMode()and
getResolvedMode()setdata-modeon<html>, save the choice in
localStorage(rnx-mode) and followprefers-color-schemelive in
systemmode. The default stays light.css/rnx.cssgains a dark token
block on[data-mode="dark"]and[data-theme="dark"], and a test checks
that it overrides every colour the Tailwind theme reads and that the text
pairs reach AA on the dark tokens.setModealso setsdata-bs-theme, so
Bootstrap 5.3's own dark styling follows. The Tailwind checkbox tick, radio
dot and modal and drawer scrims have dark variants. (#9)
Changed
- The Tailwind theme reads
--rnx-*tokens. Colours come from CSS
variables with the old Tailwind hex as the fallback, so with nothing set the
look is unchanged. Remappingcolors.indigoin your Tailwind config no
longer affects the theme; set the tokens instead. Tints, hover fills and
focus rings usecolor-mix(), so browsers without it (Chrome 111, Safari
16.2, Firefox 113) lose them. (#72, via #71) - The focus ring offset follows
--rnx-surfaceinstead of white. (#9)