feat (theme-compatibility): features can now inherit theme styles. - #3052
feat (theme-compatibility): features can now inherit theme styles.#3052prconcepcion wants to merge 14 commits into
Conversation
🤖 Pull request artifacts
|
|
Size Change: +1.04 kB (0%) Total Size: 1.99 MB
ℹ️ View Unchanged
|
bfintal
left a comment
There was a problem hiding this comment.
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-imageto 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.
| 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.
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): |
|
Closing as superseded by #3490 (theme.json block style inheritance). Buttons now inherit styles from block themes via the existing “Inherit Block Styles from theme.json” setting, so this older Deleting the |
fixes #3035
fixes #2354
fixes #3057
fixes #3150