Fix tooltip styling inconsistency
This commit fixes inconsistent tooltip styling by setting the font explicitly on the tooltip container to ensure uniform tooltip fonts. As tooltip is rendered inside the parent elements' DOM, styling parent element's font was also styling the font's font due to style propogation, but setting fonts explicitly on tooltip ensure this does not happen.
This commit is contained in:
@@ -128,3 +128,8 @@
|
||||
$calculated-width-in-em: calc(#{$estimated-width-per-character-in-em} * #{$value-in-ch});
|
||||
#{$property}: $calculated-width-in-em;
|
||||
}
|
||||
|
||||
@mixin base-font-style {
|
||||
font-family: $font-family-main;
|
||||
font-size: $font-size-absolute-normal;
|
||||
}
|
||||
|
||||
@@ -21,9 +21,7 @@ $base-spacing: 1em;
|
||||
|
||||
body {
|
||||
background: $color-background;
|
||||
font-family: $font-family-main;
|
||||
font-size: $font-size-absolute-normal;
|
||||
|
||||
@include base-font-style;
|
||||
@include apply-uniform-spacing($base-spacing: $base-spacing)
|
||||
}
|
||||
|
||||
|
||||
@@ -220,7 +220,9 @@ $color-tooltip-background: $color-primary-darkest;
|
||||
color: $color-on-primary;
|
||||
border-radius: 16px;
|
||||
padding: 12px 10px;
|
||||
font-size: $font-size-absolute-normal;
|
||||
|
||||
// Explicitly set font styling for tooltips to prevent inconsistent appearances due to style inheritance from trigger elements.
|
||||
@include base-font-style;
|
||||
|
||||
/*
|
||||
This margin creates a visual buffer between the tooltip and the edges of the document.
|
||||
|
||||
Reference in New Issue
Block a user