Dark / light mode theming for MSK digital products.
npm install @mskcc/themes
Add the following to your application.
Note: For explicit control on the dark and light theme, turn
$system-dark-mode
tofalse
.@use '@mskcc/themes' with ($system-dark-mode: false)
@use '@mskcc/themes';
@import '@mskcc/themes/dist/themes.css';
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@mskcc/themes@latest/dist/themes.css"
/>
import { lightTheme, darkTheme } from '@mskcc/themes';
const style = {
bg: lightTheme.colorBg,
};
You can also use the tokens directly in your scss
and css
stylesheets.
@use '@mskcc/themes/tokens' as tk;
body {
background-color: tk.$msk--color-bg;
}
body {
background-color: var(--msk-color-bg);
}