-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Disable drop cap control if text is aligned #42326
Conversation
Size Change: +378 B (0%) Total Size: 1.26 MB
ℹ️ View Unchanged
|
Thanks for working on this! I'm getting an error trying to compile this branch:
Question: if I apply the dropcap when left-aligned, and then center or right aligned, is the drop cap removed? In principle it makes total sense to remove the drop cap for center and right aligned, as it won't look very good there. Thanks for the PR! |
I think something may have gone wrong with the trunk merge, I will check if I can build it. |
I found that Yes on LTR the drop cap is removed if the text is centered or right aligned and can be added again when left aligned or if no alignment is selected. Screen.Recording.2022-09-20.at.11.16.58.mov |
Looks good. Instead of "Aligned text can not have a drop cap", can we change that to "Not available for aligned text"? |
What?
Disables drop cap control for paragraph blocks if the text is aligned to:
Fixes #11756
Why?
The drop cap did not work if the text was aligned because the first letter was not aligned with the rest of the text.
The drop cap also did not work on RTL where the first letter was in the wrong position.
How?
When the text is aligned:
dropCap
is updated as well as the .has-drop-cap CSS classname.Testing Instructions
Please test the deprecation:
One each for no alignment, left, center and right alignment.
Testing the functionality:
Repeat step 3.
Confirm that the drop cap option is available for the left aligned block and the block with no alignment.
Confirm that it is disabled for the centered and right alignment.
Switch to an RTL language.
Refresh the post or page and confirm that there are no block validation errors.
Please confirm that when you switch to RTL, the left aligned block still displays the drop cap, but the drop cap control is disabled for this alignment.
Open the Advanced panel in the block settings sidebar.
Confirm that the has-drop-cap class is in the CSS field. Remove it.
Confirm that you were able to remove the visual drop cap.
Check the front:
Confirm that the drop cap is placed on the right side of the RTL text and that the spacing (margin) is correct.
Screenshots or screencast