Make WordPress Core

Opened 6 months ago

Closed 4 months ago

#65107 closed defect (bug) (fixed)

Twenty Sixteen: italics lost in 'blockquote cite'

Reported by: gaelbonithon Owned by: SergeyBiryukov
Priority: normal Milestone: 7.1
Component: Bundled Theme Version: 4.4
Severity: normal Keywords: has-patch 2nd-opinion
Cc: Focuses: css

Description

Whether you use italics or not in blockquote cite, the result is the same, both in the editor and in the final output. There should be a difference, one way or another (italics or regular text, depending on the overall font style).

Change History (7)

This ticket was mentioned in ​PR #11622 on ​WordPress/wordpress-develop by ​Tamaranch.


6 months ago
#1

  • Keywords has-patch added

This is a way to fix the bug mentioned below. Note that the change for the editor doesn't seem to be enough: italics aren't being applied for me, unlike in the final result. That said, I suppose this change needs to be made regardless.

Trac ticket: https://core.trac.wordpress.org/ticket/65107

## Use of AI Tools

#2 @westonruter
6 months ago

  • Component Themes → Bundled Theme
  • Focuses css added

#3 @manhar
6 months ago

Tested and patch is working as expected.

Refer the below image:

Before Patch:
​https://postimg.cc/XpfbjS1n

After Patch:
​https://postimg.cc/NKFpNRHZ

#4 follow-up: @sabernhardt
6 months ago

  • Keywords 2nd-opinion added
  • Version trunk → 4.4

Hi and welcome to WordPress Core Trac!

The theme's initial commit used font-style: normal in ​front-end and ​editor styles to reverse the italics of the blockquote in em and cite elements. The default styling should remain as it has been for ten years.

In 2018, Twenty Sixteen styles for the block editor reinforced the normal font-style within the ​Quote block.

The theme probably could add italics again for em elements within citations.

blockquote :where(cite) em {
	font-style: italic;
}

and in editor-blocks.css

.wp-block-quote__citation em {
	font-style: italic;
}

The additional style would be inappropriate for anyone who made the citations italic, but using :where() to match the specificity should reduce the possibility of unexpected changes.

#5 in reply to: ↑ 4 @gaelbonithon
6 months ago

Replying to sabernhardt:

Hi and welcome to WordPress Core Trac!

The theme's initial commit used font-style: normal in ​front-end and ​editor styles to reverse the italics of the blockquote in em and cite elements. The default styling should remain as it has been for ten years.

In 2018, Twenty Sixteen styles for the block editor reinforced the normal font-style within the ​Quote block.

The theme probably could add italics again for em elements within citations.

blockquote :where(cite) em {
	font-style: italic;
}

and in editor-blocks.css

.wp-block-quote__citation em {
	font-style: italic;
}

The additional style would be inappropriate for anyone who made the citations italic, but using :where() to match the specificity should reduce the possibility of unexpected changes.

Thank you, patch updated.

#6 @poena
5 months ago

  • Milestone Awaiting Review → 7.1

I was not able to apply the patch cleanly, but the actual change works well and I think this is a good solution.

#7 @SergeyBiryukov
4 months ago

  • Owner set to SergeyBiryukov
  • Resolution → fixed
  • Status new → closed

In 62432:

Twenty Sixteen: Correct display of italics in citations.

Props gaelbonithon, sabernhardt, poena, manhar, westonruter, SergeyBiryukov.
Fixes #65107.

Note: See TracTickets for help on using tickets.