diff --git a/CHANGELOG.md b/CHANGELOG.md index 319203b..36ba664 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ All notable changes to Aviendha are documented in this file. +## [1.18.4] - 2026-10-03 + +### Fixed +- **Product grids with two, four, five or six columns dropped a column.** The theme replaced the grid + gap on `woocommerce/product-template` and rewrote the track formula to match, but only for + `columns-3`. Every other `columns-N` kept WooCommerce's formula, which assumes its own 20px gap, + so each track came out wider than 1/N of the row and `auto-fill` fitted one column fewer: + four products set to four columns showed three, then one. Added the matching rule for 2, 4, 5 + and 6 columns. The theme's own templates are all three-column and are unaffected; the fix is for + patterns that ask for another count, such as Aludra's store product band. + ## [1.18.3] - 2026-09-19 ### Changed diff --git a/assets/css/woocommerce.css b/assets/css/woocommerce.css index 86c7e43..cf5be0a 100644 --- a/assets/css/woocommerce.css +++ b/assets/css/woocommerce.css @@ -436,12 +436,37 @@ * The track formula subtracts the gap WooCommerce assumed, so changing the gap * without changing this makes each track wider than a third of the row and * `auto-fill` drops to two columns. Three columns share two gaps, hence 2/3. - * `columns-3` is the only variant the theme's templates use. + * `columns-3` is the only variant the theme's own templates use; the rest follow below. */ .wc-block-product-template__responsive.columns-3 { grid-template-columns: repeat(auto-fill, minmax(max(150px, calc(33.3333% - var(--wp--preset--spacing--medium) * 2 / 3)), 1fr)); } +/* + * The other column counts WooCommerce offers, for the same reason: the block + * writes its own track formula for every `columns-N`, each one assuming the + * 1.25em gap, so any count the theme's own templates don't use fell back to it + * and `auto-fill` dropped a column — four products set to four columns showed + * three, then one. Aludra's store sections ask for four. N columns share N - 1 + * gaps, so each track gives up (N - 1) / N of one gap. The 150px floor is the + * block's own, and is what folds these to two columns on a phone. + */ +.wc-block-product-template__responsive.columns-2 { + grid-template-columns: repeat(auto-fill, minmax(max(150px, calc(50% - var(--wp--preset--spacing--medium) / 2)), 1fr)); +} + +.wc-block-product-template__responsive.columns-4 { + grid-template-columns: repeat(auto-fill, minmax(max(150px, calc(25% - var(--wp--preset--spacing--medium) * 3 / 4)), 1fr)); +} + +.wc-block-product-template__responsive.columns-5 { + grid-template-columns: repeat(auto-fill, minmax(max(150px, calc(20% - var(--wp--preset--spacing--medium) * 4 / 5)), 1fr)); +} + +.wc-block-product-template__responsive.columns-6 { + grid-template-columns: repeat(auto-fill, minmax(max(150px, calc(16.6667% - var(--wp--preset--spacing--medium) * 5 / 6)), 1fr)); +} + /* * Cards stretch to the tallest in their row, but their content is top-aligned, * so a wrapped two-line title on one card leaves its neighbours' buttons diff --git a/package.json b/package.json index 1dcab32..67d87d9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aviendha", - "version": "1.18.3", + "version": "1.18.4", "description": "A lean full-site-editing starter theme for WordPress, designed to be forked and customized.", "keywords": [ "WordPress", diff --git a/readme.txt b/readme.txt index 0185d43..9c127d9 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: e-commerce, full-site-editing, custom-colors, custom-logo, custom-menu, ed Requires at least: 6.6 Tested up to: 7.1 Requires PHP: 8.0 -Stable tag: 1.18.3 +Stable tag: 1.18.4 License: GNU General Public License v3.0 (or later) License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -40,6 +40,9 @@ want to use the store templates. == Changelog == += 1.18.4 = +* Fixed: Product grids set to two, four, five or six columns showed one column fewer than asked for. + = 1.18.3 = * Changed: The theme's wide width is now 1260px rather than 1360px, matching Elayne, so wide sections keep a comfortable margin on 1440px laptop screens instead of nearly touching the edges. * Changed: The minimum side padding is now 24px rather than 16px, so content sits further from the screen edge on phones. diff --git a/style.css b/style.css index 50b9eba..2802503 100644 --- a/style.css +++ b/style.css @@ -7,7 +7,7 @@ Description: Aviendha is a lean full-site-editing starter theme for WordPress. I Requires at least: 6.6 Tested up to: 7.1 Requires PHP: 8.0 -Version: 1.18.3 +Version: 1.18.4 License: GNU General Public License v3 or later License URI: https://www.gnu.org/licenses/gpl-3.0.html Text Domain: aviendha