Skip to content

Commit

Permalink
refactor(mixins/avatar): update avatar-base mixin to use css variab…
Browse files Browse the repository at this point in the history
…le by using `get-var()` sass function.
  • Loading branch information
sciborrudnicki committed Jun 7, 2022
1 parent 8e53827 commit c829c8b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/mixins/_avatar.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
@use '../functions/get-var' as *;
@use '../variables' as *;

// Avatar mixin
@mixin avatar-base($size: $unit-8) {
font-size: $size * 0.5;
height: $size;
width: $size;
// @mixin avatar-base($size: $unit-8) { // old spectre.css
@mixin avatar-base($size: 'unit-8') {
// font-size: $size * 0.5; // old spectre.css
font-size: calc(get-var($size) * 0.5);
// height: $size; // old spectre.css
height: get-var($size);
// width: $size; // old spectre.css
width: get-var($size);
}

0 comments on commit c829c8b

Please sign in to comment.