Closed matthewlipski closed 4 weeks ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated (UTC) |
---|---|---|---|
blocknote | ✅ Ready (Inspect) | Visit Preview | Jun 6, 2024 11:54am |
blocknote-website | ✅ Ready (Inspect) | Visit Preview | Jun 6, 2024 11:54am |
This PR changes the side menu to be positioned centered on the first line of a block. Blocks with no text content usually assume the line height of a paragraph block.
This solution is a bit hacky in that the line height values for different blocks are hard coded instead of taking them from a bounding box, though fixing this would add a lot of complexity. Fortunately, it's easy for consumers to change those values via CSS.
Also, Notion does not center the side menu for things like file blocks, instead using the paragraph block line height, as you can see below: I think this looks really ugly since the block is short enough that I think it should be centered, so I changed this for file & audio blocks also, as well as for when the add file button is showing in all types of file blocks.
Closes #386