Skip to content

Commit

Permalink
add a persisted tooltip type
Browse files Browse the repository at this point in the history
  • Loading branch information
chinchang committed Jan 20, 2013
1 parent fff7f48 commit 9e5c7af
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 13 deletions.
41 changes: 41 additions & 0 deletions src/hint-always.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* source: hint-always.scss
*
* Defines a persisted tooltip which shows always.
*
* Classes added:
* 1) hint--always
*
*/

// mixin to set margin on tooltip using translate transform
@mixin set-margin($property, $transitionDirection) {
&:after, &:before {
-webkit-transform: #{$property}($transitionDirection * $transitionDistance);
-moz-transform: #{$property}($transitionDirection * $transitionDistance);
transform: #{$property}($transitionDirection * $transitionDistance);
}
}

.hint--always {
&:after, &:before {
opacity: 1;
}

&.hint--top {
+set-margin('translateY', -1);
}

&.hint--bottom {
+set-margin('translateY', 1);
}

&.hint--left {
+set-margin('translateX', -1);
}

&.hint--right {
+set-margin('translateX', 1);
}
}

12 changes: 0 additions & 12 deletions src/hint-duration.scss

This file was deleted.

2 changes: 1 addition & 1 deletion src/hint.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
@import "src/hint-core";
@import "src/hint-position";
@import "src/hint-color-types";
@import "src/hint-duration";
@import "src/hint-always";

0 comments on commit 9e5c7af

Please sign in to comment.