Varia: On mobile, limit spacer-block to 32px height and force zero vertical margins

This commit is contained in:
Allan Cole 2019-07-24 18:10:19 -04:00
parent 5b60ec236f
commit c477b2c136
4 changed files with 25 additions and 7 deletions

View file

@ -5,7 +5,7 @@
@mixin media( $res ) {
@if mobile-only == $res {
@media only screen and (max-width: calc(map-deep-get($config-global, "breakpoint", "sm") - 1)) {
@media only screen and (max-width: #{map-deep-get($config-global, "breakpoint", "sm") - 1}) {
@content;
}
}

View file

@ -1,6 +1,12 @@
.wp-block-spacer {
display: block;
// Remove vertical margins
margin-bottom: 0;
margin-top: 0;
margin-bottom: 0 !important;
margin-top: 0 !important;
@include media(mobile-only) {
&[style] {
height: map-deep-get($config-global, "spacing", "unit") !important;
}
}
}

View file

@ -1810,8 +1810,14 @@ hr.is-style-dots:before {
.wp-block-spacer {
display: block;
margin-bottom: 0;
margin-top: 0;
margin-bottom: 0 !important;
margin-top: 0 !important;
}
@media only screen and (max-width: 559px) {
.wp-block-spacer[style] {
height: 32px !important;
}
}
table,

View file

@ -1810,8 +1810,14 @@ hr.is-style-dots:before {
.wp-block-spacer {
display: block;
margin-bottom: 0;
margin-top: 0;
margin-bottom: 0 !important;
margin-top: 0 !important;
}
@media only screen and (max-width: 559px) {
.wp-block-spacer[style] {
height: 16px !important;
}
}
table,