mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
Support for solarized dark and light themes
CodeMirror seems to have the two solarized themes within the `node_modules/coemirror/theme/solarized.css`. So passing the string "solarized light" and "solarized dark" to the editor theme appropriately sets these themes. The Boostnote app appears to be dynamically determining themes based on the css files found within `node_modules/codemirror/theme/`. So that's why there was just a single option of 'solarized' before. The light and dark 'solarized' themes appear to be the *only* themes that share a css style, whereas all other light and dark variarnt themes get their own css file (ex: base16-dark.css and base16-light.css). Weird!
This commit is contained in:
@@ -61,7 +61,7 @@ class UiTab extends React.Component {
|
||||
const newCodemirrorTheme = this.refs.editorTheme.value
|
||||
|
||||
if (newCodemirrorTheme !== codemirrorTheme) {
|
||||
checkHighLight.setAttribute('href', `../node_modules/codemirror/theme/${newCodemirrorTheme}.css`)
|
||||
checkHighLight.setAttribute('href', `../node_modules/codemirror/theme/${newCodemirrorTheme.split(" ")[0]}.css`)
|
||||
}
|
||||
|
||||
this.setState({ config: newConfig, codemirrorTheme: newCodemirrorTheme })
|
||||
|
||||
Reference in New Issue
Block a user