From 0d40a60aba8deb85173210a61cd1c0c413d7fd17 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Tue, 30 May 2017 14:31:18 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20lazy-loading=20of=20CodeMi?= =?UTF-8?q?rror=20interfering=20with=20editor=20(#717)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes https://github.com/TryGhost/Ghost/issues/8488 - don't lazy-load the CodeMirror styles in `gh-cm-editor` as they are already loaded and overridden --- app/components/gh-cm-editor.js | 4 +++- app/styles/patterns/global.css | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/components/gh-cm-editor.js b/app/components/gh-cm-editor.js index c31960de5e..3020f9ad6e 100644 --- a/app/components/gh-cm-editor.js +++ b/app/components/gh-cm-editor.js @@ -29,7 +29,9 @@ const CmEditorComponent = Component.extend(InvokeActionMixin, { let loader = this.get('lazyLoader'); RSVP.all([ - loader.loadStyle('codemirror', 'assets/codemirror/codemirror.css'), + // NOTE: no need to load the styles because we're already pulling + // them in via SimpleMDE and it causes conflicts with the editor + // loader.loadStyle('codemirror', 'assets/codemirror/codemirror.css'), loader.loadScript('codemirror', 'assets/codemirror/codemirror.js') ]).then(() => { scheduleOnce('afterRender', this, function () { diff --git a/app/styles/patterns/global.css b/app/styles/patterns/global.css index 6ea2fdc397..8af157b93d 100644 --- a/app/styles/patterns/global.css +++ b/app/styles/patterns/global.css @@ -329,6 +329,11 @@ pre tt { font-size: inherit; } +.CodeMirror pre { + font-family: var(--font-family-mono); + font-size: 0.9em; +} + kbd { display: inline-block; margin-bottom: 0.4em;