t9md / atom-quick-highlight

Highlight text quickly
https://atom.io/packages/quick-highlight
MIT License
32 stars 7 forks source link

At Atom 1.13.0, highlights are too opaque and cover selections #16

Closed jonboiser closed 7 years ago

jonboiser commented 7 years ago

Hi, I just noticed this after updating to Atom 1.13.0.

I haven't been able to do much analysis, but here's a screenshot of what's happening: screen shot 2017-01-11 at 10 55 13 am

I did some investigation of div.highlights, but not sure what style is causing this.

t9md commented 7 years ago

what's your setting? I cannot reproduce it. Btw, I don't recommend decoration style set highlight, use underline or box.

jonboiser commented 7 years ago

I didn't have any custom rules on my stylesheet. I just added the snippet on the README and it fixed it for me. But here's what was going on before I did that: It was giving a background color of #888888, instead of transparent.

screen shot 2017-01-11 at 1 57 38 pm
gouegd commented 7 years ago

ah, the code is using the @syntax-result-marker-color variable from atom's variables. I suppose your own customisation (or one done by the UI theme you use) set that color and happens to be a bad fit here.

The snippet in the README however uses another variable, @syntax-text-color, that's strange, but it worked out better for you.

gouegd commented 7 years ago

My mistake, above - the snippet in the README uses transparent for the background color. This is what fixes this issue. I actually just had the same issue upgrading from 0.6.1 to 0.8. I suggest changing the default background color from @syntax-result-marker-color to transparent in the source as well (or any color with transparency)

jonboiser commented 7 years ago

@gouegd Is this the line you're referring to?

https://github.com/t9md/atom-quick-highlight/blob/master/styles/quick-highlight.less#L31

I've been updating this package every release, but hadn't noticed this issue until I upgraded Atom yesterday.

gouegd commented 7 years ago

Yes, that's where the opaque background color comes from in our case. You're probably right that it's due to the latest Atom upgrade, I also upgraded that at the same time than most of the packages I use.

t9md commented 7 years ago

OK, sorry for this inconvenience, I understand it's frustrated. Now I could repro and understand what you guys discussing.

Syntax I tried and result

Reason

What was bad.

If this color is defined as some transparency, result is good. But if not, selection highlight hide selected text(bad).

And setting z-index value seems very problematic, will remove. Will put instruction on README.md.

Will fix soon.

t9md commented 7 years ago

released as v0.8.1, thanks for reporting