Checkout: theme cart and checkout to the v2 design
Restyles the boboko-core cart drawer, checkout and confirmation pages to match the "cart - checkout v2" Pencil design (round radios, brand-green selection, borders removed, larger notes and meta labels). strip-accents now covers the module's uppercased buttons; vite.config.js comment fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e4dccd0205
commit
4e4a02c4ed
3 files changed
+149
-57
No files matched your search
@@ -39,8 +39,13 @@ function processElement(el) {
|
||||
}
|
||||
}
|
||||
|
||||
// `.uppercase` plus the cart/checkout module's buttons, which the theme
|
||||
// uppercases in resources/css/checkout.css (the module's markup can't carry
|
||||
// the class).
|
||||
const UPPERCASE_SELECTOR = '.uppercase, .bbk-cart-checkout, .bbk-checkout-continue, .bbk-cart-coupon-submit'
|
||||
|
||||
function applyToPage() {
|
||||
document.querySelectorAll('.uppercase').forEach(processElement)
|
||||
document.querySelectorAll(UPPERCASE_SELECTOR).forEach(processElement)
|
||||
}
|
||||
|
||||
// ── Initial pass ──────────────────────────────────────────────────────────────
|
||||
@@ -51,8 +56,8 @@ const observer = new MutationObserver(mutations => {
|
||||
for (const { addedNodes } of mutations) {
|
||||
for (const node of addedNodes) {
|
||||
if (node.nodeType !== Node.ELEMENT_NODE) continue
|
||||
if (node.classList?.contains('uppercase')) processElement(node)
|
||||
node.querySelectorAll?.('.uppercase').forEach(processElement)
|
||||
if (node.matches?.(UPPERCASE_SELECTOR)) processElement(node)
|
||||
node.querySelectorAll?.(UPPERCASE_SELECTOR).forEach(processElement)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user