Skip to content

Commit

Permalink
fix: Apply grid width for classes named post/page on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
mirucon committed Feb 16, 2020
1 parent d00fc54 commit 30abb6e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion parts/czr/customizer-style.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ function cd_customizer_style() {
if ( get_theme_mod( 'grid_columns_mobile', 1 ) !== 1 ) {
$grid_columns = absint( get_theme_mod( 'grid_columns_mobile', 1 ) );
$width_percents = 100 / $grid_columns . '%';
$czr_style .= "@media screen and (max-width: 640px){body .container .grid-view .article{width: $width_percents;}}";
$czr_style .= "@media screen and (max-width: 640px) {
body .container .grid-view .article, body .container .grid-view .page, body .container .grid-view .post {
width: $width_percents;
}
}";
}

// Related posts the number of columns.
Expand Down

0 comments on commit 30abb6e

Please sign in to comment.