feat(site-builder): tokenise colours hard-coded inside components
Component render/toHtml now use var(--wsb-*) instead of hex so Site Design palette changes reach FeaturesGrid, Testimonials, Accordion, PricingTable, CTA/CallToAction, forms, Gallery, Tabs and others. Exemption lists removed. Refs #44 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8227d768e6
commit
2877bc06fa
47 files changed
+473
-195
No files matched your search
@@ -94,3 +94,12 @@ describe('NumberCounter.toHtml palette token fallbacks (Refs #44)', () => {
|
||||
expect(html).not.toContain('#6b7280');
|
||||
});
|
||||
});
|
||||
|
||||
describe('NumberCounter.toHtml design tokens (#44)', () => {
|
||||
test('default export references var(--wsb-*) and no longer carries the old hard-coded hex', () => {
|
||||
const { html } = toHtml({ counters: [{ number: 1, suffix: '+', label: 'L' }] }, '');
|
||||
const lower = html.toLowerCase();
|
||||
for (const t of ["bg"]) expect(html, `token ${t}`).toContain(`var(--wsb-${t})`);
|
||||
for (const hex of ["#ffffff"]) expect(lower, `old ${hex}`).not.toContain(hex);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user