#60312 closed enhancement (fixed)
Reduce specificity of block style variation selectors
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.5 | Priority: | normal |
Severity: | normal | Version: | 6.5 |
Component: | Editor | Keywords: | gutenberg-merge has-patch |
Focuses: | Cc: |
Description
Syncs https://github.com/WordPress/gutenberg/pull/57659 from Gutenberg. Reduces the specificity of the generated selectors for block style variations in WP_Theme_JSON
class.
Change History (6)
This ticket was mentioned in PR #5917 on WordPress/wordpress-develop by @isabel_brison.
17 months ago
#1
- Keywords has-patch added
@isabel_brison commented on PR #5917:
17 months ago
#2
Thanks for the reviews folks!
I'm curious why the chaining was initially implemented here and if this risks introducing a style regression that this was meant to fix
Initially the chaining was meant to override some overly-specific block library styles. These have been progressively reduced in specificity, and the Button one that is changed in the Gutenberg PR was the last remaining style requiring the chaining. With that change, we're safe to remove the chaining too.
@mukesh27 commented on PR #5917:
17 months ago
#3
The code looks fine, but I'm curious why the chaining was initially implemented here and if this risks introducing a style regression that this was meant to fix?
If someone override similar CSS selector in CSS file previously then it will not affect previously but after these changes it will get affected.
@get_dave commented on PR #5917:
17 months ago
#4
Note for release PHP syncing purposes we should delay committing this as per this comment.
#5
@
17 months ago
- Owner set to isabel_brison
- Resolution set to fixed
- Status changed from new to closed
In 57490:
@isabel_brison commented on PR #5917:
17 months ago
#6
Committed in r57490.
Trac ticket: https://core.trac.wordpress.org/ticket/60312
Syncs https://github.com/WordPress/gutenberg/pull/57659. This change will only be fully testable in core once the npm packages are updated, given that there's a matching specificity reduction in block library styles. Without that package update, core styles for the Button block may override some of its variation styles.