Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Commit

Permalink
Provide a fallback when backporting font family property
Browse files Browse the repository at this point in the history
Summary: See title

Reviewed By: hansonw

Differential Revision: D7157457

fbshipit-source-id: 59d40bcfc2556998a3fdada91dc23fb443622a39
  • Loading branch information
Will Binns-Smith authored and hansonw committed Mar 5, 2018
1 parent 1f384ab commit 6276d7c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import {Observable} from 'rxjs';
import invariant from 'assert';
import semver from 'semver';

const DEFAULT_FONT_STACK = "Menlo, Consolas, 'DejaVu Sans Mono', monospace";

export default function installTextEditorStyles(): IDisposable {
if (semver.gte(atom.appVersion, '1.26.0')) {
// this behavior is part of 1.26 and greater
Expand Down Expand Up @@ -46,7 +48,7 @@ export default function installTextEditorStyles(): IDisposable {
const styleSheetSource = `
atom-workspace {
--editor-font-size: ${fontSize}px;
--editor-font-family: ${fontFamily};
--editor-font-family: ${fontFamily || DEFAULT_FONT_STACK};
--editor-line-height: ${lineHeight};
}
`;
Expand Down

0 comments on commit 6276d7c

Please sign in to comment.