Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
fix(tooltip): update to spec, remove max-width
Browse files Browse the repository at this point in the history
Closes #656
  • Loading branch information
Marcy Sutton committed May 6, 2015
1 parent 161763e commit 8c60d9c
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions src/components/tooltip/tooltip.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
$tooltip-fontsize-lg: rem(1);
$tooltip-fontsize-sm: rem(1.4);
$tooltip-height-lg: rem(2.2);
$tooltip-height-sm: rem(3.2);
$tooltip-top-margin-lg: rem(1.4);
$tooltip-top-margin-sm: rem(2.4);
$tooltip-lr-padding-lg: rem(0.8);
$tooltip-lr-padding-sm: rem(1.6);
$tooltip-max-width: rem(3.20);

md-tooltip {
position: absolute;
font-size: 14px;
z-index: $z-index-tooltip;
overflow: hidden;
pointer-events: none;
border-radius: 4px;

font-weight: 500;
font-size: $tooltip-fontsize-sm;
@media screen and (min-width: $layout-breakpoint-sm) {
font-size: $tooltip-fontsize-lg;
}

.md-background {
position: absolute;
border-radius: 50%;
Expand All @@ -28,17 +43,25 @@ md-tooltip {
}
}
}

.md-content {
position: relative;
max-width: 240px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;

padding: 8px;
background: transparent;
opacity: 0;

height: $tooltip-height-sm;

This comment has been minimized.

Copy link
@topherfangio

topherfangio Dec 16, 2015

Contributor

@marcysutton Quick question: do you know if there is a reason this uses height: ... instead of min-height: ...? It's causing the following issue: #6117

This comment has been minimized.

Copy link
@marcysutton

marcysutton Dec 16, 2015

Contributor

I think it was for line-height woes, where the text didn't properly fill its container. But it's been a while.

This comment has been minimized.

Copy link
@topherfangio

topherfangio Dec 16, 2015

Contributor

Thanks so much. We'll investigate further :-)

line-height: $tooltip-height-sm;
padding-left: $tooltip-lr-padding-sm;
padding-right: $tooltip-lr-padding-sm;
@media screen and (min-width: $layout-breakpoint-sm) {
height: $tooltip-height-lg;
line-height: $tooltip-height-lg;
padding-left: $tooltip-lr-padding-lg;
padding-right: $tooltip-lr-padding-lg;
}
&.md-show-add {
transition: $swift-ease-out;
opacity: 0;
Expand Down

0 comments on commit 8c60d9c

Please sign in to comment.