Skip to content

fix(math): update selected inline content styling - #2983

Merged
nperez0111 merged 1 commit into
mainfrom
selected-node-inline-styling
Sep 28, 2026
Merged

nperez0111 merged 1 commit into
mainfrom
selected-node-inline-styling

Conversation

@matthewlipski

@matthewlipski matthewlipski commented Aug 18, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This PR removes the border from selected inline content and changes the background to a more visible color. Selected block styling remains the same.

Rationale

The current selected inline content styling looks off.

Changes

  • Added CSS rule.

Impact

N/A

Testing

N/A

Screenshots/Video

Before:

image

After:

image

Checklist

  • Code follows the project's coding standards.
  • Unit tests covering the new feature have been added.
  • All existing tests pass.
  • The documentation has been updated to reflect the new feature

Additional Notes

Summary by CodeRabbit

  • Style
    • Improved visual highlighting for selected inline elements with a darker translucent background.
    • Removed the inset border from inline selections while preserving existing styling for other selected elements.

@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blocknote Ready Ready Preview Aug 18, 2026 2:41pm
blocknote-website Ready Ready Preview Aug 18, 2026 2:41pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6c5d2544-d84c-4f34-8eb5-5c923b0750a3

📥 Commits

Reviewing files that changed from the base of the PR and between 1e26f1c and a5bdc22.

📒 Files selected for processing (1)
  • packages/core/src/editor/Block.css

Included review availability: Your plan includes up to 10 reviews per rolling hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The editor adds a dedicated selection overlay for inline nodes. The overlay uses a darker translucent background and removes the inset border. Other selected nodes keep the existing styling.

Changes

Inline selection styling

Layer / File(s) Summary
Inline selection overlay
packages/core/src/editor/Block.css
Adds a specialized overlay for selected inline nodes with a darker translucent background and no box shadow.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: nperez0111, yousefed

Merge Risk: ⚪ Minimal · up to a5bdc

This change only updates the visual styling of selected inline content while leaving selected block styling unchanged; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly and concisely describes the main change: updating styling for selected inline content.
Description check ✅ Passed The description includes all required sections and explains the styling change, rationale, impact, and visual result. Testing is listed as N/A, and the checklist remains unchecked, so test coverage an…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch selected-node-inline-styling

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

> A rabbit hops through highlighted space,
> Inline nodes now have a clearer place.
> Darker shade, border gone,
> Selection shines on.
> “Neat!” says the rabbit with grace.

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

@pkg-pr-new

pkg-pr-new Bot commented Aug 18, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@blocknote/ariakit

npm i https://pkg.pr.new/@blocknote/ariakit@2983

@blocknote/code-block

npm i https://pkg.pr.new/@blocknote/code-block@2983

@blocknote/core

npm i https://pkg.pr.new/@blocknote/core@2983

@blocknote/diagram-block

npm i https://pkg.pr.new/@blocknote/diagram-block@2983

@blocknote/mantine

npm i https://pkg.pr.new/@blocknote/mantine@2983

@blocknote/math-block

npm i https://pkg.pr.new/@blocknote/math-block@2983

@blocknote/react

npm i https://pkg.pr.new/@blocknote/react@2983

@blocknote/server-util

npm i https://pkg.pr.new/@blocknote/server-util@2983

@blocknote/shadcn

npm i https://pkg.pr.new/@blocknote/shadcn@2983

@blocknote/xl-ai

npm i https://pkg.pr.new/@blocknote/xl-ai@2983

@blocknote/xl-docx-exporter

npm i https://pkg.pr.new/@blocknote/xl-docx-exporter@2983

@blocknote/xl-email-exporter

npm i https://pkg.pr.new/@blocknote/xl-email-exporter@2983

@blocknote/xl-multi-column

npm i https://pkg.pr.new/@blocknote/xl-multi-column@2983

@blocknote/xl-odt-exporter

npm i https://pkg.pr.new/@blocknote/xl-odt-exporter@2983

@blocknote/xl-pdf-exporter

npm i https://pkg.pr.new/@blocknote/xl-pdf-exporter@2983

commit: a5bdc22

@github-actions

github-actions Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://TypeCellOS.github.io/BlockNote/pr-preview/pr-2983/

Built to branch gh-pages at 2026-09-28 17:12 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@YousefED

Copy link
Copy Markdown
Collaborator

Nice. Tested on both dark and light mode? seems like those should be different colors, right?

@nperez0111

Copy link
Copy Markdown
Contributor

I wonder if it would've been better as an outline rather than a border?

@matthewlipski

matthewlipski commented Aug 20, 2026 •

Copy link
Copy Markdown
Collaborator Author

Nice. Tested on both dark and light mode? seems like those should be different colors, right?

Color is the same for both because it's a translucent overlay, so it looks different on light and dark mode because the light/dark background is still visible behind it.

I wonder if it would've been better as an outline rather than a border?

Tried that but wasn't a fan. For selected inline content to look good with an outline you'd need to add padding, else the outline can overlap content inside. The added padding then looks weird when the inline content isn't selected, as there is additional empty space before and after. I briefly considered adding the padding only when selected but having text around the inline content get repositioned because of it felt janky.

@nperez0111 nperez0111 changed the title fix: update selected inline content styling fix(math): update selected inline content styling Sep 28, 2026
@nperez0111
nperez0111 merged commit 549bec5 into main Sep 28, 2026
28 checks passed
@nperez0111
nperez0111 deleted the selected-node-inline-styling branch September 28, 2026 17:01

This branch was successfully deployed

2 active deployments
Preview – blocknote-website — a5bdc225 Deployed Aug 18, 2026 by vercel[bot]
Preview – blocknote — a5bdc225 Deployed Aug 18, 2026 by vercel[bot]
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.

3 participants