Skip to content

Commit

Permalink
fix(typography): px() function is not using the $context argument (#375)
Browse files Browse the repository at this point in the history
Co-authored-by: Simeon Simeonoff <[email protected]>
  • Loading branch information
adrianptrv and simeonoff authored Jan 8, 2025
1 parent 715c836 commit 1fe8143
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sass/typography/_functions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,12 @@
/// }
/// @return {number} - Returns the relative value converted to pixels.
@function px($num, $context: $base-font-size) {
@if math.is-unitless($context) {
$context: $context * 1px;
}

@if meta.type-of($num) == 'number' {
@return math.div($num, $num * 0 + 1) * 16px;
@return math.div($num, $num * 0 + 1) * $context;
}

@return $num;
Expand Down

0 comments on commit 1fe8143

Please sign in to comment.