Skip to content

fix(BBBCheckbox): show the brand color when checked or indeterminate - #121

Open
germanocaumo wants to merge 1 commit into
bigbluebutton:developfrom
germanocaumo:fix/checkbox-checked-color
Open

germanocaumo wants to merge 1 commit into
bigbluebutton:developfrom
germanocaumo:fix/checkbox-checked-color

Conversation

@germanocaumo

Copy link
Copy Markdown
Contributor

What does this PR do?

A checked or indeterminate BBBCheckbox now shows the brand color (colorBrand1) instead of MUI's default blue.

  • The color rule doubles its class (&&.Mui-checked), so it wins over MUI's own rule whichever stylesheet is injected later.
  • The indeterminate state gets the same color. It was never styled, so it always showed MUI's blue.
  • A disabled box always shows MUI's disabled color.

Closes Issue(s)

None. Found in bigbluebutton/bigbluebutton#26048.

Motivation

&.Mui-checked is exactly as specific as MUI's .css-….Mui-checked rule, so the stylesheet injected later wins. In the BigBlueButton client, MUI's emotion styles come after the styled-components sheet, so a checked box renders #1976d2.

More

  • Checked in a BigBlueButton 4.0 client (Chromium), with this rule inserted where the library's rule sits in the styled-components sheet:
    • checked: rgb(25, 118, 210) today, rgb(15, 112, 215) (#0F70D7) with this PR;
    • indeterminate: the same change;
    • disabled: stays rgba(0, 0, 0, 0.26).
  • Where the library's rule already won (an app whose emotion styles come first), the checked color doesn't change, but a disabled checked box now turns MUI's disabled grey instead of the brand color.
  • Overriding the checked color from outside now also needs a doubled class (e.g. &&.Mui-checked in styled(BBBCheckbox) or sx), since MUI's color prop and a single-class override no longer win.
  • Added/updated documentation

The color rule, `&.Mui-checked`, is exactly as specific as MUI's own
checked/indeterminate rule, so whichever stylesheet comes later wins. In
BigBlueButton, MUI's emotion styles are injected after the
styled-components sheet, so a checked box shows MUI's default blue
(#1976d2) instead of colorBrand1. The indeterminate state was never
styled, so it always showed MUI's blue.

Double the class so the brand color wins in either order, and apply it
to the indeterminate state too. A disabled box now always shows MUI's
disabled color; where the library's rule used to win, a disabled
checked box was brand-colored.
germanocaumo added a commit to germanocaumo/bigbluebutton that referenced this pull request Nov 13, 2026
The camera settings' "Whole image" brightness option was the last user
of common/checkbox, and common/radio has no users. They were also the
only code importing @mui/system directly, which kept a 5.x copy at the
top level next to the 6.x one @mui/material uses.

- The option is a BBBCheckbox. Its label names the input, and its
  description stays linked through aria-describedby.
- common/checkbox and common/radio are removed.
- @mui/system is dropped from package.json, so only MUI 6.x remains.

Visible differences, both from the library's look:
- the checked box is blue instead of green. It is MUI's default blue,
  not the brand color, until the client moves to a library release
  with bigbluebutton/bbb-ui-components-react#121;
- the box loses MUI's 9px ripple padding (39px to 21px). The label stays
  clickable.

The old checkbox also toggled on Enter. Like a native checkbox, it now
toggles on Space.
@Arthurk12
Arthurk12 self-requested a review November 13, 2026 23:58

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant