-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duotone: Make it possible to define duotone settings in theme.json #34073
Changes from all commits
db3b192
d2813c7
331e7e4
3685c25
2ff3e0f
9c5d970
660a1e2
7632db4
3bb578d
b95ebb6
4a3011b
fbc6daf
d0ffc54
20e0f2c
7d0a0f2
0ba9fd0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,13 +16,13 @@ | |
*/ | ||
function gutenberg_experimental_global_styles_get_stylesheet( $tree, $type = 'all' ) { | ||
// Check if we can use cached. | ||
$can_use_cached = ( | ||
$can_use_cached = false; /*( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is just for testing |
||
( 'all' === $type ) && | ||
( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) && | ||
( ! defined( 'SCRIPT_DEBUG' ) || ! SCRIPT_DEBUG ) && | ||
( ! defined( 'REST_REQUEST' ) || ! REST_REQUEST ) && | ||
! is_admin() | ||
); | ||
);*/ | ||
|
||
if ( $can_use_cached ) { | ||
// Check if we have the styles already cached. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,7 +84,8 @@ | |
}, | ||
"__experimentalBorder": { | ||
"radius": true | ||
} | ||
}, | ||
"__experimentalSelector": ".wp-block-image img" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if this is a good idea? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do the other block supports still work? If they don't, we'd need to implement "selectors per property" first, which we talked about at #28913 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the only one that would be affected would be border radius, which seems to still work fine. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is problematic. These are the testing steps:
I expected the image to change the border but it didn't. The theme style rule has higher specificity than the block's. The border-radius rules were added in https://github.com/WordPress/gutenberg/pull/27667/files#r699061648 I'm going to pull @aaronrobertshaw thoughts on this. I'd think the fix for this would be to serialize the border-radius directly to the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the ping.
In fact, there is already an open PR that does this as part of adopting border color and width for the image block. |
||
}, | ||
"styles": [ | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Github is confused. None of this code is new, it's just broken into smaller functions.