Skip to content

Regression 0.50.0 : Color Menu render preview #2732

Closed

Description

@jbpenrath

What’s broken?

Since version 0.50.0, the render preview in the color menu is broken (see the screenshot)

What did you expect to happen?

Like previous versions, the color menu should show render color preview properly.

Steps to reproduce

  1. Go to https://www.blocknotejs.org/demo
  2. Select text to show the toolbar
  3. Open the text color menu
  4. See that color preview is broken.

BlockNote version

v0.50.0

Environment

React 19.2.4 / Chromium 148.0.7778.97 / Mac OS 26.4.1

Additional context

Image

Claude take :

Root cause — CSS selector was narrowed in 0.50.0
In @blocknote/react/src/editor/styles.css, the rule that colorized the icon was changed.

0.46.2 → 0.49.0 (working):
[data-style-type="textColor"][data-value="red"],
[data-text-color="red"] { /* ← matches .bn-color-icon */
color: var(--bn-colors-highlights-red-text);
}

0.50.0 (broken):
[data-style-type="textColor"][data-value="red"],
.bn-block:has(> .bn-block-content[data-text-color="red"]) { /* ← scoped to editor blocks only */
color: var(--bn-colors-highlights-red-text);
}

The standalone [data-text-color="red"] selector was replaced by a .bn-block:has(> .bn-block-content[...]) selector —
clearly to prevent the rule from leaking onto non-block content inside the editor (a reasonable intent).

Contribution

  • I'd be interested in contributing a fix for this issue

Sponsor

  • I'm a sponsor and would appreciate if you could look into this sooner than later 💖

Activity

  1. added
    needs-triageIssue has not yet been reviewed or classified by maintainers.
    on May 11, 2026
  2. added
    bug:P3Medium: Noticeable but non-blocking issues.
    and removed
    needs-triageIssue has not yet been reviewed or classified by maintainers.
    on May 15, 2026
  3. AntoLC commented on May 19, 2026

    @AntoLC

    Yes I noticed that as well with custom blocks.
    Comes probably from here: e587cb0

    It could be a solution I have the feeling:

    - .bn-block:has(> .bn-block-content[data-text-color="red"]) {
    + .bn-block:has(.bn-block-content[data-text-color="red"]) {
        color: var(--bn-colors-highlights-red-text);
      }
  4. nperez0111 commented on May 20, 2026

    @nperez0111
    Contributor

    We released a patch with 0.51.2, sorry for the bug! Thanks for reporting

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

Metadata

Metadata

Assignees

Labels

bug:P3Medium: Noticeable but non-blocking issues.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions