Skip to content

Conversation

@AlessioGr
Copy link
Member

@AlessioGr AlessioGr commented Jun 17, 2025

Fixes #12847

  • Uses rem instead of em for inline padding, for indent consistency between nodes with different font sizes
  • Use rem instead of px in deprecated html converters for consistency

DanRibbens
DanRibbens previously approved these changes Jun 17, 2025
@AlessioGr AlessioGr merged commit 11ac230 into main Jun 19, 2025
180 of 231 checks passed
@AlessioGr AlessioGr deleted the fix/lexical-converter-padding branch June 19, 2025 04:43
@github-actions
Copy link
Contributor

🚀 This is included in version v3.44.0

GermanJablo added a commit that referenced this pull request Jul 25, 2025
GermanJablo added a commit that referenced this pull request Jul 25, 2025
…make paragraphs and lists match without CSS (#13274) Previously, the Lexical editor was using px, and the JSX converter was using rem. #12848 fixed the inconsistency by changing the editor to rem, but it should have been the other way around, changing the JSX converter to px. You can see the latest explanation about why it should be 40px [here](#13130 (comment)). In short, that's the default indentation all browsers use for lists. This time I'm making sure to leave clear comments everywhere and a test to avoid another regression. Here is an image of what the e2e test looks like: <img width="321" height="678" alt="image" src="https://github.com/user-attachments/assets/8880c7cb-a954-4487-8377-aee17c06754c" /> The first part is the Lexical editor, the second is the JSX converter. As you can see, the checkbox in JSX looks a little odd because it uses an input checkbox (as opposed to a pseudo-element in the Lexical editor). I thought about adding an inline style to move it slightly to the left, but I found that browsers don't have a standard size for the checkbox; it varies by browser and device. That requires a little more thought; I'll address that in a future PR. Fixes #13130
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants