From fdde3192fa8db81dc539ef93bb693c5ef4132834 Mon Sep 17 00:00:00 2001 From: Volker E Date: Thu, 27 Aug 2020 01:27:50 -0700 Subject: [PATCH] [styles] Make Trident workaround value a variable Carved out from I8e6e283db5d4034861f8d50d9b3f211df1a78c6c. It makes sense to have a variable defined for that value. Change-Id: Iaaca1fd7c15a0c121e60b5ae6debf4bf6920168e --- resources/skins.vector.styles/common/typography.less | 2 +- variables.less | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/skins.vector.styles/common/typography.less b/resources/skins.vector.styles/common/typography.less index b51803858..75b99df35 100644 --- a/resources/skins.vector.styles/common/typography.less +++ b/resources/skins.vector.styles/common/typography.less @@ -79,7 +79,7 @@ pre, font-size: @font-size-base; // Support IE 9-11, Trident cuts values 2 digits after decimal point. // `calc` enables to set correct calculation in place again. See T102364. - font-size: calc( 1em ~'*' unit( @font-size-base ) ); + font-size: @font-size-base--trident-hack; line-height: @line-height-base; h1 { diff --git a/variables.less b/variables.less index c901863e6..d1aa62eb2 100644 --- a/variables.less +++ b/variables.less @@ -47,6 +47,7 @@ @outline-color-base--focus: @color-primary; @font-size-base: unit( 14 / @font-size-browser, em ); // Equals `0.875em`. +@font-size-base--trident-hack: calc( 1em ~'*' unit( @font-size-base ) ); @font-size-reset: @font-size-root; @font-size-heading-1: 1.8em; @font-size-heading-2: 1.5em;