Last active
June 22, 2020 01:34
-
-
Save jessepearson/1ac73fc46db398365e8f15acc8b1fbc1 to your computer and use it in GitHub Desktop.
CSS to add to make Storefront display two columns in mobile views.
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
ul.products li.product { | |
width: 46.411765%; | |
float: left; | |
margin-right: 5.8823529412%; | |
} | |
ul.products li.product:nth-of-type( 2n ) { | |
margin-right: 0; | |
} | |
@media ( min-width: 768px ) { | |
ul.products li.product:nth-of-type( 2n ) { | |
margin-right: 5.8823529412%; | |
} | |
} |
I think it should be like this:
@media ( min-width: 768px ) {
ul.products li.product {
width: 46.411765%;
float: left;
margin-right: 5.8823529412%;
}
ul.products li.product:nth-of-type( 2n ) {
margin-right: 0;
}
ul.products li.product:nth-of-type( 2n ) {
margin-right: 5.8823529412%;
}
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this breaks the desktop version, in desktop version shows 3 columns instead of 4, how to fix it?