Skip to content

Instantly share code, notes, and snippets.

@yankiara
Created April 13, 2020 10:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yankiara/3e2166dd485244dbad5ea063c68cb4d6 to your computer and use it in GitHub Desktop.
Save yankiara/3e2166dd485244dbad5ea063c68cb4d6 to your computer and use it in GitHub Desktop.
Custom Gutenberg columns gap
: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