5 ms·
Cannot be themed or customized without regenerating the font. Can be used when syntax highlighting is not available.
by 29athrowaway 2y ago
Cannot be themed or customized without regenerating the font.
Can be used when syntax highlighting is not available.
- california-og 2y agoI was informed that the color palette can be changed with `override-colors` css rule, but havent had time to update the blog post yet.
- Timon3 2y agoMaybe this could also be implemented using variable fonts[0]. This would probably make it easier to configure in non-browser environments (once this is better supported by font selectors etc). [0]: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_fonts/Variable_fonts_guide https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_fonts/V...
- jfk13 2y agoI tried it (via Firefox DevTools) on your example page by inserting a @font-palette-values rule alongside the @font-face that loads the font: @font-palette-values --mycolors { font-family: Monaspace; base-palette: 0; override-colors: 0 red, 1 green, 2 blue, 3 magenta, 4 cyan, 5 yellow; } (I just picked some arbitrary colors as a proof-of-concept; they don't actually look good.) Then adding the property: font-palette: --mycolors; to the textarea element causes it to use these colors instead of the defaults in the font.