-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtooltip.scss
More file actions
72 lines (60 loc) · 2.16 KB
/
tooltip.scss
File metadata and controls
72 lines (60 loc) · 2.16 KB
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
@use "sass:color";
// own vars
$eccgui-size-typo-tooltip: $eccgui-size-typo-caption !default;
$eccgui-size-typo-tooltip-lineheight: $eccgui-size-typo-caption-lineheight !default;
$eccgui-size-tooltip-width: 20em !default;
// library vars
$tooltip-background-color: #{eccgui-color-var("layout", "grey", "900")};
$tooltip-text-color: #{eccgui-color-var("identity", "text", "300")};
// $dark-tooltip-background-color: $light-gray3 !default;
// $dark-tooltip-text-color: $dark-gray5 !default;
$tooltip-padding-vertical: $eccgui-size-block-whitespace * 0.25; // !default;
$tooltip-padding-horizontal: $eccgui-size-block-whitespace * 0.5; // !default;
@import "~@blueprintjs/core/src/components/tooltip/tooltip";
.#{$ns}-tooltip {
font-size: $eccgui-size-typo-tooltip;
line-height: $eccgui-size-typo-tooltip-lineheight;
overflow-wrap: break-word;
white-space: normal;
}
.#{$eccgui}-tooltip--small {
max-width: $eccgui-size-tooltip-width * 0.5;
}
.#{$eccgui}-tooltip--medium {
max-width: $eccgui-size-tooltip-width;
}
.#{$eccgui}-tooltip--large {
max-width: $eccgui-size-tooltip-width * 2;
}
.#{$eccgui}-tooltip__wrapper:not(.#{$ns}-tooltip-indicator) {
display: flex;
align-items: flex-start;
padding: 0;
margin: 0;
cursor: inherit;
}
.#{$eccgui}-tooltip__content {
a {
color: inherit;
text-decoration: none;
}
pre,
.#{$eccgui}-typography__contentblock pre,
pre.#{$eccgui}-typography__text {
background-color: eccgui-color-mix(
eccgui-color-var("identity", "background", "900") 100% * $eccgui-opacity-ghostly,
transparent
);
}
}
.#{$prefix}--tooltip-content {
max-width: $eccgui-size-tooltip-width;
padding: 0.25 * $eccgui-size-block-whitespace 0.5 * $eccgui-size-block-whitespace;
// align Carbon tooltips, they are used automatically by a few carbon based elements, e.g. pagination buttons
font-size: $eccgui-size-typo-tooltip;
line-height: $eccgui-size-typo-tooltip-lineheight;
overflow-wrap: break-word;
white-space: normal;
--cds-popover-background-color: #{$tooltip-background-color};
--cds-popover-text-color: #{$tooltip-text-color};
}