Skip to content

Instantly share code, notes, and snippets.

@tterb
Created March 19, 2019 21:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tterb/b34d47ca2621233ef1f3400d49bb8aa6 to your computer and use it in GitHub Desktop.
Save tterb/b34d47ca2621233ef1f3400d49bb8aa6 to your computer and use it in GitHub Desktop.
A styles.less for using a combination of Operator Mono italics and FiraCode ligatures in Atom
atom-text-editor {
font-family: 'Operator Mono', 'FiraCode', monospace !important;
font-size: 13.5px;
font-weight: 500;
font-style: normal;
letter-spacing: 0.0175em;
line-height: 1.6;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
&.editor .syntax--string.syntax--quoted,
&.editor .syntax--string.syntax--regexp {
-webkit-font-feature-settings: 'liga' off, 'calt' off;
}
}
// Handle Operator Mono italics
.syntax--attribute-name.syntax--html,
.syntax--entity.syntax--other.syntax--attribute-name.syntax--html,
.syntax--keyword.syntax--html,
.syntax--support.syntax--function.syntax--without-args.syntax--liquid,
.syntax--punctuation.syntax--tag.syntax--liquid,
.syntax--control.syntax--scss,
.syntax--comment.syntax--block.syntax--scss,
.syntax--keyword.syntax--other:not(.syntax--unit), // !important
.syntax--emphasis.syntax--italic.syntax--markup.syntax--md,
.syntax--keyword.syntax--control.syntax--module.syntax--ruby,
// .syntax--variable.syntax--other.syntax--readwrite.syntax--instance.syntax--ruby,
.syntax--entity.syntax--name.syntax--tag.syntax--reference {
font-family: 'Operator Mono', 'FiraCode', monospace !important;
// font-style: italic !important;
}
.syntax--variable.syntax--other.syntax--liquid,
.syntax--support.syntax--class.syntax--liquid,
.syntax--support.syntax--variable.syntax--liquid,
.syntax--punctuation.syntax--tag.syntax--liquid,
.syntax--punctuation.syntax--output.syntax--liquid {
font-style: normal !important;
}
.syntax--storage.syntax--modifier.syntax--js,
.syntax--entity.syntax--other.syntax--attribute-name.syntax--jsx,
.syntax--meta.syntax--attribute-with-value {
font-family: 'Operator Mono', 'FiraCode', monospace !important;
font-style: italic;
}
.syntax--punctuation.syntax--separator,
.syntax--string.syntax--quoted {
font-style: normal;
}
// Add Fira Code ligatures to Operator Mono
atom-text-editor.editor {
.syntax--storage.syntax--type.syntax--function.syntax--arrow,
.syntax--keyword.syntax--operator:not(.accessor),
.syntax--punctuation.syntax--definition,
.syntax--punctuation.syntax--liquid,
.syntax--keyword.syntax--other.syntax--unit.syntax--percentage,
.syntax--keyword.syntax--operator.syntax--other.syntax--ruby,
.syntax--entity.syntax--other.syntax--attribute-name.syntax--id.syntax--css,
.syntax--punctuation.syntax--section.syntax--property-list {
font-family: 'Fira Code','Operator Mono', monospace;
font-size: 13.5px;
// font-weight: 400;
}
.syntax--string.syntax--quoted,
.syntax--string.syntax--regexp {
-webkit-font-feature-settings: 'liga' off, 'calt' off;
}
.syntax--keyword.syntax--operator.syntax--other.syntax--ruby {
font-style: normal !important;
}
// Arrow function
.syntax--function.syntax--arrow.syntax--js {
font-family: 'FiraCode', 'Operator Mono', monospace;
font-variant-ligatures: normal;
font-feature-settings: 'calt' 1;
}
}
.syntax--keyword.syntax--operator.syntax--spread {
letter-spacing: -0.1em !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment