Skip to content

Commit

Permalink
add width inherit when max content width is set
Browse files Browse the repository at this point in the history
  • Loading branch information
mxkae committed Jun 14, 2023
1 parent d48ad7a commit 21a5b17
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
14 changes: 14 additions & 0 deletions src/block-components/helpers/size/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,20 @@ const Styles = props => {
responsive="all"
hasUnits="px"
/>
<BlockCss
{ ...propsToPass }
selector={ wrapperSelector || selector }
styleRule="width"
attrName="width"
key="width"
attrNameTemplate={ attrNameTemplate }
responsive="all"
hasUnits="px"
valueCallback={ ( value, getAttribute ) => {
const blockWidth = getAttribute( 'width' )
return blockWidth ? 'inherit' : ''
} }
/>
<BlockCss
{ ...propsToPass }
selector={ wrapperSelector || selector }
Expand Down
4 changes: 0 additions & 4 deletions src/block/columns/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
max-width: none;
}

.stk-inner-blocks > .stk-block {
width: inherit;
}

.stk-block-columns > .stk-block-content {
--stk-column-gap: 0px; // For nested columns, this takes precedence.
column-gap: var(--stk-column-gap, 0px);
Expand Down

0 comments on commit 21a5b17

Please sign in to comment.