Created
April 13, 2020 10:55
-
-
Save yankiara/3e2166dd485244dbad5ea063c68cb4d6 to your computer and use it in GitHub Desktop.
Custom Gutenberg columns gap
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
:root { | |
--columns-gap: 1rem; | |
} | |
@media (min-width:782px) { | |
.wp-block-column:not(:first-child) { | |
margin-left: var(--columns-gap); | |
} | |
} | |
@media (min-width:600px) and (max-width:781px) { | |
.wp-block-column { | |
margin-bottom: var(--columns-gap); | |
flex-basis: calc( ( 100% - var(--columns-gap) ) / 2 ) !important; | |
} | |
.wp-block-column:nth-child(2n) { | |
margin-left: var(--columns-gap); | |
} | |
} | |
@media (max-width:599px) { | |
.wp-block-column { | |
margin-bottom: var(--columns-gap); | |
flex-basis: 100% !important; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment