sdras / night-owl-vscode-theme

🌌 NIGHT OWL: A VS Code dark theme for contrast for nighttime coding, 🦉 LIGHT OWL: a daytime light theme
https://aka.ms/nightowl
MIT License
2.82k stars 243 forks source link

Reduce specificity of selectors #319

Open kentcdodds opened 1 year ago

kentcdodds commented 1 year ago

Please make sure you're using the latest version of the plugin before submitting an issue

Screenshots

227631785-8b0f2c70-a168-44e6-bc15-defcc3803930

When working in an .mdx file with the latest mdx highlighter, I'm no longer getting highlights for several things which the maintainer of the mdx language highlighter is telling me is due to Night Owl being overly specific in its selectors:

And that’s where we find a very important bug in Night Owl:

Looking at almost all scopes in Night Owl, they are super specific. Specific to JS, or to JSX, or to markdown. And they’re not supposed to be like that, they’re supposed to as vague as possible (markdup.heading), unless you really need to differentiate markup.heading.markdown from others (e.g. markup.heading.html) or so.

So that’s where a lot of the problems come from!

Inline code

  • GitHub : markup.raw
  • VS Code Solarized: markup.inline.raw
  • VS Code Night Owl: markup.inline.raw.markdown

I think this is a weird choice in VS Code themes to go with markup.inline.raw. markup.raw.inline makes more sense, then you can also have markup.raw.block. But I’ve just pushed the name VS Code uses: 60fa64b. Note that Night Owl still should drop the .markdown suffix.

That last comment is the suggestion:

Night Owl still should drop the .markdown suffix.

Could we do that?

andreluis-oliveira commented 1 year ago

@kentcdodds PR to fix support to mdx files.

Before: before

After: after