File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
src/block-components/column Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -43,9 +43,6 @@ const getStyleParams = ( options = {} ) => {
4343 format : '%s%' ,
4444 dependencies : [ 'columnAdjacentCount' ] ,
4545 valueCallback : ( value , getAttribute , device ) => {
46- if ( device === 'desktop' ) {
47- return value
48- }
4946 const adjacentCount = getAttribute ( 'columnAdjacentCount' , device )
5047 if ( adjacentCount ) {
5148 return value . replace ( / ( [ \d \. ] + % ) $ / , `calc($1 - var(--stk-column-gap, 0px) * ${ adjacentCount - 1 } / ${ adjacentCount } )` )
@@ -73,10 +70,6 @@ const getStyleParams = ( options = {} ) => {
7370 // No need to do this in the editor since it already does this.
7471 const value = device === 'desktop' ? _value : _value . replace ( / ^ 1 1 / , '0 1' )
7572
76- if ( device === 'desktop' ) {
77- return value
78- }
79-
8073 const adjacentCount = getAttribute ( 'columnAdjacentCount' , device )
8174 if ( adjacentCount ) {
8275 return value . replace ( / ( [ \d \. ] + % ) $ / , `calc($1 - var(--stk-column-gap, 0px) * ${ adjacentCount - 1 } / ${ adjacentCount } )` )
Original file line number Diff line number Diff line change @@ -21,7 +21,10 @@ export const useColumn = () => {
2121 if ( adjacentBlocks . length ) {
2222 widths . forEach ( ( width , i ) => {
2323 // TODO: When Gutenberg 10.1 comes out, update this to just one updateBlockAttributes call for all client Ids
24- updateBlockAttributes ( adjacentBlocks [ i ] . clientId , { columnWidth : width } )
24+ updateBlockAttributes ( adjacentBlocks [ i ] . clientId , {
25+ columnWidth : width ,
26+ columnAdjacentCount : widths . length ,
27+ } )
2528 } )
2629 }
2730 } ,
You can’t perform that action at this time.
0 commit comments