Skip to content

feat(bulma-ui): scheme-aware bgColor backgrounds (scheme-main-bis/-ter bands without custom CSS) - #508

Merged
allxsmith merged 8 commits into
mainfrom
feat/scheme-bgcolor
Aug 13, 2026
Merged

allxsmith merged 8 commits into
mainfrom
feat/scheme-bgcolor

Conversation

@allxsmith

@allxsmith allxsmith commented Aug 12, 2026 •

Copy link
Copy Markdown
Owner

What

bgColor gains six scheme-aware values — scheme-main, scheme-main-bis, scheme-main-ter, scheme-invert, scheme-invert-bis, scheme-invert-ter — on six surface components: Section, Hero (incl. Hero.Head/Hero.Body/Hero.Foot), Container, Footer, Box, and Card (parent only). Alternating page bands become a prop:

<Section bgColor="scheme-main-bis">…</Section>  // next band: scheme-main-ter

Why an inline style, not a class

This closes the last gap the cold-start evals could not close without sanctioned custom CSS: dark-safe alternating section bands. Bulma ships no has-background-scheme-* helper classes, and stock-Bulma consumers (bulma.min.css via npm/CDN, the bestax-no-helpers flavor) never load bestax-shipped CSS — so a class-based route was non-viable. Scheme values therefore emit no class; the component renders style={{ backgroundColor: 'var(--bulma-scheme-main-bis)' }}, which tracks Bulma's scheme variables and flips correctly in dark mode.

How

  • validSchemeColors tuple (new public constant, re-exported through useBulmaClasses).
  • New per-concern hook useColorStyles → { backgroundColor: 'var(--bulma-<value>)' } for scheme values, undefined otherwise (never {} — unaffected components produce byte-identical DOM).
  • useBulmaClasses return gains an additive optional member bulmaHelperStyles; existing destructurers are unaffected. Its generic bound loosens from Record<string, unknown> to object (strictly more permissive) so the existing as BulmaClassesProps & typeof props call sites keep compiling against the widened input type.
  • New mergeBulmaStyles(helperStyles, style) helper — user style wins on conflict; undefined when both are absent (no stray style="" attributes).
  • Type-gated rollout: every tranche component redeclares its own bgColor union with (typeof validSchemeColors)[number]. Components that haven't wired bulmaHelperStyles onto their root keep the narrow union, so a scheme value there is a compile error, never a silent no-op. The public BulmaColorProps union stays narrow.
  • Theme companion: Theme bulmaVars now accepts --bulma-scheme-main/-bis/-ter and the -invert trio, so one Theme re-tints every band at once.
  • Skills retaught in the same PR: bestax-layout-scaffold drops .section-alt from the sanctioned custom-CSS budget (now two rules, ≤10 lines) and teaches the prop form; bestax-theming teaches bands as first-class plus the bulmaVars override; the custom-component API reference documents validSchemeColors, bulmaHelperStyles, and mergeBulmaStyles.
  • Docs: color guide scheme-backgrounds table + alternating-bands example, valid-values row, useBulmaClasses/Theme API notes, Section usage example; generated API/MCP artifacts regenerated via pnpm gen.

Testing

  • New unit tests: useColorStyles (all six values, non-scheme/undefined inputs, shade ignored, memoization), useColorClasses scheme no-class cases (± prefix, ± shade), useBulmaClasses bulmaHelperStyles population with class string/rest untouched, mergeBulmaStyles all four input combinations with user-wins precedence.
  • Per tranche component: no has-background- substring + exact var() inline style, classPrefix variant, user-style-wins, and a no-style-attribute regression for non-scheme values.
  • Theme: scheme vars via bulmaVars on both the scoped and isRoot paths.
  • bulma-ui coverage: 99.61% statements / 99.12% branches / 99.75% functions / 99.82% lines (99% gate).
  • pnpm gen produces no diff; pnpm check:conformance clean; pnpm all green. Note: a cold concurrent pnpm all can trip a pre-existing race in bestax-mcp's sync-skills step (build/test/test:coverage each rewrite data/skills/ and turbo runs them in parallel — rmdir/mkdir collisions); the constituent turbo tasks all pass when run sequentially and the full gate then passes. Untouched by this PR.

