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

Commit 1f14cc4

Browse files
devversionkara
authored andcommitted
fix(variables): rem function should use global $font-size variable (#9497)
* The `rem` SCSS function currently uses a hard-coded font size variable, which makes it impossible for developers to overwrite the global font-size. The rem function should be moved behind the initialization of the global `$font-size` variable, and should use this one. Fixes #9486.
1 parent b114302 commit 1f14cc4

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/core/style/variables.scss

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
// Function
2-
//-- Must be defined before variables
3-
@function rem($multiplier) {
4-
$font-size: 10px;
5-
@return $multiplier * $font-size;
6-
}
7-
81
// Typography
92
// ------------------------------
103
$font-family: Roboto, 'Helvetica Neue', sans-serif !default;
114
$font-size: 10px !default;
125

6+
//-- Must be defined before $font-size.
7+
@function rem($multiplier) {
8+
@return $multiplier * $font-size;
9+
}
10+
1311
$display-4-font-size-base: rem(11.20) !default;
1412
$display-3-font-size-base: rem(5.600) !default;
1513
$display-2-font-size-base: rem(4.500) !default;

0 commit comments

Comments
 (0)