You've already forked wc-bootstrap
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cb2d064441 | |||
| e234ba6449 | |||
| f4877833cf |
12
CHANGELOG.md
12
CHANGELOG.md
@@ -2,6 +2,18 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
## [0.1.1] - 2026-02-28
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Dark mode: native `<select>` elements showing white background due to WooCommerce's `--wc-form-color-background` falling back to `#fff`
|
||||||
|
- Dark mode: SelectWoo/Select2 dropdowns (country/state pickers) rendering with hardcoded `#fff` backgrounds, text colors, and borders
|
||||||
|
- Dark mode: checkout form focus ring color for inputs, textareas, and selects
|
||||||
|
- WooCommerce notice borders not matching Bootstrap alert styles due to insufficient CSS specificity (bumped to `.woocommerce .woocommerce-*` at `0,2,0`)
|
||||||
|
- WooCommerce notice `border-top: 3px solid` and `background-color: #f6f5f8` overriding Bootstrap alert colors
|
||||||
|
- Double icons on WooCommerce notices (WooCommerce icon font `::before` conflicting with Bootstrap Icons)
|
||||||
|
- Product card images overlapping top rounded corners on catalog page (added `overflow-hidden` to card)
|
||||||
|
|
||||||
## [0.1.0] - 2026-02-28
|
## [0.1.0] - 2026-02-28
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
21
CLAUDE.md
21
CLAUDE.md
@@ -228,6 +228,9 @@ Recurring bugs and non-obvious behaviours discovered across sessions. **Read thi
|
|||||||
- `overflow: visible !important` on `.wp-block-navigation__container` is essential for dropdowns inside block theme navigation.
|
- `overflow: visible !important` on `.wp-block-navigation__container` is essential for dropdowns inside block theme navigation.
|
||||||
- **WooCommerce `shop_table` borders conflict with Bootstrap `.table`** -- reset with `.woocommerce table.shop_table { border: 0 }` and cell `border-left/right: 0`.
|
- **WooCommerce `shop_table` borders conflict with Bootstrap `.table`** -- reset with `.woocommerce table.shop_table { border: 0 }` and cell `border-left/right: 0`.
|
||||||
- **WooCommerce gallery JS requires modifier classes** -- `--with-images`, `--without-images`, `--columns-N` on `.woocommerce-product-gallery` + `style="opacity: 0"` for fade-in. Without these, zoom and photoswipe won't initialize.
|
- **WooCommerce gallery JS requires modifier classes** -- `--with-images`, `--without-images`, `--columns-N` on `.woocommerce-product-gallery` + `style="opacity: 0"` for fade-in. Without these, zoom and photoswipe won't initialize.
|
||||||
|
- **WooCommerce dark mode select backgrounds** -- `woocommerce.css` sets `select { background-color: var(--wc-form-color-background, #fff) }`. The custom property is never defined for dark mode, so it falls back to `#fff`. Override with `[data-bs-theme="dark"] .woocommerce select`.
|
||||||
|
- **Select2/SelectWoo dark mode** -- `select2.css` hardcodes `#fff` on selection containers and dropdowns. Needs overrides for `.select2-selection`, `.select2-dropdown`, `.select2-search__field`, and highlighted options.
|
||||||
|
- **WooCommerce notice CSS specificity** -- Uses `border-top: 3px solid`, `background-color: #f6f5f8`, and icon font `::before` at specificity `0,1,0`. Must use `.woocommerce .woocommerce-*` (specificity `0,2,0`) and explicitly reset `border-top` to override.
|
||||||
- **WooCommerce float layout fights Bootstrap grid** -- `div.product div.images/summary` have `float:left/right; width:48%` in `woocommerce-layout.css`. Override with `float: none; width: 100%`.
|
- **WooCommerce float layout fights Bootstrap grid** -- `div.product div.images/summary` have `float:left/right; width:48%` in `woocommerce-layout.css`. Override with `float: none; width: 100%`.
|
||||||
- **Bootstrap `g-*` gutters add negative top margin** -- `g-4` sets both `--bs-gutter-x` and `--bs-gutter-y`; the `.row` gets `margin-top: calc(-1 * var(--bs-gutter-y))` pulling it upward. Use `gx-*` for horizontal-only gutters when vertical gap isn't desired.
|
- **Bootstrap `g-*` gutters add negative top margin** -- `g-4` sets both `--bs-gutter-x` and `--bs-gutter-y`; the `.row` gets `margin-top: calc(-1 * var(--bs-gutter-y))` pulling it upward. Use `gx-*` for horizontal-only gutters when vertical gap isn't desired.
|
||||||
|
|
||||||
@@ -321,7 +324,7 @@ The child theme inherits from `wp-bootstrap` via WordPress `Template: wp-bootstr
|
|||||||
|
|
||||||
## Version History
|
## Version History
|
||||||
|
|
||||||
Current version: **v0.1.0**
|
Current version: **v0.1.1**
|
||||||
|
|
||||||
## Session History
|
## Session History
|
||||||
|
|
||||||
@@ -387,3 +390,19 @@ Current version: **v0.1.0**
|
|||||||
**Files changed (1):**
|
**Files changed (1):**
|
||||||
|
|
||||||
- `CHANGELOG.md` — Added `[0.1.0]` section documenting all features and fixes between v0.0.1 and v0.1.0
|
- `CHANGELOG.md` — Added `[0.1.0]` section documenting all features and fixes between v0.0.1 and v0.1.0
|
||||||
|
|
||||||
|
### 2026-02-28 — v0.1.1 Dark Mode & Notice CSS Bugfixes
|
||||||
|
|
||||||
|
**Scope:** Fixed dark mode select backgrounds, WooCommerce notice styling conflicts, and product card image overflow.
|
||||||
|
|
||||||
|
**Files changed (2):**
|
||||||
|
|
||||||
|
- `assets/css/wc-bootstrap.css` — Dark mode overrides for native `<select>` and Select2/SelectWoo widgets; bumped notice selectors to `.woocommerce .woocommerce-*` (specificity `0,2,0`) to beat `woocommerce.css`; suppressed WooCommerce icon font `::before` on notices; added checkout form focus color for dark mode
|
||||||
|
- `templates/content-product.html.twig` — Added `overflow-hidden` to product card `<article>` for border-radius clipping
|
||||||
|
|
||||||
|
**Key learnings:**
|
||||||
|
|
||||||
|
- WooCommerce CSS sets `select { background-color: var(--wc-form-color-background, #fff) }` — the custom property is never defined for dark mode, so it falls back to white. Override with `[data-bs-theme="dark"] .woocommerce select`.
|
||||||
|
- Select2/SelectWoo hardcodes `#fff` backgrounds in `select2.css` — needs comprehensive overrides for selection containers, dropdowns, search fields, and highlighted options.
|
||||||
|
- WooCommerce notice CSS uses `border-top: 3px solid`, `background-color: #f6f5f8`, and WooCommerce icon font `::before` at specificity `0,1,0`. Single-class overrides don't win — must use `.woocommerce .woocommerce-*` (specificity `0,2,0`) and explicitly reset `border-top`.
|
||||||
|
- Never set `background-image` without `background-repeat: no-repeat` / `background-size` / `background-position` — SVGs will tile.
|
||||||
|
|||||||
@@ -141,8 +141,8 @@ for po in languages/wc-bootstrap-*.po; do msgfmt -o "${po%.po}.mo" "$po"; done
|
|||||||
Releases are automated via Gitea Actions. Push a tag matching `vX.X.X` to trigger a release build.
|
Releases are automated via Gitea Actions. Push a tag matching `vX.X.X` to trigger a release build.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git tag -a v0.1.0 -m "Version 0.1.0 - Initial release"
|
git tag -a v0.1.1 -m "Version 0.1.1 - Bugfix release"
|
||||||
git push origin v0.1.0
|
git push origin v0.1.1
|
||||||
```
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|||||||
@@ -42,29 +42,35 @@
|
|||||||
when notices are rendered outside our Twig templates.
|
when notices are rendered outside our Twig templates.
|
||||||
========================================================================== */
|
========================================================================== */
|
||||||
|
|
||||||
.woocommerce-info,
|
/* Use .woocommerce ancestor to beat woocommerce.css specificity (0,2,0 > 0,1,0).
|
||||||
.woocommerce-message,
|
WooCommerce sets border-top: 3px solid, background-color: #f6f5f8, and a
|
||||||
.woocommerce-error {
|
WooCommerce icon font ::before on these classes. Override all of it. */
|
||||||
|
.woocommerce .woocommerce-info,
|
||||||
|
.woocommerce .woocommerce-message,
|
||||||
|
.woocommerce .woocommerce-error {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 1rem 3rem 1rem 1rem;
|
padding: 1rem 3rem 1rem 1rem;
|
||||||
margin-bottom: 1rem;
|
margin: 0 0 1rem;
|
||||||
border: 1px solid transparent;
|
border: var(--bs-border-width) solid transparent;
|
||||||
|
border-top: var(--bs-border-width) solid transparent;
|
||||||
border-radius: var(--bs-border-radius);
|
border-radius: var(--bs-border-radius);
|
||||||
|
background-color: transparent;
|
||||||
|
background-image: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.woocommerce-info {
|
.woocommerce .woocommerce-info {
|
||||||
color: var(--bs-info-text-emphasis);
|
color: var(--bs-info-text-emphasis);
|
||||||
background-color: var(--bs-info-bg-subtle);
|
background-color: var(--bs-info-bg-subtle);
|
||||||
border-color: var(--bs-info-border-subtle);
|
border-color: var(--bs-info-border-subtle);
|
||||||
}
|
}
|
||||||
|
|
||||||
.woocommerce-message {
|
.woocommerce .woocommerce-message {
|
||||||
color: var(--bs-success-text-emphasis);
|
color: var(--bs-success-text-emphasis);
|
||||||
background-color: var(--bs-success-bg-subtle);
|
background-color: var(--bs-success-bg-subtle);
|
||||||
border-color: var(--bs-success-border-subtle);
|
border-color: var(--bs-success-border-subtle);
|
||||||
}
|
}
|
||||||
|
|
||||||
.woocommerce-error {
|
.woocommerce .woocommerce-error {
|
||||||
color: var(--bs-danger-text-emphasis);
|
color: var(--bs-danger-text-emphasis);
|
||||||
background-color: var(--bs-danger-bg-subtle);
|
background-color: var(--bs-danger-bg-subtle);
|
||||||
border-color: var(--bs-danger-border-subtle);
|
border-color: var(--bs-danger-border-subtle);
|
||||||
@@ -72,6 +78,13 @@
|
|||||||
padding-left: 1rem;
|
padding-left: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Suppress WooCommerce icon font ::before — our templates use Bootstrap Icons */
|
||||||
|
.woocommerce .woocommerce-info::before,
|
||||||
|
.woocommerce .woocommerce-message::before,
|
||||||
|
.woocommerce .woocommerce-error::before {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
/* ==========================================================================
|
/* ==========================================================================
|
||||||
Quantity Input
|
Quantity Input
|
||||||
Sizing for the Bootstrap input-group quantity widget.
|
Sizing for the Bootstrap input-group quantity widget.
|
||||||
@@ -381,10 +394,58 @@
|
|||||||
========================================================================== */
|
========================================================================== */
|
||||||
|
|
||||||
/* Bootstrap 5 dark mode uses data-bs-theme="dark" attribute on <html> */
|
/* Bootstrap 5 dark mode uses data-bs-theme="dark" attribute on <html> */
|
||||||
[data-bs-theme="dark"] {
|
|
||||||
/* Checkout form focus color for dark mode */
|
/* Native <select> elements — woocommerce.css sets:
|
||||||
|
select { background-color: var(--wc-form-color-background, #fff) }
|
||||||
|
The custom property is never defined for dark mode, so it falls back to #fff. */
|
||||||
|
[data-bs-theme="dark"] .woocommerce select,
|
||||||
|
[data-bs-theme="dark"] .wc-block-checkout select {
|
||||||
|
background-color: var(--bs-body-bg);
|
||||||
|
color: var(--bs-body-color);
|
||||||
|
border-color: var(--bs-border-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* SelectWoo / Select2 — select2.css hardcodes #fff backgrounds on selection
|
||||||
|
containers and dropdowns. Override to use Bootstrap's dark mode variables. */
|
||||||
|
[data-bs-theme="dark"] .select2-container--default .select2-selection--single,
|
||||||
|
[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple {
|
||||||
|
background-color: var(--bs-body-bg);
|
||||||
|
color: var(--bs-body-color);
|
||||||
|
border-color: var(--bs-border-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||||
|
color: var(--bs-body-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__arrow b {
|
||||||
|
border-color: var(--bs-secondary-color) transparent transparent transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-bs-theme="dark"] .select2-dropdown {
|
||||||
|
background-color: var(--bs-body-bg);
|
||||||
|
color: var(--bs-body-color);
|
||||||
|
border-color: var(--bs-border-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-bs-theme="dark"] .select2-container--default .select2-search--dropdown .select2-search__field {
|
||||||
|
background-color: var(--bs-tertiary-bg);
|
||||||
|
color: var(--bs-body-color);
|
||||||
|
border-color: var(--bs-border-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-bs-theme="dark"] .select2-container--default .select2-results__option[aria-selected=true],
|
||||||
|
[data-bs-theme="dark"] .select2-container--default .select2-results__option[data-selected=true] {
|
||||||
|
background-color: var(--bs-tertiary-bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-bs-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected],
|
||||||
|
[data-bs-theme="dark"] .select2-container--default .select2-results__option--highlighted[data-selected] {
|
||||||
|
background-color: var(--bs-primary);
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Checkout form focus color for dark mode */
|
||||||
[data-bs-theme="dark"] .woocommerce-checkout .form-row input.input-text:focus,
|
[data-bs-theme="dark"] .woocommerce-checkout .form-row input.input-text:focus,
|
||||||
[data-bs-theme="dark"] .woocommerce-checkout .form-row textarea:focus,
|
[data-bs-theme="dark"] .woocommerce-checkout .form-row textarea:focus,
|
||||||
[data-bs-theme="dark"] .woocommerce-checkout .form-row select:focus {
|
[data-bs-theme="dark"] .woocommerce-checkout .form-row select:focus {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ Description: A Bootstrap 5 child theme for WP Bootstrap that overrides all WooCo
|
|||||||
Requires at least: 6.7
|
Requires at least: 6.7
|
||||||
Tested up to: 6.7
|
Tested up to: 6.7
|
||||||
Requires PHP: 8.3
|
Requires PHP: 8.3
|
||||||
Version: 0.1.0
|
Version: 0.1.1
|
||||||
License: GNU General Public License v2 or later
|
License: GNU General Public License v2 or later
|
||||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
Template: wp-bootstrap
|
Template: wp-bootstrap
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#}
|
#}
|
||||||
|
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<article class="card h-100 shadow-sm product">
|
<article class="card h-100 shadow-sm overflow-hidden product">
|
||||||
{{ do_action('woocommerce_before_shop_loop_item') }}
|
{{ do_action('woocommerce_before_shop_loop_item') }}
|
||||||
|
|
||||||
{# Product image with sale badge overlay #}
|
{# Product image with sale badge overlay #}
|
||||||
|
|||||||
Reference in New Issue
Block a user