Opened 11 months ago
Last modified 9 months ago
#62781 new defect (bug)
Twenty Twenty: Inconsistent caption styles between editor and front-end in Calendar block
| Reported by: | | Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | minor | Version: | |
| Component: | Bundled Theme | Keywords: | has-screenshots has-patch needs-testing changes-requested |
| Focuses: | css | Cc: |
Attachments (4)
Change History (15)
This ticket was mentioned in PR #8088 on WordPress/wordpress-develop by @sukhendu2002.
11 months ago #1
- Keywords has-patch added
#3
@
11 months ago
Test Report
Description
This report validates whether the indicated patch works as expected.
Patch tested: https://patch-diff.githubusercontent.com/raw/WordPress/wordpress-develop/pull/8088.diff
Environment
- WordPress: 6.8-alpha-59274-src
- PHP: 8.2.27
- Server: nginx/1.27.3
- Database: mysqli (Server: 8.4.3 / Client: mysqlnd 8.2.27)
- Browser: Chrome 131.0.0.0
- OS: Linux
- Theme: Twenty Twenty 2.8
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.0
Actual Results
- ✅ Issue resolved with patch.
Editor:
https://tinyurl.com/2yrpdng3
Frontend:
https://tinyurl.com/226c8sd7
#4
@
11 months ago
- Keywords changes-requested added
Hi
PR 8088 ensures that the caption looks the same in the editor and front.
But when testing I found that the Typography > Appearance option which can be used to adjust the font weight of the block is not working.
It is not working to 100% with or without this PR, but the PR prevents the Typography > Appearance option from styling the caption in the editor.
Can we find a solution where the default font weight for the caption is 600 in both the editor and front, and where the Appearance option works in both the editor and front?
#5
@
11 months ago
- Summary changed from Twenty Twenty Theme: Inconsistent styles between editor and front-end in calendar block to Twenty Twenty: Inconsistent caption styles between editor and front-end in Calendar block
- Version 6.7.1 deleted
This ticket was mentioned in PR #8110 on WordPress/wordpress-develop by @nidhidhandhukiya.
11 months ago #6
Trac ticket
Trac ticket: https://core.trac.wordpress.org/ticket/62781
I have addressed the issue and created a new PR to ensure the following:
- The default font weight for the caption is set to 600 in both the editor and front end.
- The Typography > Appearance option now correctly adjusts the font weight of the caption in both the editor and front.
#7
@
11 months ago
Hello @poena
I have added Pr as per your request.
This new PR resolves the inconsistencies and ensures the functionality works as expected. Please review the changes and let me know if any further adjustments are needed.
#8
@
10 months ago
With PR 8110, all the Typography settings are working.
I want to make the following change request:
The PR also removes a file from the theme Twenty Ten. That change is unrelated.
Also, unrelated to the PR, I am seeing one more problem.
The font family of the calendar table footer is wrong on the front. It should be Inter like the rest of the block.
font-family: "Inter var", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif;
(The footer is only visible if there are posts created in more than one month)
Should we solve this as part of this issue, or open new issues?
#9
@
9 months ago
Hello @poena
I have completed the changes in the Github PR as per your suggestion and aslo Fixed the calendar table footer font to match the rest of the block by setting it to Inter.
#10
@
9 months ago
Test Report
Description
This report validates whether the indicated patch works as expected.
Patch tested: https://github.com/WordPress/wordpress-develop/pull/8110
Environment
- WordPress: 6.8-alpha-20250214.111037
- PHP: 7.4.31-dev
- Server: PHP.wasm
- Database: WP_SQLite_Translator (Server: 5.5 / Client: 3.40.1)
- Browser: Chrome 133.0.0.0
- OS: Windows 10/11
- Theme: Twenty Twenty 2.8
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.0
Actual Results
- ✅ Issue resolved with PR 8110.
Supplemental Artifacts
- Before Editor: https://core.trac.wordpress.org/attachment/ticket/62781/before-8110-editor.png
- Before Site: https://core.trac.wordpress.org/attachment/ticket/62781/before-8110-site.png
- After Editor: https://core.trac.wordpress.org/attachment/ticket/62781/after-8110-editor.png
- After Site: https://core.trac.wordpress.org/attachment/ticket/62781/after-8110-site.png
#11
@
9 months ago
- Focuses css added
PR 8110 would inherit the block's custom font-weight, but is inherit the best choice?
- I think
inheritwould make the caption unexpectedly thin if someone selects an Appearance option of Regular400or lighter (with or without Italic). - The
block-librarystyles set header cells to400, and their weight does not change with the block setting. - For a relative value, the style override could use
bolderon the caption. I think it could be better in some cases, but then selecting Semi Bold600would give the caption a weight of900(which is likely the most surprising result in this context). - If neither
inheritnorbolderwould fit all selections well enough, should the caption and/or header cells inherit the custom weight only when the block text is thicker than600?.wp-block-calendar:where( [style*="font-weight:700"], [style*="font-weight:800"], [style*="font-weight:900"], [style*="font-weight:1000"], ) :is(caption, th) { font-weight: inherit; }
Trac ticket: https://core.trac.wordpress.org/ticket/62781