larsenwork / monoid

Customisable coding font with alternates, ligatures and contextual positioning. Crazy crisp at 12px/9pt. http://larsenwork.com/monoid/
7.86k stars 170 forks source link

Provided Atom stylesheet no longer works #175

Closed gsklee closed 7 years ago

gsklee commented 7 years ago

Atom stylesheet: https://gist.github.com/larsenwork/255432b5101093fb07bc

It no longer works in Atom v1.13.0; the issue seems to be three-fold:

  1. Shadow DOM is no longer being used in Atom since v1.13.0, so I changed the stylesheet to:
atom-text-editor .cursor-line {
  -webkit-font-feature-settings: "liga" off, "calt" off;
}
  1. Still doesn't work; turned out font-feature-settings is no longer prefixed since Chrome v48, so changed my stylesheet to:
atom-text-editor .cursor-line {
  font-feature-settings: "liga" off, "calt" off;
}
  1. Still doesn't work; turned out the font-feature-settings property is not being inherited by child elements:

.cursor-line has "liga" off, "calt" off

http://i.imgur.com/tMiU3lU.png

Not so true for its descendents

http://i.imgur.com/y5z8bml.png

Baffled by the third one because the property should be inherited according to the MDN docs.

gsklee commented 7 years ago

Can be fixed with:

* {
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga" on, "calt" on;
}

atom-text-editor .cursor-line span {
  font-feature-settings: "liga" off, "calt" off;
}

Probably related: https://github.com/w3c/csswg-drafts/issues/552

larsenwork commented 7 years ago

Closed since I'm assuming @gsklee comment fixed this. Someone please feel free to PR working example.

Nevermind. Just updated the gist.