Columns styling
This commit is contained in:
parent
3bf47d7d97
commit
1d93d8f577
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -145,6 +145,35 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul.products {
|
||||||
|
&.columns-1 {
|
||||||
|
li.product {
|
||||||
|
width: 100%;
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.columns-2 {
|
||||||
|
li.product {
|
||||||
|
width: 48%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.columns-3 {
|
||||||
|
li.product {
|
||||||
|
width: 30.75%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.columns-5 {
|
||||||
|
li.product {
|
||||||
|
width: 16.95%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.columns-6 {
|
||||||
|
li.product {
|
||||||
|
width: 13.5%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&.columns-1 {
|
&.columns-1 {
|
||||||
ul.products {
|
ul.products {
|
||||||
li.product {
|
li.product {
|
||||||
|
|
|
@ -13,7 +13,11 @@
|
||||||
* @see https://docs.woocommerce.com/document/template-structure/
|
* @see https://docs.woocommerce.com/document/template-structure/
|
||||||
* @author WooThemes
|
* @author WooThemes
|
||||||
* @package WooCommerce/Templates
|
* @package WooCommerce/Templates
|
||||||
* @version 2.0.0
|
* @version 3.3.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
global $woocommerce_loop;
|
||||||
|
|
||||||
|
$columns = ! empty( $woocommerce_loop['columns'] ) ? $woocommerce_loop['columns'] : wc_get_default_products_per_row();
|
||||||
?>
|
?>
|
||||||
<ul class="products">
|
<ul class="products columns-<?php echo esc_attr( $columns ); ?>">
|
||||||
|
|
Loading…
Reference in New Issue