Skip to content

Commit

Permalink
off canvas padding defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
kadencewp committed Sep 3, 2024
1 parent b725150 commit 88887b1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/blocks/header/children/off-canvas/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
},
"padding": {
"type": "array",
"default": ["md", "md", "md", "md"]
"default": ["", "", "", ""]
},
"paddingTablet": {
"type": "array",
Expand Down
2 changes: 1 addition & 1 deletion src/blocks/header/children/off-canvas/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ export function Edit(props) {
unit={paddingUnit}
units={['px', 'em', 'rem', '%', 'vh']}
onUnit={(value) => setAttributes({ paddingUnit: value })}
allowAuto={true}
deskDefault={['md', 'md', 'md', 'md']}
/>
</KadencePanelBody>
<KadencePanelBody title={__('Close Trigger Spacing', 'kadence-blocks')} initialOpen={false}>
Expand Down
4 changes: 4 additions & 0 deletions src/blocks/header/children/off-canvas/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
display: flex;
flex-direction: column;
box-sizing: border-box;
padding-top: var(--kb-nav-canvas-padding-top, var(--global-kb-spacing-md, 2rem));
padding-right: var(--kb-nav-canvas-padding-right, var(--global-kb-spacing-md, 2rem));
padding-bottom: var(--kb-nav-canvas-padding-bottom, var(--global-kb-spacing-md, 2rem));
padding-left: var(--kb-nav-canvas-padding-left, var(--global-kb-spacing-md, 2rem));

.kt-close-position-inside {
position: relative;
Expand Down
4 changes: 4 additions & 0 deletions src/blocks/header/children/off-canvas/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ $admin-bar-height-mobile: 46px;
display: flex;
flex-direction: column;
box-sizing: border-box;
padding-top: var(--kb-nav-canvas-padding-top, var(--global-kb-spacing-md, 2rem));
padding-right: var(--kb-nav-canvas-padding-right, var(--global-kb-spacing-md, 2rem));
padding-bottom: var(--kb-nav-canvas-padding-bottom, var(--global-kb-spacing-md, 2rem));
padding-left: var(--kb-nav-canvas-padding-left, var(--global-kb-spacing-md, 2rem));
}
&.show-off-canvas {
display: block;
Expand Down

0 comments on commit 88887b1

Please sign in to comment.