deprecated
3 months ago
GenerateBgImage.js
3 months ago
block.json
3 months ago
edit.js
2 weeks ago
icon.svg
3 months ago
index.js
3 months ago
index.php
3 months ago
save.js
3 months ago
style.scss
1 week ago
style.scss
162 lines
| 1 | /*-------------------------------------------*/ |
| 2 | |
| 3 | /* CSS |
| 4 | /*-------------------------------------------*/ |
| 5 | @use 'components/link-toolbar/styles/slider-item'; |
| 6 | @use 'utils/breakpoints' as *; |
| 7 | |
| 8 | .vk_slider_item { |
| 9 | display: flex; |
| 10 | position: relative; |
| 11 | width: 100%; |
| 12 | |
| 13 | // 互換性対応ここから 1.27.6以前 |
| 14 | @for $i from 0 through 10 { |
| 15 | &.has-background-dim-#{ $i }::before { |
| 16 | opacity: $i * 0.1; |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | &.has-background-dim:not(.wp-block-cover__background)::before { |
| 21 | position: absolute; |
| 22 | top: 0; |
| 23 | left: 0; |
| 24 | bottom: 0; |
| 25 | right: 0; |
| 26 | z-index: 1; |
| 27 | content: ""; |
| 28 | background-color: inherit; |
| 29 | } |
| 30 | |
| 31 | &.has-background { |
| 32 | .vk_slider_item-background-area:not([class*=-background-color]) { |
| 33 | z-index: 0; |
| 34 | } |
| 35 | } |
| 36 | // 互換性対応ここまで |
| 37 | |
| 38 | .has-background-dim:not(.wp-block-cover__background)::before { |
| 39 | z-index: 1; |
| 40 | content: ""; |
| 41 | } |
| 42 | |
| 43 | // 背景色が選択されていない時は白 |
| 44 | .vk_slider_item-background-area:not([class*=-background-color]) { |
| 45 | background-color: #ffffff; |
| 46 | } |
| 47 | |
| 48 | .vk_slider_item-background-area, |
| 49 | .has-background-dim:not(.wp-block-cover__background)::before { |
| 50 | position: absolute; |
| 51 | top: 0; |
| 52 | left: 0; |
| 53 | bottom: 0; |
| 54 | right: 0; |
| 55 | z-index: 1; |
| 56 | content: ""; |
| 57 | } |
| 58 | |
| 59 | @for $i from 0 through 10 { |
| 60 | .has-background-dim-#{ $i } { |
| 61 | opacity: $i * 0.1; |
| 62 | } |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | .vk_slider_item-align-vertical- { |
| 67 | |
| 68 | &top { |
| 69 | justify-content: flex-start; |
| 70 | } |
| 71 | |
| 72 | ¢er { |
| 73 | justify-content: center; |
| 74 | } |
| 75 | |
| 76 | &bottom { |
| 77 | justify-content: flex-end; |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | |
| 82 | /*-------------------------------------------*/ |
| 83 | |
| 84 | /* CSS |
| 85 | /*-------------------------------------------*/ |
| 86 | |
| 87 | .vk_slider_item { |
| 88 | background-position: center; |
| 89 | background-size: cover; |
| 90 | background-repeat: no-repeat; |
| 91 | position: relative; |
| 92 | } |
| 93 | .vk_slider_item_container { |
| 94 | min-height: 24px; |
| 95 | width: 100%; |
| 96 | z-index: 1; |
| 97 | position: relative; |
| 98 | margin-left:auto; |
| 99 | margin-right:auto; |
| 100 | // コアが :root :where(.is-layout-constrained) > * { margin-block-start: var(--wp--custom--spacing--small); } とか付けてくるため打ち消し |
| 101 | margin-block-start: 0; |
| 102 | } |
| 103 | // :where を無しにすると、テーマが指定する .container の指定より強くなって上書きしてしまうため、:where を指定 |
| 104 | :where(.vk_slider_item_container):where(.container) { |
| 105 | max-width:var(--wp--style--global--content-size); |
| 106 | } |
| 107 | |
| 108 | .vk_slider_item-width-full { |
| 109 | margin-left: calc(50% - 50vw); |
| 110 | margin-right: calc(50% - 50vw); |
| 111 | } |
| 112 | // Fit to content area width |
| 113 | .vk_slider_item-width-full.vk_slider_item-paddingLR-none { |
| 114 | padding-left: calc(50vw - 50%); |
| 115 | padding-right: calc(50vw - 50%); |
| 116 | } |
| 117 | $padding-none: 1.5em; |
| 118 | $padding-sm: 2em; |
| 119 | $padding-md: 2.5em; |
| 120 | $padding-lg: 3em; |
| 121 | $padding-xl: 3.5em; |
| 122 | $padding-xxl: 4em; |
| 123 | |
| 124 | .vk_slider_item-paddingLR-use { |
| 125 | padding-left: $padding-none; |
| 126 | padding-right: $padding-none; |
| 127 | |
| 128 | @media (width >= $xs) { |
| 129 | padding-left: $padding-sm; |
| 130 | padding-right: $padding-sm; |
| 131 | } |
| 132 | |
| 133 | @media (width >= $sm) { |
| 134 | padding-left: $padding-md; |
| 135 | padding-right: $padding-md; |
| 136 | } |
| 137 | |
| 138 | @media (width >= $md) { |
| 139 | padding-left: $padding-lg; |
| 140 | padding-right: $padding-lg; |
| 141 | } |
| 142 | |
| 143 | @media (width >= $lg) { |
| 144 | padding-left: $padding-xl; |
| 145 | padding-right: $padding-xl; |
| 146 | } |
| 147 | |
| 148 | @media (width >= $xl) { |
| 149 | padding-left: $padding-xxl; |
| 150 | padding-right: $padding-xxl; |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | .vk_slider_item-paddingLR-zero { |
| 155 | padding-left: 0; |
| 156 | padding-right: 0; |
| 157 | } |
| 158 | // .editor-block-list__block-edit{ |
| 159 | // margin: 0!important; |
| 160 | // } |
| 161 | $color-danger: #b52727; |
| 162 |