Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

[Dark] [Light] [HTML] Too much italics in STYLE element. #10

Zegnat opened this Issue Apr 26, 2011 · 6 comments


None yet
2 participants

Zegnat commented Apr 26, 2011

Currently you are setting source.css.embedded.html to italics. This is wrong. Only the tag name (style) should use italics. The way it is set-up now attributes (likes type) and the tag itself (< and >) use italics as well.

  • source.css.embedded.html should use the regular font.
  • source.css.embedded.html entity.name.tag.style.html should use the italic font.

deplorableword commented Apr 26, 2011

This issue is now fixed in light and dark, thanks for spotting it. 8626d5f


Zegnat commented Apr 27, 2011

It’s not fixed for me. The type attribute it still displayed in italics. Another clear sign of this bug is how ID selectors (#id) are being italicised.

The culprit seems to be “HTML: Embeddable” which sets source.css.embedded.html to italic. It seems this rule is used to italicise the <!-- --> used to hide CSS from ancient browsers? I’ve been toying around with it but it seems impossible to italicise only the HTML comment…

This TextMate selector was the closest I got: source.css.embedded.html - entity - meta - punctuation.

This will pass on any entity (these are attributes inside the style tag), any meta (these are all matched CSS elements, eg. selectors) and any punctuation (these match the < and > of the style tag). This is only close because it will still italicise characters within the tag that it doesn’t have other selectors for, like the = between the attribute name and value.

(Incidentally this also means the = takes on the colour set to source.css.embedded.html making it a lighter base colour than it should be.)


Zegnat commented Apr 30, 2011

Yes, that is the only other real solution: to not italicise source.css.embedded.html at all.

It also looks like it’s a too light base colour or is that just me? Comments (in Dark) would normally be base01 (#586E75) according to Solarized Usage & Development.

(Sorry, I accidentally hit “Comment & Close”.)

@Zegnat Zegnat closed this Apr 30, 2011

@Zegnat Zegnat reopened this Apr 30, 2011


deplorableword commented Apr 30, 2011

Cool, I'll go ahead and merge in that change.


deplorableword commented Apr 30, 2011

Just added in those changes, I've also learned you can prevent a selector from inheriting italics by setting an unsetting italics in theme editor which creates an empty fontStyle.

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