diff --git a/src/block/button/deprecated.js b/src/block/button/deprecated.js
index e7b1f9feb..d921ffded 100644
--- a/src/block/button/deprecated.js
+++ b/src/block/button/deprecated.js
@@ -2,11 +2,47 @@ import { Save } from './save'
import { attributes } from './schema'
import { withVersion } from '~stackable/higher-order'
+import { semverCompare } from '~stackable/util'
import {
+ BlockDiv, CustomCSS, Button, Typography,
deprecateBlockBackgroundColorOpacity, deprecateButtonGradientColor,
deprecateContainerBackgroundColorOpacity, deprecateShadowColor,
deprecateContainerShadowColor, deprecateBlockShadowColor,
} from '~stackable/block-components'
+import { addFilter } from '@wordpress/hooks'
+import { useBlockProps } from '@wordpress/block-editor'
+
+// If button style is link, change BlockDiv tag from
to
to inherit theme link styles.
+addFilter( 'stackable.button.save.blockDiv.content', 'stackable/inheritThemeLinkStyles', ( output, props, propsToPass, blockClassNames, customAttributes, typographyInnerClassNames ) => {
+ if ( semverCompare( props.version, '<', '3.13.11' ) ) {
+ return (
+
+ { props.attributes.generatedCss && }
+
+
+
+
+
+ )
+ }
+ return output
+} )
const deprecated = [
{
diff --git a/src/block/button/edit.js b/src/block/button/edit.js
index 56127cdb5..1be3a4815 100644
--- a/src/block/button/edit.js
+++ b/src/block/button/edit.js
@@ -98,6 +98,7 @@ const Edit = props => {
attributes={ props.attributes }
className={ blockClassNames }
applyCustomAttributes={ false }
+ blockTag={ blockStyle === 'link' ? 'p' : null }
>
)
diff --git a/src/block/icon-list-item/style.scss b/src/block/icon-list-item/style.scss
index 343681dbb..99ee158a9 100644
--- a/src/block/icon-list-item/style.scss
+++ b/src/block/icon-list-item/style.scss
@@ -1,6 +1,12 @@
.stk-block-icon-list-item {
list-style-type: none !important;
+
+ .stk-block-icon-list-item__text {
+ margin-block: 0;
+ margin: 0;
+ }
}
+
.stk-block-icon-list.stk-block {
.wp-block-stackable-icon-list-item:not(:last-child)::after {
content: "" !important;
diff --git a/src/block/table-of-contents/deprecated.js b/src/block/table-of-contents/deprecated.js
index 1aa3cccf6..4c7861a37 100644
--- a/src/block/table-of-contents/deprecated.js
+++ b/src/block/table-of-contents/deprecated.js
@@ -8,6 +8,7 @@ import { Save } from './save'
* External dependencies
*/
import { withVersion } from '~stackable/higher-order'
+import { semverCompare } from '~stackable/util'
import compareVersions from 'compare-versions'
import {
deprecateBlockBackgroundColorOpacity, deprecateContainerBackgroundColorOpacity, deprecateTypographyGradientColor,
@@ -19,6 +20,14 @@ import {
*/
import { addFilter } from '@wordpress/hooks'
+addFilter( 'stackable.table-of-contents.save.blockClasses', 'stackable/inheritThemeLinkStyles', ( output, textClasses, props ) => {
+ if ( semverCompare( props.version, '<', '3.13.11' ) ) {
+ return output.filter( className => className !== 'entry-content' )
+ }
+
+ return output
+} )
+
addFilter( 'stackable.table-of-contents.save.blockClasses', 'stackable/classesNotRendered', ( output, textClasses, props ) => {
if ( compareVersions( props.version, '3.6.2' ) === 0 ) {
output.push( textClasses )
diff --git a/src/block/table-of-contents/save.js b/src/block/table-of-contents/save.js
index 1fecb6c65..5967b33aa 100644
--- a/src/block/table-of-contents/save.js
+++ b/src/block/table-of-contents/save.js
@@ -42,6 +42,7 @@ export const Save = props => {
const blockClassNames = classnames( applyFilters( 'stackable.table-of-contents.save.blockClasses', [
className,
'stk-block-table-of-contents',
+ 'entry-content', // add this class to inherit theme link styles
blockAlignmentClass,
responsiveClass,
], textClasses, props ) )