mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Add custom properties to atom-workspace to track editor properties (#16731)
* Add custom properties to atom-workspace These track the editor's current font size, font family, and line height. * Move editor styles to text-editor; add monospace fallback * Add default font family So that there will always be a valid value. * Fix specs
This commit is contained in:
@@ -56,10 +56,10 @@ class WorkspaceElement extends HTMLElement {
|
||||
}
|
||||
|
||||
updateGlobalTextEditorStyleSheet () {
|
||||
const styleSheetSource = `atom-text-editor {
|
||||
font-size: ${this.config.get('editor.fontSize')}px;
|
||||
font-family: ${this.config.get('editor.fontFamily')};
|
||||
line-height: ${this.config.get('editor.lineHeight')};
|
||||
const styleSheetSource = `atom-workspace {
|
||||
--editor-font-size: ${this.config.get('editor.fontSize')}px;
|
||||
--editor-font-family: ${this.config.get('editor.fontFamily')};
|
||||
--editor-line-height: ${this.config.get('editor.lineHeight')};
|
||||
}`
|
||||
this.styleManager.addStyleSheet(styleSheetSource, {sourcePath: 'global-text-editor-styles', priority: -1})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user