primer / github-syntax-theme-generator

Uses a prettylights theme object to generate syntax themes for multiple platforms
MIT License
156 stars 33 forks source link

Move the bracket matcher up in the index #48

Closed jonrohan closed 7 years ago

jonrohan commented 7 years ago

This fixes https://github.com/primer/github-syntax-theme-generator/issues/41 by moving the bracket-matcher up in the index order. The cursor-line was given a highlight color and visible above the bracket-matcher.

@lee-dohm would a fix in this way be problematic in any way?

lee-dohm commented 7 years ago

@jonrohan I don't believe so. @simurai would know better than I would though.

I'm wondering though if cursor-line styles are, in essence, modifications of the editor background and therefore should be pushed down in the z-index instead of bracket-matcher or other decorations being pulled up?

simurai commented 7 years ago

should be pushed down in the z-index instead

That might be problematic since the .cursor-line class gets added on each .line, so all the code/text would get pushed down too. Maybe if the cursor-line gets its own pseudo element? Or Atom core moves the cursor-line into .highlights?

Other options are:

  1. The One themes use a semi transparent background so that you can still see highlights underneath. But the color 🚓 police probably doesn't like these special cases.
  2. Find and Replace uses z-index: 0 to be above. So yeah, using z-index: 1 for bracket-matcher should be fine. 👍 Autocomplete is on z-index: 4.

A concern might be performance, but hard to judge without some extensive testing. Semi transparent backgrounds are bad for performance too.