summaryrefslogtreecommitdiffstats
path: root/components/tooltip/_tooltip.scss
blob: 3f255ed8f52be96eb984044a970db6dec6d6474a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/* Tooltip animation */
@keyframes animation-fade-in-from-bottom {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0px);
        opacity: 1;
    }
}

/* Tooltop styles */
.sdc-tooltip {
    @include base-font-regular;
    line-height: 14px;
    font-size: 12px;
    max-width: 223px;
    background-color: $black;
    color: $white;
    text-align: left;
    border-radius: 2px;
    padding: 5px 11px;
    position: absolute;
    z-index: 1000;
    display: block;
    opacity: 0;
    transition: opacity 300ms;
    border: solid 1px $black;
    animation: animation-fade-in-from-bottom .75s ease-in-out; /* tooltip animation */
}

.sdc-tooltip-show {
    opacity: 1;
}

.sdc-tooltip::after {
    content: "";
    position: absolute;
    border-style: solid;
}

.sdc-tooltip-top::after {
    top: 100%;
    left: 10px;
    margin-left: -5px;
    border-width: 5px;
    border-color: $black transparent transparent transparent;
}
.sdc-tooltip-top-right__bottom::after {
    right: 10px;
    left:auto;
}
.sdc-tooltip-top-center__middle::after {
    left: 50%;
}

.sdc-tooltip-bottom::after {
    bottom: 100%;
    left: 10px;
    margin-left: -5px;
    border-width: 5px;
    border-color: transparent transparent $black transparent;
}
.sdc-tooltip-bottom-right__bottom::after {
    right: 10px;
    left:auto;
}
.sdc-tooltip-bottom-center__middle::after {
    left: 50%;
}

.sdc-tooltip-left::after {
    top: 10px; /*50%;*/
    left: 100%;
    margin-top: -5px;
    border-width: 5px;
    border-color: transparent transparent transparent $black;
}
.sdc-tooltip-left-right__bottom::after {
    bottom: 10px;
    top: auto;
}
.sdc-tooltip-left-center__middle::after {
    top: 50%
}

.sdc-tooltip-right::after {
    top: 10px;
    right: 100%;
    margin-top: -5px;
    border-width: 5px;
    border-color: transparent $black transparent transparent;
}
.sdc-tooltip-right-right__bottom::after {
    bottom: 10px;
    top: auto;
}
.sdc-tooltip-right-center__middle::after {
    top: 50%
}

/* Tooltip template */
.sdc-tooltip-template-title {
    @include base-font-regular;
    font-size: 12px;
    font-weight: normal;
    background-color: $black;
    color: $white; /* silver */
}

.sdc-tooltip-template-big-title {
    font-size: 20px;
    line-height: 24px;
}

.sdc-tooltip-template-content {
    @include base-font-regular;
    font-size: 12px;
    font-weight: normal;
    background-color: $black;
    color: $white;
    line-height: 14px;
}