fix: rename --color-primary-chubb to --color-primary-contrast-offset and fallback to primary color if not present (#4803)
* fix: fallback to primary color if --color-primary-chubb not present * rename to --color-primary-contrast-offset * use contarst-offset Co-authored-by: David Luzar <luzar.david@gmail.com> * Update src/packages/excalidraw/README_NEXT.md * remove * Update src/packages/excalidraw/README_NEXT.md Co-authored-by: David Luzar <luzar.david@gmail.com> Co-authored-by: David Luzar <luzar.david@gmail.com>
This commit is contained in:
src
components
css
excalidraw-app
packages
excalidraw
@ -374,7 +374,7 @@ Most notably, you can customize the primary colors, by overriding these variable
|
||||
- `--color-primary-darker`
|
||||
- `--color-primary-darkest`
|
||||
- `--color-primary-light`
|
||||
- `--color-primary-chubb` — a slightly darker (in light mode), or lighter (in dark mode) `--color-primary` color to account for [Chubb illusion](https://en.wikipedia.org/wiki/Chubb_illusion).
|
||||
- `--color-primary-contrast-offset` — a slightly darker (in light mode), or lighter (in dark mode) `--color-primary` color to fix contrast issues (see [Chubb illusion](https://en.wikipedia.org/wiki/Chubb_illusion)). It will fall back to `--color-primary` if not present.
|
||||
|
||||
For a complete list of variables, check [theme.scss](https://github.com/excalidraw/excalidraw/blob/master/src/css/theme.scss), though most of them will not make sense to override.
|
||||
|
||||
|
@ -40,3 +40,10 @@
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.excalidraw {
|
||||
--color-primary: #faa2c1;
|
||||
--color-primary-darker: #f783ac;
|
||||
--color-primary-darkest: #e64980;
|
||||
--color-primary-light: #fcc2d7;
|
||||
}
|
||||
|
Reference in New Issue
Block a user