Make WordPress Core

Opened 5 months ago

Closed 4 months ago

Last modified 4 months ago

#61697 closed defect (bug) (fixed)

Twenty Thirteen: Code block does not adjust font size with block settings

Reported by: viralsampat's profile viralsampat Owned by: karmatosed's profile karmatosed
Milestone: 6.7 Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: has-patch commit
Focuses: css Cc:

Description

Hello Team,

I have reviewed "code" block on the twenty thirteen theme and found that the "typography" is not working when we trying to change.

Here, I have provided its video and screenshot:

I think that it should be change based on selection.

Thanks,

Attachments (4)

Screen Recording 2024-07-18 at 10.50.20 PM.mp4 (1.2 MB) - added by viralsampat 5 months ago.
Issue video:
code-block-editor-side.png (163.6 KB) - added by viralsampat 5 months ago.
Issue back-end screenshot:
code-block-front-end-side.png (226.5 KB) - added by viralsampat 5 months ago.
Issue front-end screenshot:
61697.diff (812 bytes) - added by sabernhardt 5 months ago.
inherits font size when code is inside pre element (the default is 14 pixels for each individual element)

Download all attachments as: .zip

Change History (10)

@viralsampat
5 months ago

Issue back-end screenshot:

@viralsampat
5 months ago

Issue front-end screenshot:

@sabernhardt
5 months ago

inherits font size when code is inside pre element (the default is 14 pixels for each individual element)

#1 @sabernhardt
5 months ago

  • Keywords dev-feedback removed
  • Milestone changed from Awaiting Review to Future Release
  • Summary changed from Twenty Thirteen Theme: The code block typography is not working properly on editor & front end sides. to Twenty Thirteen: Code block does not adjust font size with block settings

Twenty Thirteen sets 14-pixel font size for both pre and code, so 61697.diff proposes inheriting when the code element is nested inside a pre tag.

That seems cleaner than editing the block-specific styles to inherit the block's size only when either its class or style attribute contains font-size.

#2 @sabernhardt
5 months ago

  • Version 6.6 deleted

Related: #61753

#3 @karmatosed
4 months ago

  • Milestone changed from Future Release to 6.7
  • Owner set to karmatosed
  • Status changed from new to assigned

Assigning to myself for testing with possibly committing if that works out.

#4 @karmatosed
4 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 58815:

Twenty Thirteen: Fixes Code block not adjusting to font size changes.

This resolves the Code block not changing when the font sizes are switched. This theme uses a 14 px size for both and this uses inherit when nested inside pre tag.

Props viralsampat, sabernhardt.
Fixes #61697.

#5 @karmatosed
4 months ago

  • Keywords commit added

#6 @karmatosed
4 months ago

  • Keywords needs-testing removed
Note: See TracTickets for help on using tickets.