-
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
Support enabling custom link color from theme.json #25148
Conversation
@@ -129,7 +129,8 @@ | |||
"dropCap": true | |||
}, | |||
"color": { | |||
"custom": true | |||
"custom": true, | |||
"link": false |
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.
maybe there's a better path here?
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.
I'm happy to approve as it is. In its current shape, the other option I can think of is making link a top-level element of features
, which doesn't feel great either.
I also wonder if we should do a follow-up PR when we revisit/consolidate the features
shape before releasing Gutenberg 9.0. I believe is the first release we include this feature and it'll be good to avoid changing shape later. Left some comments at #20588 (comment)
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.
We definitely need a follow-up PR to reshape the paths. That said, I'm not sure if it's before or after Gutenberg 9.0. The important thing is to do it before we make theme.json stable.
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.
It's not the first release for these things, 8.9 include one or two features and dropCap is there for a long time.
Size Change: -8 B (0%) Total Size: 1.2 MB
ℹ️ View Unchanged
|
}, | ||
[] | ||
); | ||
const isLinkColorEnabled = useEditorFeature( 'color.link' ); |
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.
I really like how the useEditorFeature
simplifies the code. Can't wait to see the same done for presets.
Related #20588
Similar to #24761 but for link color.
The idea of this PR is to support disabling/enabling link color support from theme.json.
Testing instructions
link.color
path.