-
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ feat(components): Add conditional generation to component styles, f…
…ix another bug
- Loading branch information
1 parent
37a1b66
commit 2dbc78d
Showing
26 changed files
with
2,713 additions
and
2,568 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,40 @@ | ||
@use '../internal' as *; | ||
|
||
/* Avatar */ | ||
$generate-utility: should-generate-classes($AVATAR); | ||
|
||
.avatar { | ||
border-radius: 50%; | ||
position: relative; | ||
display: block; | ||
margin: auto; | ||
font-size: 1.5rem; | ||
font-weight: lighter; | ||
width: 3.2rem; | ||
height: 3.2rem; | ||
background-color: var(--cirrus-primary); | ||
overflow: hidden; | ||
@if $generate-utility { | ||
.avatar { | ||
border-radius: 50%; | ||
position: relative; | ||
display: block; | ||
margin: auto; | ||
font-size: 1.5rem; | ||
font-weight: lighter; | ||
width: 3.2rem; | ||
height: 3.2rem; | ||
background-color: var(--cirrus-primary); | ||
overflow: hidden; | ||
|
||
/* Draw text on image just like in Gmail */ | ||
&::before { | ||
content: attr(data-text); | ||
color:currentColor; | ||
left: 50%; | ||
top: 50%; | ||
position: absolute; | ||
transform: translate(-50%, -50%); | ||
} | ||
/* Draw text on image just like in Gmail */ | ||
&::before { | ||
content: attr(data-text); | ||
color: currentColor; | ||
left: 50%; | ||
top: 50%; | ||
position: absolute; | ||
transform: translate(-50%, -50%); | ||
} | ||
|
||
@each $size, $property-map in $avatar-sizes { | ||
&.avatar--#{$size} { | ||
@include explode-properties($property-map); | ||
@each $size, $property-map in $avatar-sizes { | ||
&.avatar--#{$size} { | ||
@include explode-properties($property-map); | ||
} | ||
} | ||
|
||
img.padded { | ||
padding: 0.5rem; | ||
width: 100%; | ||
} | ||
} | ||
} | ||
|
||
img.padded { | ||
padding: 0.5rem; | ||
width: 100%; | ||
} | ||
} | ||
} |
Oops, something went wrong.