Skip to content
This repository has been archived by the owner on Nov 29, 2022. It is now read-only.

Commit

Permalink
v8.3.0 - Add sass:map. (#372)
Browse files Browse the repository at this point in the history
* v8.3.0 - Add sass:map.

* v8.3.0 - PR comment.
  • Loading branch information
kevinrodrigues authored Jun 17, 2022
1 parent 10f7eb4 commit 4f20654
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ Future Todo List
- Make typography and utility classes silent extenders (so that they can be extended by components without importing all utility classes).
- Deprecate modal and orderCard component styles in next major version as unused.

v8.3.0
------------------------------
*June 17, 2022*

### Added
- `sass:map` to resolve `map-get` error when using `sass` in consuming apps.


v8.2.0
------------------------------
*May 23, 2022*
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@justeat/fozzie",
"title": "Fozzie – Just Eat UI Web Framework",
"description": "UI Web Framework for the Just Eat Global Platform",
"version": "8.2.0",
"version": "8.3.0",
"main": "dist/js/index.js",
"files": [
"dist/js",
Expand Down
5 changes: 3 additions & 2 deletions src/scss/tools/functions/_units.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
// Returns a unitless line-height value
//
@use 'sass:math';
@use 'sass:map';

@function line-height($font-size: 'body-s', $line-height: '20', $scale: 'default') {
@if type-of($font-size) == 'number' {
@return decimal-round(math.div($line-height, $font-size), 2);
} @else if map-has-key($type, $font-size) { // else try and find the value in our type map
$key-map: map-get($type, $font-size);
$font-list: map-get($key-map, $scale);
$key-map: map.get($type, $font-size);
$font-list: map.get($key-map, $scale);

@if type-of($font-list) == 'list' {
@return line-height(nth($font-list, 1), nth($font-list, 2));
Expand Down

0 comments on commit 4f20654

Please sign in to comment.