-
Notifications
You must be signed in to change notification settings - Fork 62
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
feat (theme-compatibility): features can now inherit theme styles. #3052
base: develop
Are you sure you want to change the base?
Conversation
🤖 Pull request artifacts
|
Size Change: +1.04 kB (0%) Total Size: 1.99 MB
ℹ️ View Unchanged
|
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.
Since we now have 2 inheritance options, please create 2 options instead of 1: 1 for inheriting button styles and 1 for inheriting image captions
For the image captions, you'll also need to add the following changes:
- add the class
wp-block-image
to the image - out figcaption margins are currently overriding the inherited figcation styles, use
.stk-block-image .stk-img-figcaption:not(.wp-element-caption)
on our figcaption css to prevent overriding.
src/block-components/button/index.js
Outdated
@@ -33,7 +34,7 @@ export const Button = props => { | |||
|
|||
return ( | |||
<Link | |||
className={ classnames( [ className, getButtonClasses( attributes ) ] ) } | |||
className={ classnames( [ className, getButtonClasses( attributes ), settings.stackable_inherit_styles_from_theme && 'wp-element-button' ] ) } |
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.
This looks hard to read, split off to:
const linkClassnames = classnames( [
className,
getButtonClasses( attributes ),
{ 'wp-element-button': settings.stackable_inherit_styles_from_theme }
] )
Added comment from Discord (02/16/2024): |
fixes #3035
fixes #2354
fixes #3057
fixes #3150