Opened 2 years ago
Closed 18 months ago
#60560 closed defect (bug) (wontfix)
Twenty Nineteen: Group block font size is not applied to Pullquote
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 6.4.3 |
| Component: | Bundled Theme | Keywords: | has-patch needs-testing close 2nd-opinion |
| Focuses: | Cc: |
Description
Steps to reproduce the issue :-
- Activate Twenty Ninteen theme.
- Choose Group block.
- Now take paragraph and pullquote block inside the group block.
- From group block settings change font size.
You can able to see the whatever font-size is taken that is applied to paragraph block but not applicable for pullquote block.
I have attached video for better understanding.
Video URL :- https://share.cleanshot.com/7YmTDzcSljsKzRtXLPpy
Attachments (2)
Change History (8)
#2
@
2 years ago
- Summary changed from Twenty Ninteen - Group block settings not applied in pullquote. to Twenty Ninteen - Group block font size is not applied to pullquote.
#3
@
2 years ago
Hello @poena
As per your suggestion I have updated the scss file and as you mentioned that we have to update the font-size if that is given to group-block for that we need some specific class adds in wp-block-group class wherever we use custom-font-size.
Because, whenever we choose from the styles from the editor settings the class is added into the wp-block-group but if we applied the custom-font-size no class is added into the wp-block-group
I have prepared js for that this will add the class into the wp-block-group if custom font size is applied.
// Get all elements with the class wp-block-group
var elements = document.getElementsByClassName('wp-block-group');
// Iterate over each element
for (var i = 0; i < elements.length; i++) {
// Get the style attribute value
var styleAttribute = elements[i].getAttribute('style');
// Check if the style attribute contains font-size
if (styleAttribute && styleAttribute.includes('font-size')) {
// Add the class has-custom-font-size
elements[i].classList.add('has-custom-font-size');
}
}
According to me, If we get this class so we can able to update the css accordingly.
#5
@
18 months ago
- Keywords close 2nd-opinion added
- Summary changed from Twenty Ninteen - Group block font size is not applied to pullquote. to Twenty Nineteen: Group block font size is not applied to Pullquote
I do not agree with inheriting font size from a Group (or Column) block for the Pullquote, even if the patch would check for a -font-size class or the font-size property in style.
The Pullquote block is designed to be larger than other paragraph text. Someone who sets a Group to the Large preset (or similar) may not want the Pullquote at twice the size, but someone who uses a smaller font size for the Group likely would want the Pullquote to be that much bigger. And anyone could be surprised by such a change when updating the theme. This is probably not a decision we should make for other people, especially after five years.
#6
@
18 months ago
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
On reflection I would agree with you @sabernhardt. If we are changing something unexpectedly after so long it is something we should consider and weigh up, in this case it does seem like we should close. Thank you everyone.
Hi
I can reproduce the bug also on WordPress 6.5 beta 1.