$stratum: 30000 $distance-from-trigger: 6px $corner-size: 8px $background: #666

.up-tooltip

z-index: $stratum
position: absolute
background-color: $background
color: white
padding: 6px 9px
white-space: nowrap

&[up-position=top]
  margin-top: -$distance-from-trigger
  &:after
    content: ''
    position: absolute
    border-style: solid
    border-width: $corner-size $corner-size 0
    border-color: $background transparent
    display: block
    width: 0
    z-index: 1
    bottom: -$corner-size
    left: 50%
    margin-left: -$corner-size

&[up-position=bottom]
  margin-top: $distance-from-trigger
  &:after
    content: ''
    position: absolute
    border-style: solid
    border-width: 0 $corner-size $corner-size
    border-color: $background transparent
    display: block
    width: 0
    z-index: 1
    top: -$corner-size
    left: 50%
    margin-left: -$corner-size