Skip to content

Commit

Permalink
doc(position): add comments for +1px space hack.
Browse files Browse the repository at this point in the history
  • Loading branch information
chinchang committed Mar 26, 2016
1 parent 1b85cb3 commit e76f9fa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hint-position.scss
Expand Up @@ -12,7 +12,8 @@

@mixin vertical-positioned-tooltip($propertyY, $transitionDirection, $xDirection:0) {
&:before {
// bring arrow inside so that it animates to normal position when shown
// bring arrow inside so that it animates to normal position when shown.
// HACK: +1px to avoid the 1 px white space between arrow and body during transition.
margin-#{$propertyY}: -2 * $hintArrowBorderWidth + 1px;
}

Expand Down Expand Up @@ -52,6 +53,7 @@
@mixin horizontal-positioned-tooltip($propertyX, $transitionDirection) {
&:before {
// bring arrow inside so that it animates to normal position when shown
// HACK: +1px to avoid the 1 px white space between arrow and body during transition.
margin-#{$propertyX}: -2 * $hintArrowBorderWidth + 1px;
// bring back to center vertically
margin-bottom: -1 * $hintArrowBorderWidth;
Expand Down

0 comments on commit e76f9fa

Please sign in to comment.