Hacker News new | ask | show | jobs
by Encave 4848 days ago
You can sort of do the same thing in just CSS by adding two small boxes as :after and :before pseudo elements.

See: http://i.imgur.com/aSnjEYx.png Not perfect, but pretty close.

Relevant SASS:

  $boxSize:30px

  &:hover:after, &:hover:before
    content: " "
    display: block
    position: absolute
    top: 50%
    right: -$boxSize
    height: $boxSize
    width: $boxSize
    background-color: transparent
    z-index: 1000
  
  &:hover:before
    right: auto
    left: -$boxSize