Skip to content

Instantly share code, notes, and snippets.

@5310
Last active September 23, 2021 09:39
Show Gist options
  • Save 5310/b561dd447a7e36aa8d78 to your computer and use it in GitHub Desktop.
Save 5310/b561dd447a7e36aa8d78 to your computer and use it in GitHub Desktop.
Fira Code, and sexy ligatures! #theme #userstyle
Userstyles to the monospace fonts on certain sites and the Firefox Devtools, etc., to Fira Code.
I don't write userstyles very often, so these may not be particularly effecient or sensible. But at least they work. Corrections welcome!
Stylish of Firefox (at least) allows importing userstyles from arbitrary urls. It doesn't auto-update though, but mays till be easier than pasting by hand? :shrug:
@-moz-document url-prefix('https://atom.io/') {
.markdown-body pre, code {
font-family: "Fira Code" !important;
}
}
@-moz-document url-prefix('https://babeljs.io/repl/') {
div.ace_text-layer, div.babel-repl-reporter {
font-family: "Fira Code" !important;
}
}
@-moz-document url-prefix('https://codepen.io/') {
pre {
font-family: "Fira Code" !important;
}
}
*.devtools-monospace {
font-family: "Fira Code" !important;
}
@-moz-document url-prefix('https://app.gistboxapp.com') {
code, div.ace_editor, .blob-code {
font-family: "Fira Code" !important;
}
}
@-moz-document url-prefix('https://github.com'), url-prefix('https://gist.github.com') {
pre, code, div.ace_editor, .blob-code {
font-family: "Fira Code" !important;
}
}
@-moz-document url-prefix('https://glitch.com') {
pre {
font-family: "Fira Code" !important;
}
}
@-moz-document url-prefix('http://hashify.me') {
pre, code, textarea {
font-family: "Fira Code" !important;
}
}
@-moz-document url-prefix('https://jsfiddle.net/') {
pre, code {
font-family: "Fira Code" !important;
font-variant-ligatures: normal !important;
}
}
@-moz-document url-prefix('https://leanpub.com/') {
pre, code {
font-family: "Fira Code" !important;
}
}
@-moz-document url-prefix('https://learnxinyminutes.com') {
pre, code {
font-family: "Fira Code" !important;
}
}
@-moz-document url-prefix('http://try.purescript.org'), url-prefix('http://purescript.org') {
pre, code, .ace_editor {
font-family: "Fira Code" !important;
}
}
/* Repl.it doesn't take kindly to variable width fonts. Breaks.
@-moz-document url-prefix('https://repl.it/') {
div.ace_text-layer, pre.jqconsole {
font-family: "Fira Code" !important;
}
}
*/
@-moz-document url-prefix('https://runkit.com/') {
div.CodeMirror-scroll {
font-family: "Fira Code" !important;
}
}
@-moz-document domain('slack.com') {
pre, code {
font-family: "Fira Code" !important;
}
}
@VFDan
Copy link

VFDan commented Apr 23, 2020

Note: for these to work in Firefox, you need to set layout.css.moz-document.content.enabled in about:config to true.

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