Make WordPress Core

Opened 4 weeks ago

Closed 3 weeks ago

Last modified 3 weeks ago

#61630 closed defect (bug) (fixed)

Elements: Maintain backwards compatibility by avoiding specificity bump for top-level element-only selectors

Reported by: aaronrobertshaw's profile aaronrobertshaw Owned by: noisysocks's profile noisysocks
Milestone: Priority: high
Severity: normal Version: 6.6
Component: Editor Keywords: gutenberg-merge has-patch has-unit-tests
Focuses: Cc:

Description

When CSS specificity was capped at 0-1-0 for global styles via https://core.trac.wordpress.org/ticket/61165 it resulted in top-level element styles in some case having their specificity raised from 0-0-1.

This can be avoided and greater backwards compatibility maintained.

More info on the issue this causes can be found in:

This ticket tracks the syncing of PHP changes for the fix contained in:

Change History (13)

This ticket was mentioned in PR #7012 on WordPress/wordpress-develop by @aaronrobertshaw.


4 weeks ago
#1

  • Keywords has-patch has-unit-tests added

This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.


3 weeks ago

#4 @hellofromTonya
3 weeks ago

  • Priority changed from normal to high

Elevating the priority to high for better tracking, as this issue is one of the drivers for a faster 6.6.1.

Testing has been happening on #61660 with good confirmation it resolves that issue.

@noisysocks commented on PR #7012:


3 weeks ago
#5

Applied the diff of this PR to the 6.6 branch and followed the testing instructions. Looks ok 👍

#6 @noisysocks
3 weeks ago

  • Owner set to noisysocks
  • Resolution set to fixed
  • Status changed from new to closed

In 58749:

Block Themes: Avoid specificity bump for top-level element-only selectors

Prevent issues (e.g. links being underlined) caused by a bump in CSS
specificity for top-level element-only global element styles.

Backports the PHP changes from https://github.com/WordPress/gutenberg/pull/63403.

Fixes #61630.
Fixes #61660.
Props aaronrobertshaw, andrewserong, noisysocks.

#7 @ellatrix
3 weeks ago

  • Keywords dev-feedback added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for backporting to the 6.6 branch.

#8 @noisysocks
3 weeks ago

  • Milestone 6.6.1 deleted
  • Resolution set to duplicate
  • Status changed from reopened to closed

Confusing that there's two tickets. Let's close this as a dupe of #61660 which has more comments.

@noisysocks commented on PR #7012:


3 weeks ago
#9

Committed in r58749.

#10 @ellatrix
3 weeks ago

  • Keywords dev-feedback removed

#11 @hellofromTonya
3 weeks ago

  • Resolution changed from duplicate to fixed

In 58751:

Block Themes: Avoid specificity bump for top-level element-only selectors.

Prevent issues (e.g. links being underlined) caused by a bump in CSS specificity for top-level element-only global element styles.

Ref: PHP changes from https://github.com/WordPress/gutenberg/pull/63403.

Reviewed by hellofromTonya.
Merges [58749] to the 6.6 branch.

Props aaronrobertshaw, andrewserong, noisysocks, annubis, butterflymedia, clarktbt, hellofromTonya, jorbin, joedolson, swissspidy, courane01, raquelandefeld, talldanwp, markhowellsmead, youknowriad, poena, cbirdsong.
Fixes #61630, #61660.

Note: See TracTickets for help on using tickets.