Opened 3 years ago
Closed 2 years ago
#55910 closed defect (bug) (fixed)
Twenty Twenty: Separator Block backslash issue in editor
Reported by: | kmadhak | Owned by: | audrasjb |
---|---|---|---|
Milestone: | 6.1 | Priority: | normal |
Severity: | normal | Version: | 5.6 |
Component: | Bundled Theme | Keywords: | has-patch commit |
Focuses: | ui, css | Cc: |
Description
In a Twenty Twenty Theme when we add a separator block in editor with default styles option, we can view that there is only single backslash in middle of a block and the second backslash is at the beginning of a block. But when we view the separator block at frontend side, both the backslashes are together in middle of the block.
Steps to replicate:
1: Activate the Twenty Twenty Themes
2: Add Separator block
3: Choose Default Styles Option
4: Save Page/Post
5: View the page/post at front side.
for more information I provide video attachment.
Thank you.
Attachments (13)
Change History (33)
#1
@
3 years ago
- Summary changed from Twenty Twenty Theme:- Separator Block backslash issue in editor to Twenty Twenty: Separator Block backslash issue in editor
#2
@
3 years ago
- Keywords has-patch added; needs-patch removed
- Milestone changed from Awaiting Review to 6.1
- Version changed from 6.0 to 5.6
Thanks for opening a ticket! I was looking at this yesterday.
The two slanted lines are created by ::before
and ::after
pseudo-elements, and the editor overrides the left and right positioning of the ::after
line:
.block-editor-block-list__layout .block-editor-block-list__block::after { left: 0; right: 0; }
In the theme stylesheet, adding a class for a more specific selector and defining the opposite side as auto
can fix the alignment when unselected:
.wp-block hr.wp-block-separator::after { right: calc(50% - 5px); left: auto; }
The focus outline could be fixed by adding contenteditable="false"
to the block instead of editing styles (reported on GB41543).
This ticket was mentioned in PR #2781 on WordPress/wordpress-develop by mukeshpanchal27.
3 years ago
#3
Trac ticket: https://core.trac.wordpress.org/ticket/55910
#4
@
3 years ago
Patch 55910.diff is not working in block editor. For the block editor we have to use .editor-styles-wrapper
parent selector instead of .wp-block
#5
@
3 years ago
Thanks! I forgot to check other alignment options (my block was set to Wide Width). Using .editor-styles-wrapper
works with the four alignments: None, Center, Wide and Full.
#8
@
3 years ago
hello @nidhidhandhukiya,
As we can see that your patch is working as the solution for this issue, but there is few code which is not needed for solving this issue.I have added a patch with the necessary code.
Thanks
#9
@
3 years ago
The patch needs the same to mirror these changes in the RTL stylesheet, which @mukesh27's PR 2781 has does.
#10
@
2 years ago
I made a mistake earlier: the changes would not be the same for both stylesheets, but a mirrored copy of those styles.
Because the border-radius
on the ::after
pseudo-element made that line a little lighter than the ::before
, I set it to zero.
This ticket was mentioned in Slack in #core by chaion07. View the logs.
2 years ago
This ticket was mentioned in Slack in #core by cu121. View the logs.
2 years ago
#13
@
2 years ago
- Keywords dev-feedback needs-testing added
@kmadhak thank you for reporting this. We reviewed this ticket during a recent bug-scrub session. Based on the feedback received we are making the following changes:
- Adding keywords needs-testing & dev-feedback
- Requesting review if possible.
Cheers!
Props to @cu121 @robinwpdeveloper
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
2 years ago
#15
@
2 years ago
- Milestone changed from 6.1 to 6.2
As per today's Core bug scrub:
Since this ticket is still being discussed, and still needs testing/dev-feedback and potential follow-up patches, let's move it to the next milestone.
#17
@
2 years ago
@sabernhardt if you think this is good to go, feel free to move it back to milestone 6.1, I'd be happy to commit it.
For better understanding I have attached a video