From 056b405ba76e2c3fb902e0cf5b28368833e3d034 Mon Sep 17 00:00:00 2001 From: JF-Cozy Date: Thu, 12 Nov 2020 14:58:42 +0100 Subject: [PATCH] fix: Circle and Avatars comes with stylus again Css classes and extendables --- react/Avatar/styles.styl | 13 +++++++++++++ stylus/components/circle.styl | 27 ++++++++++++++++++++++----- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/react/Avatar/styles.styl b/react/Avatar/styles.styl index deaa1fe4b2..7430aa9765 100644 --- a/react/Avatar/styles.styl +++ b/react/Avatar/styles.styl @@ -4,6 +4,7 @@ .c-avatar @extend $circle @extend $avatar + .c-avatar--text color white @@ -18,6 +19,18 @@ filter grayscale(1) opacity .3 +.c-avatar--xsmall + @extend $circle--xsmall + +.c-avatar--small + @extend $circle--small + +.c-avatar--large + @extend $circle--large + +.c-avatar--xlarge + @extend $circle--xlarge + .c-avatar-initials @extend $circle-text diff --git a/stylus/components/circle.styl b/stylus/components/circle.styl index 30a26d0169..77683e0a66 100644 --- a/stylus/components/circle.styl +++ b/stylus/components/circle.styl @@ -1,7 +1,17 @@ @require '../tools/mixins' +circleSize(size) + width size + height size + min-width size + min-height size + font-size 'calc(%s / 2.28)' % size + $circle + --circleSize rem(40) $size = var(--circleSize) + + circleSize($size) display inline-flex align-items center justify-content center @@ -9,11 +19,18 @@ $circle overflow hidden background-color var(--dodgerBlue) color var(--white) - width $size - height $size - min-width $size - min-height $size - font-size 'calc(%s / 2.28)' % $size + +$circle--xsmall + circleSize(rem(16)) + +$circle--small + circleSize(rem(32)) + +$circle--large + circleSize(rem(48)) + +$circle--xlarge + circleSize(rem(64)) $circle-text font-weight bold