Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 8c60d9c

Browse files
author
Marcy Sutton
committed
fix(tooltip): update to spec, remove max-width
Closes #656
1 parent 161763e commit 8c60d9c

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

src/components/tooltip/tooltip.scss

+27-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
1+
$tooltip-fontsize-lg: rem(1);
2+
$tooltip-fontsize-sm: rem(1.4);
3+
$tooltip-height-lg: rem(2.2);
4+
$tooltip-height-sm: rem(3.2);
5+
$tooltip-top-margin-lg: rem(1.4);
6+
$tooltip-top-margin-sm: rem(2.4);
7+
$tooltip-lr-padding-lg: rem(0.8);
8+
$tooltip-lr-padding-sm: rem(1.6);
9+
$tooltip-max-width: rem(3.20);
10+
111
md-tooltip {
212
position: absolute;
3-
font-size: 14px;
413
z-index: $z-index-tooltip;
514
overflow: hidden;
615
pointer-events: none;
716
border-radius: 4px;
817

18+
font-weight: 500;
19+
font-size: $tooltip-fontsize-sm;
20+
@media screen and (min-width: $layout-breakpoint-sm) {
21+
font-size: $tooltip-fontsize-lg;
22+
}
23+
924
.md-background {
1025
position: absolute;
1126
border-radius: 50%;
@@ -28,17 +43,25 @@ md-tooltip {
2843
}
2944
}
3045
}
31-
3246
.md-content {
3347
position: relative;
34-
max-width: 240px;
3548
white-space: nowrap;
3649
overflow: hidden;
3750
text-overflow: ellipsis;
3851

39-
padding: 8px;
4052
background: transparent;
4153
opacity: 0;
54+
55+
height: $tooltip-height-sm;
56+
line-height: $tooltip-height-sm;
57+
padding-left: $tooltip-lr-padding-sm;
58+
padding-right: $tooltip-lr-padding-sm;
59+
@media screen and (min-width: $layout-breakpoint-sm) {
60+
height: $tooltip-height-lg;
61+
line-height: $tooltip-height-lg;
62+
padding-left: $tooltip-lr-padding-lg;
63+
padding-right: $tooltip-lr-padding-lg;
64+
}
4265
&.md-show-add {
4366
transition: $swift-ease-out;
4467
opacity: 0;

0 commit comments

Comments
 (0)