Make WordPress Core

Opened 8 months ago

Last modified 6 months ago

#63331 new defect (bug)

Twenty Nineteen: Calendar block font-family issue.

Reported by: viralsampat's profile viralsampat Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 5.0
Component: Bundled Theme Keywords: has-patch dev-feedback has-test-info has-screenshots
Focuses: ui, css Cc:

Description

Hello Team,

I have checked "Calendar" block and I found that its font-family is not appear properly into the "twentynineteen" theme.

The calendar block font-family are not same into the front-end & back-end, So, I think that it should be same at both(Front-end & Editor-end).

I have tested this into the below mentioned configurations:

  • WordPress version: WordPress 6.8.0 running
  • Theme: Twenty Fifteen
  • Browser: Google Chrome, Version 135.0.7049.96 (Official Build) (arm64)
  • Device: MacBook Air M1
  • OS: macOS 15.4.1 (24E263)
  • Gutenberg plugin: Version 20.6.0

For better understanding, here I have attached its screenshots.

Thanks,

Attachments (5)

twentynineteen_calender_block_back_end.pngโ€‹ (181.5 KB) - added by viralsampat 8 months ago.
Back-end:
twentynineteen_calender_block_front_end.pngโ€‹ (255.4 KB) - added by viralsampat 8 months ago.
Front-end
63331.patchโ€‹ (530 bytes) - added by viralsampat 8 months ago.
I have checked above mentioned issue and I have resolved it and added patch. Also, I have attached screenshot after resolved this issue.
after_change_twentynineteen_calender_block_back_end.pngโ€‹ (154.0 KB) - added by viralsampat 8 months ago.
After resolved issue Back-end:
after_change_twentynineteen_calender_block_front_end.pngโ€‹ (142.7 KB) - added by viralsampat 8 months ago.
After resolved issue front-end:

Download all attachments as: .zip

Change History (11)

#1 @khushipatel15
8 months ago

place this code snippet in functions.php and see if it works.

<?php
function twenty_nineteen_custom_calendar_styles() {
    wp_enqueue_style( 'twenty-nineteen-calendar-styles', get_template_directory_uri() . '/css/calendar-styles.css' );
}
add_action( 'enqueue_block_editor_assets', 'twenty_nineteen_custom_calendar_styles' );

@viralsampat
8 months ago

I have checked above mentioned issue and I have resolved it and added patch. Also, I have attached screenshot after resolved this issue.

@viralsampat
8 months ago

After resolved issue front-end:

#2 @sabernhardt
8 months ago

  • Component changed from General to Bundled Theme
  • Keywords needs-patch added; 2nd-opinion needs-testing dev-feedback removed
  • Milestone changed from Awaiting Review to Future Release
  • Version changed from 6.8 to 5.0

โ€‹PR 571 set the table fonts to match headings. On the front, that works for any table elements, but the editor styles only apply to Table blocks. The editor styles should be updated (SCSS and CSS), not the front.

The Calendar block was not available yet with WordPress 5.0, but the font would have been incorrect for tables in the Classic Editor at that time.

This ticket was mentioned in โ€‹PR #8996 on โ€‹WordPress/wordpress-develop by โ€‹@rishabhwp.


6 months ago
#3

  • Keywords has-patch added; needs-patch removed

This PR addresses a visual inconsistency in the Twenty Nineteen theme where the Calendar block (.wp-calendar-table) displays a different font-family in the block editor compared to the front-end.

### Changes:

  • Adds a font-family rule to .wp-calendar-table in style-editor.scss using the existing $font__heading variable and font-family() mixin.
  • Ensures consistent typography between front-end and editor.
  • Rebuilds style-editor.css and style-editor-rtl.css with the updated styles.

#4 follow-up: @darshitrajyaguru97
6 months ago

  • Keywords needs-testing added

Test Report

Patch tested: https://core.trac.wordpress.org/attachment/ticket/63331/63331.patch

Environment:

OS: Windows
PHP: 8.2.28
WordPress: 6.9-alpha-60093-src
Browser: Chrome
Theme: Twenty Nineteen
Plugins: None activated

Actual Results:

โœ… Before patch:
Backend: โ€‹https://prnt.sc/-GxIVqwRlrIc
Frontend: โ€‹https://prnt.sc/Ana0Qc1AtFRM

โœ… After patch:
Backend: โ€‹https://prnt.sc/-GxIVqwRlrIc
Frontend: โ€‹https://prnt.sc/FkOQGNCImVpY

โœ… Patch is working well as per desire solution

#5 in reply to: โ†‘ย 4 @SirLouen
6 months ago

Replying to darshitrajyaguru97:

Test Report

Patch tested: https://core.trac.wordpress.org/attachment/ticket/63331/63331.patch

This is not the patch to test ๐Ÿคฆโ€โ™‚๏ธ
There is โ€‹a more recent version that addresses this concern

#6 @SirLouen
6 months ago

  • Keywords dev-feedback has-test-info has-screenshots added; needs-testing removed

Test Report

Description

โœ… This report validates that the indicated patch works as expected.

Patch tested: โ€‹https://github.com/WordPress/wordpress-develop/pull/8996.diff

Environment

  • WordPress: 6.9-alpha-60093-src
  • PHP: 8.2.28
  • Server: nginx/1.27.5
  • Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
  • Browser: Chrome 137.0.0.0
  • OS: Windows 10/11
  • Theme: Twenty Nineteen 3.1
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.0

Testing Instructions

  1. Add the calendar block to 2019 theme
  2. Check the font in the frontend and editor
  3. ๐Ÿž Font differ

Expected Results

  1. Both fonts are identical

Actual Results

  1. โœ… Issue resolved with patch.

Supplemental Artifacts

Before patch

https://i.imgur.com/iUixuUC.png

After patch

https://i.imgur.com/ds8ilsv.png

Note: See TracTickets for help on using tickets.