Skip to content

Commit

Permalink
Wrap divisions in calc()
Browse files Browse the repository at this point in the history
  • Loading branch information
Asartea committed Nov 2, 2023
1 parent 0d2da44 commit 2d02000
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/stylesheets/active_material/generators/functions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/// @param {number} $amount - An integer value, such as 100
/// @return {number} The amount of letter-spacing in ems.
@function am-tracking($amount) {
@return ($amount / 1000) + 0em;
@return calc($amount / 1000) + 0em;
}


Expand All @@ -15,7 +15,7 @@
/// @param {number} $number - The numeric value to strip units from.
/// @return {number} A unitless number value.
@function am-strip-units($number) {
@return $number / ($number * 0 + 1);
@return calc($number / ($number * 0 + 1));
}


Expand All @@ -31,7 +31,7 @@
/// @param {number} $baseline [16] - The assumed base font size.
/// @return {number} Scalable pixel value in rems.
@function am-sp($value, $baseline:16) {
@return (am-strip-units($value) / $baseline) + rem;
@return calc(am-strip-units($value) / $baseline) + rem;
}


Expand Down
2 changes: 1 addition & 1 deletion src/stylesheets/active_material/prototypes/menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ $am-menu-carat-size: 5px !default;
border-color: am-color(primary) transparent transparent;
content: "";
height: 0;
margin-top: $am-menu-carat-size / -2;
margin-top: calc($am-menu-carat-size / -2);
position: absolute;
right: -15px;
top: 50%;
Expand Down

0 comments on commit 2d02000

Please sign in to comment.