Merge coordination

This branch may lightly conflict with the #370 PR on components/Card.tsx and regenerated artifacts (docs API pages, bestax-mcp/data). Whichever merges second rebases and reruns pnpm gen.

Closes #369

Summary by CodeRabbit

  • New Features

    • Added scheme-* background color support to cards, containers, boxes, footers, heroes, and sections.
    • Scheme backgrounds adapt safely across light and dark modes using inline styles.
    • Added support for user style overrides and new alternating-section examples.
    • Expanded theme customization for scheme surface variables.
  • Documentation

    • Updated component, helper, theming, and layout guidance with scheme color usage and contrast considerations.

Copilot AI balanced review requested due to automatic review settings August 12, 2026 19:40
@coderabbitai

coderabbitai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The PR adds six Bulma scheme colors as inline CSS-variable backgrounds. It updates shared helpers, supported surface components, themes, tests, Storybook examples, API documentation, skills, and generated catalog metadata.

Changes

Scheme background implementation

Layer / File(s) Summary
Scheme color and style engine
bulma-ui/src/helpers/*
Adds validSchemeColors, useColorStyles, bulmaHelperStyles, and mergeBulmaStyles. User styles override generated styles.
Surface component integration
bulma-ui/src/components/*, bulma-ui/src/elements/*, bulma-ui/src/layout/*
Adds scheme-aware bgColor types and inline-style handling to Card, Box, Container, Footer, Hero, Hero parts, and Section. Tests cover prefixes, overrides, and non-scheme colors.
Stories and usage examples
bulma-ui/src/**/*.stories.tsx
Adds scheme-color controls and examples, including alternating Section bands.
API documentation and metadata
docs/docs/api/*, docs/docs/guides/*, bestax-mcp/data/components/*
Documents scheme values, inline CSS variables, theme overrides, supported props, and inverted-scheme text contrast.
Skill guidance and generated catalog
skills/*, bestax-mcp/data/catalog.json, bestax-mcp/data/skills.json
Updates layout and theming guidance, example counts, package metadata, and reference byte sizes.

Estimated code review effort: 4 (Complex) | ~45 minutes

Mergeability Score: 🔵 Low · up to dba2f

The new scheme-aware background behavior is mergeable, but several documentation and API-reference details remain inconsistent with the shipped behavior, which could mislead users about supported theme variables, alternating bands, or custom-component prop handling. Merge with explicit owner follow-up to correct these bounded documentation issues.

Possibly related PRs

Suggested labels: released, needs-human-review

Suggested reviewers: bestaxbot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main scheme-aware bgColor feature and its purpose of avoiding custom CSS.
Description check ✅ Passed The description clearly covers the changes, affected components, rationale, testing, documentation, related issue, and merge coordination.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/scheme-bgcolor

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Preview Deployment

Preview URL: https://e86e1fed.bestax.pages.dev

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds scheme-aware, dark-mode-adaptive backgrounds to six Bulma surface components, addressing #369.

Changes:

  • Adds scheme color constants, style hooks, merging utilities, and Theme variables.
  • Updates components with tests and a Section Storybook example.
  • Refreshes documentation, skills, and generated MCP data.

Reviewed changes

Copilot reviewed 49 out of 50 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
skills/bestax-theming/SKILL.md Teaches scheme-aware bands.
skills/bestax-theming/references/css-variables.md Documents scheme variables.
skills/bestax-layout-scaffold/SKILL.md Replaces band CSS with props.
skills/bestax-layout-scaffold/references/archetypes.md Updates band guidance.
skills/bestax-custom-component/references/api.md Documents new helper APIs.
docs/docs/guides/helpers/color.md Adds scheme background guide.
docs/docs/api/layout/section.md Documents Section support.
docs/docs/api/layout/hero.md Documents Hero support.
docs/docs/api/layout/footer.md Documents Footer support.
docs/docs/api/layout/container.md Documents Container support.
docs/docs/api/helpers/valid-values.md Adds validSchemeColors.
docs/docs/api/helpers/usebulmaclasses.md Documents helper styles.
docs/docs/api/helpers/theme.md Documents Theme overrides.
docs/docs/api/elements/box.md Documents Box support.
docs/docs/api/components/card.md Documents Card support.
bulma-ui/src/layout/Section.tsx Implements scheme backgrounds.
bulma-ui/src/layout/Section.stories.tsx Adds scheme-band story.
bulma-ui/src/layout/Hero.tsx Implements Hero scheme backgrounds.
bulma-ui/src/layout/Footer.tsx Implements Footer scheme backgrounds.
bulma-ui/src/layout/Container.tsx Implements Container scheme backgrounds.
bulma-ui/src/layout/__tests__/Section.test.tsx Tests Section behavior.
bulma-ui/src/layout/__tests__/Hero.test.tsx Tests Hero behavior.
bulma-ui/src/layout/__tests__/Footer.test.tsx Tests Footer behavior.
bulma-ui/src/layout/__tests__/Container.test.tsx Tests Container behavior.
bulma-ui/src/index.ts Exports style merger.
bulma-ui/src/helpers/useColorClasses.tsx Adds scheme style generation.
bulma-ui/src/helpers/useBulmaClasses.tsx Returns helper styles.
bulma-ui/src/helpers/useBulmaClasses.stories.tsx Demonstrates scheme colors.
bulma-ui/src/helpers/Theme.tsx Allows scheme variables.
bulma-ui/src/helpers/mergeBulmaStyles.ts Adds style merge utility.
bulma-ui/src/helpers/bulmaClassHelpers.ts Defines scheme constants.
bulma-ui/src/helpers/__tests__/useColorClasses.test.tsx Tests color hooks.
bulma-ui/src/helpers/__tests__/useBulmaClasses.test.tsx Tests aggregate styles.
bulma-ui/src/helpers/__tests__/Theme.test.tsx Tests scheme variables.
bulma-ui/src/helpers/__tests__/mergeBulmaStyles.test.ts Tests style merging.
bulma-ui/src/elements/Box.tsx Implements Box support.
bulma-ui/src/elements/__tests__/Box.test.tsx Tests Box support.
bulma-ui/src/components/Card.tsx Implements Card support.
bulma-ui/src/components/__tests__/Card.test.tsx Tests Card support.
bestax-mcp/data/skills.json Refreshes skill metadata.
bestax-mcp/data/components/Valid value constants.json Regenerates constants data.
bestax-mcp/data/components/useBulmaClasses.json Regenerates helper data.
bestax-mcp/data/components/Theme.json Regenerates Theme data.
bestax-mcp/data/components/Section.json Regenerates Section data.
bestax-mcp/data/components/Hero.json Regenerates Hero data.
bestax-mcp/data/components/Footer.json Regenerates Footer data.
bestax-mcp/data/components/Container.json Regenerates Container data.
bestax-mcp/data/components/Card.json Regenerates Card data.
bestax-mcp/data/components/Box.json Regenerates Box data.
bestax-mcp/data/catalog.json Updates generated example counts.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +47 to +51
bgColor?:
| (typeof validColors)[number]
| (typeof validSchemeColors)[number]
| 'inherit'
| 'current';

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 1adc99a — Hero.stories.tsx now has a bgColor argType (full union incl. the scheme values) and a SchemeBackground story covering the parent plus Head/Body/Foot.

Comment on lines +26 to +30
bgColor?:
| (typeof validColors)[number]
| (typeof validSchemeColors)[number]
| 'inherit'
| 'current';

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 1adc99a — Footer.stories.tsx now has a bgColor argType with the scheme values and a SchemeBackground story.

Comment on lines +38 to +42
bgColor?:
| (typeof validColors)[number]
| (typeof validSchemeColors)[number]
| 'inherit'
| 'current';

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 1adc99a — Container.stories.tsx now has a bgColor argType with the scheme values and a SchemeBackground story.

Comment on lines +34 to +38
bgColor?:
| (typeof validColors)[number]
| (typeof validSchemeColors)[number]
| 'inherit'
| 'current';

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 1adc99a — the Box bgColor control now lists the six scheme values, the description covers the inline-style path, and a SchemeBackground story demonstrates it.

Comment on lines +41 to +45
bgColor?:
| (typeof validColors)[number]
| (typeof validSchemeColors)[number]
| 'inherit'
| 'current';

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 1adc99a — the Card bgColor control now lists the six scheme values, the description covers the inline-style path, and a SchemeBackground story demonstrates it.

Comment on lines +272 to +274
### Scheme Backgrounds and `bulmaHelperStyles`

The hook returns a third member, `bulmaHelperStyles`, alongside `bulmaHelperClasses` and `rest`. It is `undefined` for every input except a scheme `backgroundColor` (`scheme-main`, `scheme-main-bis`, `scheme-main-ter`, `scheme-invert`, `scheme-invert-bis`, `scheme-invert-ter`): Bulma ships no `has-background-scheme-*` classes, so those values emit no class and instead surface here as a dark-mode-safe inline style tracking Bulma's scheme CSS variables.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 984cdfb — the API block now destructures and documents bulmaHelperStyles, the mini-hook table lists seven hooks including useColorStyles, the backgroundColor row and the TypeScript appendix show the widened scheme union, and the MCP copy is regenerated.

| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `validColors` | `'primary'`, `'link'`, `'info'`, `'success'`, `'warning'`, `'danger'`, `'black'` … `'white'`, `'light'`, `'dark'` (17 values) | `color`, `backgroundColor` helper props. Component `color` modifier unions are narrower and component-specific; some `validColors` members ship no `is-<color>` CSS (deprecated, warned in dev). See each component's Props table. Scheme-aware components extend their `bgColor` unions with `validSchemeColors` (below). |
| `validColorShades` | `'00'`, `'05'` … `'95'`, `'invert'`, `'light'`, `'dark'`, `'soft'`, `'bold'`, `'on-scheme'` | `colorShade`, `backgroundColorShade` |
| `validSchemeColors` | `'scheme-main'`, `'scheme-main-bis'`, `'scheme-main-ter'`, `'scheme-invert'`, `'scheme-invert-bis'`, `'scheme-invert-ter'` | Scheme-aware `bgColor`/`backgroundColor` values. Emit no class — components render them as a dark-mode-safe inline `background-color: var(--bulma-<value>)` style (Bulma ships no `has-background-scheme-*` helpers). |

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 984cdfb — the overview now states that values produce a helper class for every list except validSchemeColors, whose values produce the bulmaHelperStyles inline style instead; MCP copy regenerated.

@allxsmith
allxsmith requested review from bestaxbot and a balanced review from Copilot August 12, 2026 22:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 49 out of 50 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

docs/docs/api/helpers/usebulmaclasses.md:274

  • The newly documented return member is still omitted from this page's authoritative API block: lines 779–787 destructure and enumerate only bulmaHelperClasses and rest. The composable-hooks table also omits the now-public useColorStyles. Update those sections (and regenerate the MCP copy) so the API reference does not contradict this section or hide the style application required for scheme values.

Comment on lines +126 to +130
if (
backgroundColor &&
(validSchemeColors as readonly string[]).includes(backgroundColor)
) {
return { backgroundColor: `var(--bulma-${backgroundColor})` };

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documented rather than changed, deliberately. Auto-emitting a foreground would be a regression: textColor renders as a class and an inline color always beats a class, so an automatic inline foreground would silently override any textColor the caller sets. Omitting the invert trio would drop API specified in #369. Background helpers never setting a foreground is the existing contract — bgColor="black"/"dark"/"white" have exactly the same contrast trap today. 1adc99a adds the pairing caveat to every widened bgColor TSDoc and to useColorStyles; 984cdfb adds a warning admonition with concrete pairings (color: var(--bulma-scheme-main) via a named class for dual-mode designs, explicit textColor for pinned single-mode) to the color guide.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deep review — 0 blocking · 2 advisory

No. Severity Area Finding Location
1 🔵 Advisory Accessibility The scheme-invert* background values fill a surface with the opposite scheme but leave default (non-inverted) text, so a band built with bgColor=scheme-invert and no matching textColor renders low-contrast text. Consistent with existing fixed bgColor behavior, but the new docs table lists the invert trio with no contrast caveat. docs/docs/guides/helpers/color.md:150
2 🔵 Advisory Robustness The type-gated rollout guarantee holds only for TypeScript consumers. A plain-JS caller can pass bgColor=scheme-main-bis to a non-tranche component (or a scheme value to backgroundColor anywhere), where it produces neither a class nor an inline style, a silent no-op rather than a compile error. Inherent to a type-only gate; same shape as any invalid helper value. bulma-ui/src/helpers/useColorClasses.tsx:120

Overall: The change is sound and well-scoped. Scheme values are correctly diverted off the class path (useColorClasses early-returns because the value is not in validColors) and onto a memoized useColorStyles inline style that references real Bulma v1 tokens (all six --bulma-scheme-main / -main-bis / -main-ter / -invert / -invert-bis / -invert-ter confirmed present in the shipped bulma.css). All six surface components apply the merged style via mergeBulmaStyles(bulmaHelperStyles, style); style is destructured out before the rest-spread so it cannot double-apply via rest, and mergeBulmaStyles(undefined, style) collapses to byte-identical DOM for the non-scheme case (user style wins on conflict; both-absent yields undefined, no stray attribute). The additive bulmaHelperStyles return member and the widened T extends object bound are backward-compatible for existing destructurers. Tests, docs, skills, and generated MCP/API artifacts are all updated in-PR; the relevant unit tests pass locally. The riskiest part for a human to eyeball is the invert-trio contrast trap (advisory 1); everything else is mechanical and covered.

Residual risk:

  • Scheme value silently unstyled on a tranche component: refuted. Every one of the six (Section, Hero + Head/Body/Foot, Container, Footer, Box, Card parent) both reads bulmaHelperStyles from useBulmaClasses and renders it via mergeBulmaStyles; verified by reading each render path and by the per-component exact-inline-style tests passing.
  • Scheme value leaking into a has-background-* class: refuted. addColorClass guards on the validColors membership check and returns early for scheme names; the added useColorClasses no-class tests (with/without prefix, with/without shade) pass.
  • backgroundColorShade corrupting scheme output: refuted. Shade is dropped in the class path (scheme value fails the validColors check) and never read by useColorStyles; documented and unit-tested.
  • DOM regression for components that gained explicit style handling: refuted. mergeBulmaStyles returns undefined when both inputs are absent and a shallow spread of style otherwise, serializing identically to the prior rest-spread path.

🏄 Clean sets rolling in on this one, dude: scheme bands glide right onto the surface with zero gnarly custom CSS, dark mode flips without wiping out, and the whole lineup of tests holds the wave. Only thing to watch is paddling out on scheme-invert without inverted text (squint city). Otherwise, totally good to go.

Copilot AI review requested due to automatic review settings August 13, 2026 01:49
@allxsmith

Copy link
Copy Markdown
Owner Author

Re the deep review advisories:

  1. Invert-trio contrast: addressed in 1adc99a (pairing caveat in every widened bgColor TSDoc and in useColorStyles) and 984cdfb (warning admonition in the color guide with concrete pairings). Emission is unchanged on purpose — an auto foreground would be an inline style and would override any textColor class a caller sets; background helpers not touching the foreground matches the existing bgColor="black"/"dark"/"white" contract.

  2. Plain-JS silent no-op on non-tranche components: acknowledged as inherent to a type-only gate. It is the same failure shape as any invalid helper value today (e.g. bgColor="banana" is silently ignored), and no runtime site can detect it — the hook cannot know whether its caller renders bulmaHelperStyles. TypeScript consumers get the compile error by design.

@github-actions

Copy link
Copy Markdown
Contributor

Preview Deployment

Preview URL: https://d4b72985.bestax.pages.dev

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 54 out of 55 changed files in this pull request and generated no new comments.

Suppressed comments (2)

bulma-ui/src/helpers/useBulmaClasses.stories.tsx:294

  • This story renders an inverted scheme background with the default foreground, which the new color guide explicitly identifies as low-contrast (docs/docs/guides/helpers/color.md:162-163). Pair it with the adaptive --bulma-scheme-main foreground so the example remains readable in both modes.
        <Box bgColor="scheme-invert">Scheme Invert (dark-mode adaptive)</Box>

docs/docs/api/helpers/usebulmaclasses.md:304

  • This recommended pattern applies style before ...rest. Because useBulmaClasses treats a consumer's style as an unrecognized prop and leaves it in rest, spreading rest afterward replaces the merged object and drops the scheme background rather than merging conflicts. Destructure style from rest, or spread the remaining props first and apply mergeBulmaStyles(bulmaHelperStyles, style) last; then regenerate the MCP artifact that embeds this example.

@allxsmith

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copilot AI review requested due to automatic review settings August 13, 2026 02:22
@allxsmith
allxsmith force-pushed the feat/scheme-bgcolor branch from 984cdfb to b574450 Compare August 13, 2026 02:22
@github-actions

Copy link
Copy Markdown
Contributor

Preview Deployment

Preview URL: https://3b6b0f86.bestax.pages.dev

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 54 out of 55 changed files in this pull request and generated no new comments.

Suppressed comments (1)

bulma-ui/src/helpers/useBulmaClasses.stories.tsx:294

  • This visual example uses the default foreground on scheme-invert, which the new color guide explicitly identifies as low-contrast. Pair the inverted surface with the corresponding scheme foreground so the Storybook example remains readable in both light and dark modes.
        <Box bgColor="scheme-invert">Scheme Invert (dark-mode adaptive)</Box>

@allxsmith

Copy link
Copy Markdown
Owner Author

Addressed Copilot's two suppressed notes in the latest commit: the rendered scheme-invert swatch is now mode-pinned via Bulma's scoped data-theme attribute with a paired textColor (the exact pattern the color guide's warning teaches, now also shown there), and the useBulmaClasses example spreads rest before className/style with a note to destructure style in real components so the merged background can't be clobbered. The MCP artifact embedding that example was regenerated.

Copilot AI review requested due to automatic review settings August 13, 2026 02:34
@github-actions

Copy link
Copy Markdown
Contributor

Preview Deployment

Preview URL: https://aadd033c.bestax.pages.dev

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 54 out of 55 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings August 13, 2026 02:38
@allxsmith
allxsmith force-pushed the feat/scheme-bgcolor branch from f0ec9ee to dba2f92 Compare August 13, 2026 02:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 54 out of 55 changed files in this pull request and generated no new comments.

@github-actions

Copy link
Copy Markdown
Contributor

Preview Deployment

Preview URL: https://8840cf4e.bestax.pages.dev

@allxsmith

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@allxsmith
allxsmith merged commit 392e824 into main Aug 13, 2026
13 of 14 checks passed
@allxsmith
allxsmith deleted the feat/scheme-bgcolor branch August 13, 2026 02:58

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/docs/api/helpers/valid-values.md`:
- Line 41: Update validDisplays in docs/docs/api/helpers/valid-values.md:41-41
to include 'none', then regenerate bestax-mcp/data/components/Valid value
constants.json:13-13 so both documentation artifacts list the same complete
display values.

In `@docs/docs/api/layout/section.md`:
- Around line 84-104: Use consistent “alternating” behavior in both
documentation examples: docs/docs/api/layout/section.md lines 84-104 and
docs/docs/guides/helpers/color.md lines 166-187. Either revise each heading and
description to describe successive scheme bands, or update both JSX examples to
repeat a background value on every other Section; apply the same choice and
wording to both sites.

In `@skills/bestax-custom-component/references/api.md`:
- Around line 15-30: Update the example comment around useBulmaClasses to
qualify that rest is DOM-safe only after destructuring component-specific props
and style from the input; custom members of generic T remain in rest. Instruct
callers to remove those props before spreading rest onto the root element and to
spread the merged helper/user styles afterward so user styles retain precedence.

In `@skills/bestax-theming/references/css-variables.md`:
- Around line 84-90: Update the CSS variables reference table near the scheme
background row to document all six scheme variables: retain the main trio and
add --bulma-scheme-invert, --bulma-scheme-invert-bis, and
--bulma-scheme-invert-ter, describing their invert background roles and
Theme.bulmaVars/bgColor support consistently with the existing entries.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 045ffca1-aa82-48b4-8919-fbce91dd7795

📥 Commits

Reviewing files that changed from the base of the PR and between bb59316 and dba2f92.

📒 Files selected for processing (55)
  • bestax-mcp/data/catalog.json
  • bestax-mcp/data/components/Box.json
  • bestax-mcp/data/components/Card.json
  • bestax-mcp/data/components/Container.json
  • bestax-mcp/data/components/Footer.json
  • bestax-mcp/data/components/Hero.json
  • bestax-mcp/data/components/Section.json
  • bestax-mcp/data/components/Theme.json
  • bestax-mcp/data/components/Valid value constants.json
  • bestax-mcp/data/components/useBulmaClasses.json
  • bestax-mcp/data/skills.json
  • bulma-ui/src/components/Card.stories.tsx
  • bulma-ui/src/components/Card.tsx
  • bulma-ui/src/components/__tests__/Card.test.tsx
  • bulma-ui/src/elements/Box.stories.tsx
  • bulma-ui/src/elements/Box.tsx
  • bulma-ui/src/elements/__tests__/Box.test.tsx
  • bulma-ui/src/helpers/Theme.tsx
  • bulma-ui/src/helpers/__tests__/Theme.test.tsx
  • bulma-ui/src/helpers/__tests__/mergeBulmaStyles.test.ts
  • bulma-ui/src/helpers/__tests__/useBulmaClasses.test.tsx
  • bulma-ui/src/helpers/__tests__/useColorClasses.test.tsx
  • bulma-ui/src/helpers/bulmaClassHelpers.ts
  • bulma-ui/src/helpers/mergeBulmaStyles.ts
  • bulma-ui/src/helpers/useBulmaClasses.stories.tsx
  • bulma-ui/src/helpers/useBulmaClasses.tsx
  • bulma-ui/src/helpers/useColorClasses.tsx
  • bulma-ui/src/index.ts
  • bulma-ui/src/layout/Container.stories.tsx
  • bulma-ui/src/layout/Container.tsx
  • bulma-ui/src/layout/Footer.stories.tsx
  • bulma-ui/src/layout/Footer.tsx
  • bulma-ui/src/layout/Hero.stories.tsx
  • bulma-ui/src/layout/Hero.tsx
  • bulma-ui/src/layout/Section.stories.tsx
  • bulma-ui/src/layout/Section.tsx
  • bulma-ui/src/layout/__tests__/Container.test.tsx
  • bulma-ui/src/layout/__tests__/Footer.test.tsx
  • bulma-ui/src/layout/__tests__/Hero.test.tsx
  • bulma-ui/src/layout/__tests__/Section.test.tsx
  • docs/docs/api/components/card.md
  • docs/docs/api/elements/box.md
  • docs/docs/api/helpers/theme.md
  • docs/docs/api/helpers/usebulmaclasses.md
  • docs/docs/api/helpers/valid-values.md
  • docs/docs/api/layout/container.md
  • docs/docs/api/layout/footer.md
  • docs/docs/api/layout/hero.md
  • docs/docs/api/layout/section.md
  • docs/docs/guides/helpers/color.md
  • skills/bestax-custom-component/references/api.md
  • skills/bestax-layout-scaffold/SKILL.md
  • skills/bestax-layout-scaffold/references/archetypes.md
  • skills/bestax-theming/SKILL.md
  • skills/bestax-theming/references/css-variables.md

Comment thread docs/docs/api/helpers/valid-values.md
Comment thread docs/docs/api/layout/section.md
Comment thread skills/bestax-custom-component/references/api.md
Comment thread skills/bestax-theming/references/css-variables.md
@bestax-release-bot

Copy link
Copy Markdown

🎉 This PR is included in version 5.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@bestax-release-bot

Copy link
Copy Markdown

🎉 This PR is included in version 2.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@bestax-release-bot

Copy link
Copy Markdown

🎉 This PR is included in version 4.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@bestax-release-bot

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] bulma-ui: scheme-aware background route (bgColor scheme values or a Section background var)

2 participants