| 1 |
/** |
| 2 |
* Slider block editor-only styles. |
| 3 |
* These only load inside the WordPress block editor. |
| 4 |
*/ |
| 5 |
|
| 6 |
.sliderberg-editor-wrapper { |
| 7 |
.sliderberg-swiper-wrap { |
| 8 |
position: relative; |
| 9 |
width: 100%; |
| 10 |
} |
| 11 |
|
| 12 |
.sliderberg-swiper-editor { |
| 13 |
position: relative; |
| 14 |
width: 100%; |
| 15 |
} |
| 16 |
|
| 17 |
// Slides in editor |
| 18 |
.swiper-slide { |
| 19 |
min-height: var(--sliderberg-min-height, 400px); |
| 20 |
height: auto; |
| 21 |
|
| 22 |
// Ensure inner blocks are interactive in editor |
| 23 |
> * { |
| 24 |
pointer-events: all; |
| 25 |
} |
| 26 |
} |
| 27 |
|
| 28 |
// Vertical mode: rotate arrow icons |
| 29 |
&.sliderberg-vertical { |
| 30 |
.swiper-button-prev::after, |
| 31 |
.swiper-button-next::after { |
| 32 |
transform: rotate(90deg); |
| 33 |
} |
| 34 |
} |
| 35 |
|
| 36 |
// Visual hint: show a subtle border around slides in editor for clarity |
| 37 |
.sliderberg-slide-editor { |
| 38 |
outline: 1px dashed rgba(0, 0, 0, 0.1); |
| 39 |
outline-offset: -1px; |
| 40 |
transition: outline-color 0.15s ease; |
| 41 |
|
| 42 |
&.is-selected, |
| 43 |
&:focus-within { |
| 44 |
outline-color: var(--wp-admin-theme-color, #007cba); |
| 45 |
outline-style: solid; |
| 46 |
} |
| 47 |
} |
| 48 |
} |
| 49 |
|
| 50 |
// --- Layout chooser (shown before a mode is picked) --- |
| 51 |
.sliderberg-layout-chooser { |
| 52 |
display: flex; |
| 53 |
gap: 12px; |
| 54 |
width: 100%; |
| 55 |
|
| 56 |
&__option { |
| 57 |
flex: 1; |
| 58 |
display: flex !important; |
| 59 |
flex-direction: column; |
| 60 |
align-items: center; |
| 61 |
gap: 4px; |
| 62 |
height: auto !important; |
| 63 |
padding: 20px 16px !important; |
| 64 |
border: 1px solid #ddd; |
| 65 |
border-radius: 4px; |
| 66 |
// Override the tertiary Button's default link-blue with a neutral color. |
| 67 |
color: #1e1e1e; |
| 68 |
|
| 69 |
&:hover, |
| 70 |
&:focus { |
| 71 |
border-color: var(--wp-admin-theme-color, #007cba); |
| 72 |
} |
| 73 |
} |
| 74 |
|
| 75 |
&__title { |
| 76 |
font-weight: 600; |
| 77 |
color: #1e1e1e; |
| 78 |
} |
| 79 |
|
| 80 |
&__description { |
| 81 |
font-size: 12px; |
| 82 |
color: #757575; |
| 83 |
} |
| 84 |
} |
| 85 |
|
| 86 |
.sliderberg-layout-chooser__hint { |
| 87 |
margin-top: 12px; |
| 88 |
margin-bottom: 0; |
| 89 |
font-size: 12px; |
| 90 |
color: #757575; |
| 91 |
text-align: center; |
| 92 |
} |
| 93 |
|