this.template.css('visibility', 'hidden').show();
this._setPosition();
this.template.removeClass('top bottom left right').addClass(this.position)
+ this.template.removeClass('align-top align-bottom align-left align-right align-center').addClass('align-' + this.alignment);
/**
* Fires to close all other open tooltips on the page
color: $tooltip-color;
&::before {
- @include css-triangle($tooltip-pip-width, $tooltip-background-color, up);
position: absolute;
- bottom: 100%;
- left: 50%;
- transform: translateX(-50%);
}
- &.top::before {
- @include css-triangle($tooltip-pip-width, $tooltip-background-color, down);
- top: 100%;
- bottom: auto;
+ &.bottom {
+ &::before {
+ @include css-triangle($tooltip-pip-width, $tooltip-background-color, up);
+ bottom: 100%;
+ }
+
+ &.align-center::before {
+ left: 50%;
+ transform: translateX(-50%);
+ }
}
- &.left::before {
- @include css-triangle($tooltip-pip-width, $tooltip-background-color, right);
- top: 50%;
- bottom: auto;
- left: 100%;
- transform: translateY(-50%);
+ &.top {
+ &::before {
+ @include css-triangle($tooltip-pip-width, $tooltip-background-color, down);
+ top: 100%;
+ bottom: auto;
+ }
+
+ &.align-center::before {
+ left: 50%;
+ transform: translateX(-50%);
+ }
+ }
+
+ &.left {
+ &::before {
+ @include css-triangle($tooltip-pip-width, $tooltip-background-color, right);
+ left: 100%;
+ }
+
+ &.align-center::before {
+ bottom: auto;
+ top: 50%;
+ transform: translateY(-50%);
+ }
+ }
+
+ &.right {
+ &::before {
+ @include css-triangle($tooltip-pip-width, $tooltip-background-color, left);
+ right: 100%;
+ left: auto;
+ }
+
+ &.align-center::before {
+ bottom: auto;
+ top: 50%;
+ transform: translateY(-50%);
+ }
}
- &.right::before {
- @include css-triangle($tooltip-pip-width, $tooltip-background-color, left);
- top: 50%;
- right: 100%;
+ &.align-top::before {
bottom: auto;
+ top: 10%;
+ }
+
+ &.align-bottom::before {
+ bottom: 10%;
+ top: auto;
+ }
+
+ &.align-left::before {
+ left: 10%;
+ right: auto;
+ }
+
+ &.align-right::before {
left: auto;
- transform: translateY(-50%);
+ right: 10%;
}
}