Skip to content

Commit 73ce320

Browse files
authored
fix (carousel block): add fix for content width wide (#3628)
1 parent d6454ed commit 73ce320

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/styles/block.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@
6767
}
6868
@include desktop-tablet {
6969
.stk-block:is(.aligncenter, .alignwide, .alignfull) > .stk-content-align.alignwide,
70+
// Dev note: add selector for carousel because it has an extra wrapper before the inner blocks.
71+
.stk-block-carousel:is(.aligncenter, .alignwide, .alignfull) > :where(.stk-block-carousel__content-wrapper) > .stk-content-align.alignwide,
7072
.stk-block .stk-block.alignwide {
7173
// --stk-block-default-width is a Stackable setting
7274
// --stk-block-width-default-detected is from the fallback autodetected value.

src/styles/editor-block.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@
113113
}
114114

115115
:where(:is(.stk-preview-device-desktop, .stk-preview-device-tablet) [data-type^="stackable/"]:is([data-align="wide"], [data-align="full"]) > .stk-block > .stk-inner-blocks.alignwide),
116-
:where(:is(.stk-preview-device-desktop, .stk-preview-device-tablet) [data-type^="stackable/"]:is([data-align="wide"], [data-align="full"]) [data-type^="stackable/"][data-align="wide"]) {
116+
:where(:is(.stk-preview-device-desktop, .stk-preview-device-tablet) [data-type^="stackable/"]:is([data-align="wide"], [data-align="full"]) [data-type^="stackable/"][data-align="wide"]),
117+
:where(:is(.stk-preview-device-desktop, .stk-preview-device-tablet) [data-type^="stackable/"]:is([data-align="wide"], [data-align="full"]) > .stk-block-carousel > :where(.stk-block-carousel__content-wrapper) > .stk-inner-blocks.alignwide) {
117118
// --stk-block-default-width is a Stackable setting
118119
// --stk-block-width-default-detected is from the fallback autodetected value.
119120
max-width: var(--stk-block-wide-width, var(--stk-block-width-wide-detected, calc(80vw - 280px))) !important; // Make way for the inspector

0 commit comments

Comments
 (0)