Created
October 17, 2023 21:26
-
-
Save windgazer/94bb221bfd87a59bfa014622862de3b6 to your computer and use it in GitHub Desktop.
Atomic BEM evolution
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
@mixin border--box { | |
border: 0.1em solid grey; | |
} | |
@mixin border__radius--box { | |
border-radius: 0.4em; | |
} | |
@mixin border__radius--cta { | |
border-radius: 0.2em; | |
} | |
@mixin border--cta { | |
border: 0.1em solid $color__primary; | |
} |
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
@mixin shadow--modal { | |
box-shadow: 0.2em 0.2em 0.6em rgba(0,0,0,0.2); | |
} |
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
@mixin whitespace__padding--box { | |
padding: 0.8em 1.2em; | |
} | |
@mixin whitespace__padding--block { | |
padding: 0.2em 0.4em; | |
} | |
@mixin whitespace__margin--block { | |
margin: 1em 0 0; | |
} | |
@mixin whitespace__container--gap { | |
gap: 0.4em; | |
} |
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
%actions--container { | |
@extend %reset; | |
@include whitespace__margin--block; | |
@include whitespace__container--gap; | |
display: flex; | |
justify-content: end; | |
} |
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
%cta--primary { | |
@extend %reset; | |
@include border--cta; | |
@include border__radius--cta; | |
@include whitespace__padding--block; | |
background-color: $color__primary; | |
color: $color__primary--offset; | |
} | |
%cta--secondary { | |
@extend %cta--primary; | |
background-color: $color__primary--offset; | |
color: $color__primary; | |
} |
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
%modal-dialogue { | |
@include border--box; | |
@include border__radius--box; | |
@include shadow--modal; | |
@include whitespace__padding--box; | |
} |
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
@import 'utils', 'atoms_border', 'atoms_shadow', 'atoms_whitespace', 'molecules_actions', 'molecules_cta', 'molecules_modal'; | |
.confirmation-dialog { | |
@extend %modal-dialogue; | |
} | |
.confirmation-dialog__actions { | |
@extend %actions--container; | |
} | |
.confirmation-dialog__confirm { | |
@extend %cta--primary; | |
} | |
.confirmation-dialog__cancel { | |
@extend %cta--secondary; | |
} |
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
%reset { | |
margin: 0; | |
padding: 0; | |
border: 0; | |
border-radius: 0; | |
font: inherit; | |
vertical-align: baseline; | |
text-rendering: optimizeLegibility; | |
-webkit-font-smoothing: antialiased; | |
-webkit-appearance: none; | |
text-size-adjust: none; | |
} | |
$color__primary: blue; | |
$color__primary--offset: white; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment