Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: --lexical-indent-base-value does not work upon initialization #5062

Open
immkoala opened this issue Sep 28, 2023 · 0 comments
Open

Bug: --lexical-indent-base-value does not work upon initialization #5062

immkoala opened this issue Sep 28, 2023 · 0 comments

Comments

@immkoala
Copy link

I have a paragraph node with --lexical-indent-base-value set to 20px.

However, during initialization, padding-inline-start is still set to 40px.

I debugged a bit and preliminarily suspect the following logic to be the issue:

const indentationBaseValue =
    getComputedStyle(dom).getPropertyValue('--lexical-indent-base-value') ||
    DEFAULT_INDENT_VALUE;

When executing getComputedStyle(dom).getPropertyValue('--lexical-indent-base-value'), the dom node hasn't been inserted into the document yet, causing the retrieved value to be empty.

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

No branches or pull requests

1 participant