Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#61630 closed defect (bug) (fixed)

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

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

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.


2 years ago
#1

  • Keywords has-patch has-unit-tests added

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


2 years ago

#4 @hellofromTonya
2 years ago

  • Priority normalhigh

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:


2 years ago
#5

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

#6 @noisysocks
2 years ago

  • Owner set to noisysocks
  • Resolutionfixed
  • Status newclosed

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
2 years ago

  • Keywords dev-feedback added
  • Resolution fixed
  • Status closedreopened

Reopening for backporting to the 6.6 branch.

#8 @noisysocks
2 years ago

  • Milestone 6.6.1
  • Resolutionduplicate
  • Status reopenedclosed

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

@noisysocks commented on PR #7012:


2 years ago
#9

Committed in r58749.

#10 @ellatrix
2 years ago

  • Keywords dev-feedback removed

#11 @hellofromTonya
2 years ago

  • Resolution duplicatefixed

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.