Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/block/heading/deprecated.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,21 @@ import {
*/
import { addFilter } from '@wordpress/hooks'

// Version 3.13.9 Deprecations
addFilter( 'stackable.heading.save.blockClassNames', 'stackable/3.13.9', ( output, props ) => {
if ( compareVersions( props.version, '3.13.9' ) >= 0 ) { // Current version is greater than or equal to 3.13.9
return output
}

const responsiveClass = getResponsiveClasses( props.attributes )
return [
props.className,
'stk-block-heading',
responsiveClass,
'stk-block-heading--v2',
]
} )

// Version 3.6.1 Deprecations
addFilter( 'stackable.heading.save.blockClassNames', 'stackable/3.6.1', ( output, props ) => {
if ( compareVersions( props.version, '3.6.1' ) === 1 ) { // Current version is greater than 3.6.1
Expand Down
2 changes: 1 addition & 1 deletion src/block/heading/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const Edit = props => {
const blockClassNames = classnames( [
className,
'stk-block-heading',
'stk-block-heading--v2',
'stk-block-heading--v3',
] )

const textClassNames = classnames( [
Expand Down
2 changes: 1 addition & 1 deletion src/block/heading/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const Save = props => {
className,
'stk-block-heading',
responsiveClass,
'stk-block-heading--v2',
'stk-block-heading--v3',
], props ) )

const textClassNames = classnames( [
Expand Down
7 changes: 7 additions & 0 deletions src/block/heading/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,10 @@
margin: 0 !important;
}
}

.stk-block-heading--v3 {
.stk-block-heading__text:not(.stk-block-heading--use-theme-margins) {
margin-top: 0 !important;
margin-bottom: 0 !important;
}
}
Loading