Skip to content
This repository was archived by the owner on Apr 4, 2019. It is now read-only.
This repository was archived by the owner on Apr 4, 2019. It is now read-only.

delegate hover states to CSS instead of javascript #45

@jonathanong

Description

@jonathanong

i'm getting bugs with highlighting and mouse states, but i can't seem to figure out why (sucks because everything is disabled when i blur to inspect element). can we remove checking mouse states and delegate that to CSS? it will make it more difficult for implementors, but it'll be less buggy.

// Regular background
.select-option,
.select-options:hover .highlighted
  background-color: white

// Highlighted background
.highlighted,
.select-option:hover
  background-color: blue

this means that just hovering over an option won't select that option as highlighted in JS-land, but i don't think that should happen in the first place.

actually that won't even work. .select-option:hover needs higher specificity than .select-options:hover .highlighted. arghhh

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions