connors / photon

The fastest way to build beautiful Electron apps using simple HTML and CSS
photonkit.com
MIT License
10.01k stars 580 forks source link

Shouldn't be able to highlight two items in list-group #39

Closed louy closed 9 years ago

louy commented 9 years ago

Hi,

If you look at native UI components in OSX, you can't highlight two list items at the same time. The experience feels really weird when I have a selected item and I click on another one and both get highlighted.

I see two solutions here:

  1. Don't highlight on .list-group-item:active (Finder.app behaves like this in sidebar)
  2. Remove highlight on .list-group:active .list-group-item.selected:not(:active) (Finder.app behaves like this with folder content)
connors commented 9 years ago

Good catch. I actually see a few things wrong with my code here. I'll take a look this weekend.

louy commented 9 years ago

:+1: I solved it like this for now.

screen shot 2015-10-17 at 01 43 12

connors commented 9 years ago

Fixed in https://github.com/connors/photon/commit/d017253d415919b4cc8adea3c786c1036f90c0c7.

louy commented 9 years ago

:+1: I did something similar in my new app Lawha. I had to rely on javascript because :hover doesn't work with mousedown. Specifically here.

Thanks for this awesome project btw 😊

connors commented 9 years ago

:+1: :heart: