Created
October 9, 2019 21:02
-
-
Save alexeyraspopov/ba6a11bfaa5de78b6c34ac243b85c9b6 to your computer and use it in GitHub Desktop.
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
:root { | |
--gap: 0.5em; | |
} | |
.horizontal-stack { | |
display: flex; | |
flex-direction: row; | |
} | |
.vertical-stack { | |
display: flex; | |
flex-direction: column; | |
} | |
@supports (gap: 1px) { | |
.horizontal-stack { | |
column-gap: var(--gap); | |
} | |
.vertical-stack { | |
row-gap: var(--gap); | |
} | |
} | |
@supports not (gap: 1px) { | |
.horizontal-stack > * + * { | |
margin-left: var(--gap); | |
} | |
.vertical-stack > * + * { | |
margin-top: var(--gap); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment