-
-
Notifications
You must be signed in to change notification settings - Fork 602
fix: Basic block styling #1700
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
fix: Basic block styling #1700
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/mantine
@blocknote/server-util
@blocknote/react
@blocknote/shadcn
@blocknote/xl-docx-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
commit: |
@matthewlipski this was removed intentionally here; #1629 |
display: flex
to block contentThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current spacing looks off, could we get it back to how it was before this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like display: inline
is just a nightmare. The empty list item cursor is browser-specific, and the PW snapshot has an additional space between the inline elements that you can't remove without some hacks. I'll see if I can get the selection working with flexbox.
.bn-block-content[data-text-alignment="center"] { | ||
justify-content: center; | ||
} | ||
|
||
.bn-block-content[data-text-alignment="right"] { | ||
justify-content: flex-end; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this right?
This PR fixes a few issues with the basic editor styling:
display: flex
from.bn-block-content
on list items as this was causing the issue reported by The wrong cursor position was inserted when clicking at the end of the paragraph #1588 and missed in fix: Selection handling when clicking editor padding #1629.display: inline
to.bn-inline-content
, which allows list item content to be side-by-side with the:before
element without usingdisplay: flex
on.bn-block-content
.display: flex
to.bn-block-content
only for blocks without inline content. This doesn't reintroduce the bug from The wrong cursor position was inserted when clicking at the end of the paragraph #1588 as that only affects blocks with inline content. Fixes Image alignment broken in latest update #1687 and a regression from fix: Selection handling when clicking editor padding #1629.Closes #1687