Make WordPress Core

Opened 21 months ago

Last modified 34 minutes ago

#62744 new enhancement

Twenty Seventeen: Quote block Appearance settings do not affect citation

Reported by: nidhidhandhukiya Owned by:
Priority: normal Milestone: Awaiting Review
Component: Bundled Theme Version:
Severity: normal Keywords: needs-testing
Cc: Focuses: css

Description

Steps to reproduce the issue :-

  1. Activate Twenty Seventeen theme.
  2. Choose Quote block.
  3. Add some text and citation.
  4. Now change the font family from appearance.

Yu can able to see that your applied font family only works for the text and not for the citation text both the side editor and front.

Attachments (2)

62744.patch (913 bytes ) - added by nidhidhandhukiya 21 months ago.
62744.2.patch (951 bytes ) - added by nidhidhandhukiya 20 months ago.
Hello @sabernhardt I have updated the patch as per your suggestion.

Download all attachments as: .zip

Change History (6)

#1 @sainathpoojary
21 months ago

Hey @nidhidhandhukiya,

I was able to reproduce the issue by following the steps provided. However, I believe this might be the expected behavior, as similar styling can be observed in other themes. Additionally, the font weight for citations often differs from that of quotes.

That said, I do agree that having a control to customize the font weight of citations would be a useful addition.

Video: https://utfs.io/f/PL8E4NiPUWyORiCprmdTu5OnjW2XKY0IRv1P9lgoTaLbV4qy

#2 @sabernhardt
21 months ago

  • Focuses css added
  • Keywords 2nd-opinion added
  • Summary Twenty Seventeen - Quote block appearance not work for ciation.Twenty Seventeen: Quote block Appearance settings do not affect citation
  • Type defect (bug)enhancement
  • Version 6.7.1

62744.patch would change the styles for every Quote block that does not assign a special font-weight and/or font-style in Appearance settings. It even would change styles for sites that do not use the block editor at all.

Someone who has assigned a different Appearance on the Quote block might have intended to apply that style to the inner Paragraph only. (The custom style is currently the same whether it is set on the Quote block or its inner Paragraph block.)

If someone assigns an Appearance setting on both the Quote block and an inner block, that could indicate a desire to change the citation style. The following is quite complex but possibly worth trying:

:root :where(.wp-block-quote[style*="font-weight"] *[style*="font-weight"]) ~ cite {
	font-weight: inherit;
}
:root :where(.wp-block-quote[style*="font-style"] *[style*="font-style"]) ~ cite {
	font-style: inherit;
}

@nidhidhandhukiya
20 months ago

Hello @sabernhardt I have updated the patch as per your suggestion.

#3 @karmatosed
5 hours ago

  • Keywords needs-testing added; 2nd-opinion removed

#4 @sainathpoojary
34 minutes ago

Test Report

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

Environment

  • WordPress: 7.2-alpha-63166-src
  • Subdirectory: No
  • PHP: 8.3.33
  • Server: nginx/1.31.5
  • Database: mysqli (Server: 9.7.2 / Client: mysqlnd 8.3.33)
  • Browser: Chrome 153.0.0.0
  • OS: macOS
  • Theme: Twenty Seventeen 4.2
  • MU Plugins: None
  • Plugins:
    • Test Reports 1.3.1

Steps taken

  1. Apply the patch 62744.2.patch.
  2. Activate the Twenty Seventeen theme.
  3. Add a Quote block with text and a citation in the editor.
  4. Apply font family / appearance settings to the Quote block.
  5. Check the citation's appearance in both the editor and front-end.
  6. ❌ Patch is failing

Expected result

  • Changing the Quote block appearance settings should correctly update and apply to the citation text as well.

Actual result

  • The patch did not resolve the issue. The appearance settings still do not affect the citation text in the editor or front-end.

Screencast with results

https://rioudcpuyg.ufs.sh/f/PL8E4NiPUWyOGxMcc5NEeschquBM6yNU3LCFxWSw4rTfmliR

Note: See TracTickets for help on using tickets.