dashboard
dashboard copied to clipboard
a11y: CodeMirror colour palette
Context
Our code blocks use CodeMirror with a set of colours that should be improved.
Problem We identified several accessibility/usability issues with the colour palette:
- It's the same for both Light and Dark modes. This means that clear colours don't work on light backgrounds, and darker colours fail on dark backgrounds.
- Boolean values and comments fail on dark backgrounds
- String values fail on light backgrounds
- Number values take the same colour as keys/props and are not properly differentiated
Solution Light mode colour palette:
plain-text, .cm-meta: var(--body-text)
.cm-string: #00529F
.cm-number: #005E3B
.cm-keyword: #B94545
.cm-atom: #921E80
.cm-comment: #8F5536
Dark mode colour palette: TBD
@edenhernandez-suse Are you really planning this for 2.12.0?
You may want to consider also resolving this https://github.com/rancher/dashboard/issues/5485 at the same time.