Skip to content

[Breaking Change][lexical] Bug Fix: Fix --lexical-indent-base-value CSS variable override #8132

Merged
etrepum merged 3 commits intofacebook:mainfrom
achaljhawar:fix/indent-base-value-override
Feb 12, 2026
Merged

[Breaking Change][lexical] Bug Fix: Fix --lexical-indent-base-value CSS variable override #8132
etrepum merged 3 commits intofacebook:mainfrom
achaljhawar:fix/indent-base-value-override

Conversation

@achaljhawar
Copy link
Copy Markdown
Contributor

@achaljhawar achaljhawar commented Feb 11, 2026

Breaking change

Setting the --lexical-indent-base-value CSS custom property is now read from the editor's root element, so it must be set there or higher (e.g. :root) in the CSS. The previous implementation that attempted to read this property from other nodes had race conditions and performance implications.

Description

fixes --lexical-indent-base-value CSS variable override by reading it from the editor root element instead of detached DOM nodes, and removing element-level declarations that were shadowing :root overrides.

Closes #8095

Before

Lexical.Playground.mp4

After

Lexical.Playground.1.mp4

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 11, 2026

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

Project Deployment Actions Updated (UTC)
lexical Ready Ready Preview, Comment Feb 12, 2026 1:07am
lexical-playground Ready Ready Preview, Comment Feb 12, 2026 1:07am

Request Review

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 11, 2026
@etrepum etrepum added the extended-tests Run extended e2e tests on a PR label Feb 11, 2026
Copy link
Copy Markdown
Collaborator

@etrepum etrepum left a comment

Choose a reason for hiding this comment

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

This reverted the change to the CSS but now it doesn't work for a different reason, --lexical-indent-base-value is only applied to indented DOM so it will never be observed by this change to indentationBaseValue

@achaljhawar achaljhawar requested a review from etrepum February 12, 2026 01:10
@etrepum etrepum changed the title [lexical] Bug Fix: Fix --lexical-indent-base-value CSS variable override [Breaking Change][lexical] Bug Fix: Fix --lexical-indent-base-value CSS variable override Feb 12, 2026
@etrepum etrepum added this pull request to the merge queue Feb 12, 2026
Merged via the queue into facebook:main with commit f6b5c77 Feb 12, 2026
42 checks passed
@etrepum etrepum mentioned this pull request Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. extended-tests Run extended e2e tests on a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: --lexical-indent-base-value: 20px; not work

2 participants