Last active
March 13, 2023 08:05
-
-
Save andyjessop/db25ba236decdd54cf076d7f1264bb66 to your computer and use it in GitHub Desktop.
Ant.d's Space component in CSS
This file contains hidden or 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 { spaced } from '@crux/design/styles'; | |
... | |
html` | |
<div class=${cx(spaced.container, spaced.vertical, spaced.small)}> | |
<div>1</div> | |
<div>2</div> | |
<div>3</div> | |
</div>`; |
This file contains hidden or 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
.container { | |
display: inline-flex; | |
flex-direction: row; | |
align-items: center; | |
gap: var(--cx-spaced-gap-default, var(--cx-spacing-2)); | |
} | |
.container.small { | |
gap: var(--cx-spaced-gap-small, var(--cx-spacing-1)); | |
} | |
.container.large { | |
gap: var(--cx-spaced-gap-large, var(--cx-spacing-4)); | |
} | |
.container.vertical { | |
flex-direction: column; | |
align-items: stretch; | |
width: 100%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment