Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/picturepan2/spectre.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYan Zhu <picturepan2@hotmail.com>2017-08-29 13:07:53 +0300
committerYan Zhu <picturepan2@hotmail.com>2017-08-29 13:07:53 +0300
commite78b3c34348f26d40a813612c5a3786f1c56607a (patch)
treef857491026c5f728fe95fe1564ec30c931a1b30a /src/_tooltips.scss
parent66c492fd05c2d720c81e2be8d6845560b868e7ff (diff)
Initial SASS build
Diffstat (limited to 'src/_tooltips.scss')
-rw-r--r--src/_tooltips.scss77
1 files changed, 77 insertions, 0 deletions
diff --git a/src/_tooltips.scss b/src/_tooltips.scss
new file mode 100644
index 0000000..90cf1ad
--- /dev/null
+++ b/src/_tooltips.scss
@@ -0,0 +1,77 @@
+// Tooltips
+.tooltip {
+ position: relative;
+ &::after {
+ background: rgba($dark-color, .9);
+ border-radius: $border-radius;
+ bottom: 100%;
+ color: $light-color;
+ content: attr(data-tooltip);
+ display: block;
+ font-size: $font-size-sm;
+ left: 50%;
+ max-width: $control-max-width;
+ opacity: 0;
+ overflow: hidden;
+ padding: $unit-1 $unit-2;
+ pointer-events: none;
+ position: absolute;
+ text-overflow: ellipsis;
+ transform: translate(-50%, $unit-2);
+ transition: all .2s ease;
+ white-space: nowrap;
+ z-index: $zindex-3;
+ }
+ &:focus,
+ &:hover {
+ &::after {
+ opacity: 1;
+ transform: translate(-50%, -$unit-1);
+ }
+ }
+ &[disabled],
+ &.disabled {
+ pointer-events: auto;
+ }
+
+ &.tooltip-right {
+ &::after {
+ bottom: 50%;
+ left: 100%;
+ transform: translate(-$unit-1, 50%);
+ }
+ &:focus,
+ &:hover {
+ &::after {
+ transform: translate($unit-1, 50%);
+ }
+ }
+ }
+ &.tooltip-bottom {
+ &::after {
+ bottom: auto;
+ top: 100%;
+ transform: translate(-50%, -$unit-2);
+ }
+ &:focus,
+ &:hover {
+ &::after {
+ transform: translate(-50%, $unit-1);
+ }
+ }
+ }
+ &.tooltip-left {
+ &::after {
+ bottom: 50%;
+ left: auto;
+ right: 100%;
+ transform: translate($unit-2, 50%);
+ }
+ &:focus,
+ &:hover {
+ &::after {
+ transform: translate(-$unit-1, 50%);
+ }
+ }
+ }
+}