Skip to content

Instantly share code, notes, and snippets.

@nemoDreamer
Created May 20, 2017 12:16
Show Gist options
  • Save nemoDreamer/f40be00da6707ee9f3b171144690f94f to your computer and use it in GitHub Desktop.
Save nemoDreamer/f40be00da6707ee9f3b171144690f94f to your computer and use it in GitHub Desktop.
Subtle italics in Atom syntaxes
atom-text-editor.editor {
.syntax--punctuation.syntax--whitespace.syntax--comment.syntax--leading,
.syntax--source {
font-family: FiraCode-Retina; // https://github.com/tonsky/FiraCode
text-rendering: optimizeLegibility;
letter-spacing: 0;
}
.syntax--string.quoted,
.syntax--string.regexp {
-webkit-font-feature-settings: 'liga' off, 'calt' off;
}
.syntax--source.syntax--js.syntax--jsx > .keyword.control.flow.jsx,
.syntax--comment, .syntax--type .syntax--function,
// .syntax--storage.syntax--type:not(.syntax-arrow), // allow "Fira Code" to show arrow ligature,
.syntax--constant.syntax--other.syntax--object.syntax--key,
.syntax--entity.syntax--other.syntax--attribute-name.syntax--jsx,
.syntax--keyword.syntax--control.syntax--flow,
.syntax--keyword.syntax--control.syntax--module,
.syntax--storage.syntax--modifier {
// --- font variations:
// Space Mono:
// https://fonts.google.com/specimen/Space+Mono
font-family: 'Space Mono';
letter-spacing: -0.01em; // make "Space Mono" match "Fira Code" char width
// --- or
// Fantasque Sans Mono:
// https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/FantasqueSansMono/Italic
// font-family: FantasqueSansMonoNerdFontCM-Italic;
// letter-spacing: 0.0825em; // make "Fantasque Sans Mono" match "Fira Code" char width
// ---
font-size: 1em;
font-style: italic;
}
}
@robinpokorny
Copy link

Thank you!

BTW Line 16 should have :not(.syntax--arrow) in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment