Opened 5 months ago
Closed 6 weeks ago
#60664 closed defect (bug) (fixed)
Twenty Nineteen: Avatar block size is different in the editor and front
Reported by: | poena | Owned by: | karmatosed |
---|---|---|---|
Milestone: | 6.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Bundled Theme | Keywords: | has-testing-info has-patch has-screenshots commit |
Focuses: | Cc: |
Description
The default size for the avatar block is 96. But on the front this displays as 49.5px.
The size is overwritten by the theme CSS:
.avatar { border-radius: 100%; display: block; height: calc(2.25* 1rem); min-height: inherit; width: calc(2.25* 1rem); }
When the user changes the size in the block option in the settings panel,
it is not reflected on the front.
Environment
- WordPress: 6.4.3, also tested on 6.5 Beta
- PHP: 8.1.23
- Server: nginx/1.16.0
- Database: mysqli (Server: 8.0.16 / Client: mysqlnd 8.1.23)
- Browser: Chrome 122.0.0.0
- OS: macOS
- Theme: Twenty Nineteen 2.7
- MU Plugins: None activated
- Plugins:
- Test Reports 1.1.0
Steps to Reproduce
- Add an avatar block.
- Duplicate the block and adjust the size to be larger than the default.
- Duplicate the block again and adjust the size to be smaller than the default.
Expected Results
- ✅ Avatar size should match the size set in the block control
Actual Results
- ❌ Avatar size does not match the size set in the block control
Attachments (3)
Change History (15)
#2
@
5 months ago
- Keywords has-patch added; needs-patch removed
Hello @poena ,
I have added a patch and then I have found the expected result. Maybe this will resolve the issue.
Thank You
#3
@
5 months ago
- Keywords changes-requested added
The width and height were added to the .avatar
class since initial commit, and I did not find where those might be necessary.
However, if any avatar image requires those rules, the Avatar block could have its own styles with either .wp-block-avatar .avatar
or .wp-block-avatar__image
in _blocks.scss
.
.wp-block-avatar__image { width: auto; height: auto; }
The patch will need to edit an SCSS file, either _media.scss
to remove or _blocks.scss
to add, and then build the CSS from that.
#4
@
5 months ago
- Keywords changes-requested removed
Hi @sabernhardt ,
Thanks for this feedback. I have updated my patch. And now it's changing from _media.scss
and it's build successfully. Now it's working fine.
Thank you.
#5
@
4 months ago
- Keywords needs-testing added
- Milestone changed from Awaiting Review to Future Release
#6
@
3 months ago
I have tested this a few times and not found it to work, I would therefore like others to test this please and confirm what they get using the patch that is added.
#7
@
2 months ago
- Keywords has-screenshots added; needs-testing removed
I tested changes with the mentioned patch and it resolves this issue.
Bug Report
Description
This report validates whether the indicated patch works as expected.
Patch tested: https://core.trac.wordpress.org/attachment/ticket/60664/60664.2.diff
Environment
- WordPress: 6.6-alpha-57778-src
- PHP: 7.4.27
- Server: nginx/1.21.6
- Database: mysqli (Server: 8.0.37 / Client: mysqlnd 7.4.27)
- Browser: Chrome 124.0.0.0
- OS: macOS
- Theme: Twenty Twenty-Four 1.1
- MU Plugins: None activated
- Plugins:
- Test Reports 1.1.0
Steps to Reproduce
- Add an avatar block.
- Duplicate the block and adjust the size to be larger than the default.
- Duplicate the block again and adjust the size to be smaller than the default.
Expected Results
✅ Avatar size should match the size set in the block control
Actual Results
✅ Avatar size shows perfectly as expected
Maybe this patch will resolve the issue.