PluginProbe ʕ •ᴥ•ʔ
VK Blocks / 1.125.0
VK Blocks v1.125.0
1.126.4 1.126.3 1.126.1 1.126.2 1.126.0 1.125.0 1.124.0 1.123.0 1.122.0 1.121.0 1.120.0 1.119.2 1.119.1 1.119.0 1.118.7 1.82.0.0 1.82.0.1 1.83.0.0 1.83.0.1 1.84.0.0 1.84.0.1 1.85.0.2 1.85.0.3 1.85.1.0 1.85.1.1 1.86.0.0 1.86.0.1 1.86.1.0 1.87.0.0 1.87.0.1 1.88.0.1 1.88.0.2 1.89.0.0 1.9.2 1.90.0.0 1.90.0.1 1.90.1.1 1.91.0.0 1.91.1.1 1.92.0.0 1.92.0.1 1.92.1.0 1.92.1.1 1.93.0.0 trunk 1.93.0.1 0.1.1 1.93.1.0 0.10.3 1.93.1.1 0.11.0 1.94.0.0 0.12.6 1.94.0.1 0.15.1 1.94.1.0 0.16.2 1.94.2.1 0.17.6 1.94.2.2 0.2.2 1.95.0.3 0.22.4 1.95.0.4 0.26.7 1.96.2.0 0.3.2 1.96.2.1 0.31.0 1.97.0.1 0.35.5 1.97.0.2 0.37.5 1.99.0.0 0.38.8 1.99.0.1 0.39.4 0.4.7 0.41.0 0.42.0 0.44.13 0.45.2 0.46.1 0.47.0 0.48.0 0.49.8 0.5.2 0.50.3 0.51.0 0.52.2 0.53.2 0.54.0 0.55.0 0.56.2 0.56.3 0.57.6 0.58.10 0.59.0 0.6.0 0.60.1 0.61.2 0.7.1 0.8.2 1.0.16 1.10.0 1.100.0.0 1.100.0.1 1.102.0.0 1.102.0.1 1.103.0.0 1.104.0.0 1.104.0.1 1.105.1.0 1.105.1.1 1.106.0.0 1.106.0.1 1.107.0.0 1.107.0.1 1.107.0.2 1.108.0.0 1.108.0.1 1.109.0.0 1.109.0.1 1.11.4 1.110.0.0 1.110.0.1 1.111.0.0 1.111.0.1 1.111.0.2 1.112.0.0 1.112.0.1 1.113.0.0 1.113.0.1 1.114.0.0 1.114.0.1 1.114.2.0 1.114.2.1 1.115.0.0 1.115.0.1 1.115.1.0 1.115.1.1 1.115.2.0 1.115.2.1 1.116.0.0 1.116.0.1 1.116.1.0 1.116.1.1 1.116.2.0 1.117.0.0 1.117.0.1 1.117.1.0 1.118.2 1.118.5 1.12.0 1.13.2 1.14.1 1.15.1 1.16.11 1.17.0 1.18.6 1.19.0 1.19.1 1.2.3 1.20.7 1.21.0 1.22.4 1.23.0 1.24.5 1.25.1 1.26.2 1.27.7.2 1.28.0.1 1.29.2.0 1.3.9 1.30.0.1 1.31.0.1 1.32.0.2 1.33.2.1 1.36.1.5 1.37.0.0 1.39.2.1 1.4.6 1.40.0.1 1.40.1.0 1.40.1.1 1.41.0.0 1.41.0.1 1.41.2.2 1.41.2.3 1.43.0.0 1.43.0.1 1.43.0.2 1.44.0.0 1.44.0.1 1.45.0.0 1.45.0.1 1.46.0.0 1.46.0.1 1.47.0.0 1.47.0.1 1.47.1.0 1.48.0.0 1.48.0.1 1.48.0.2 1.48.1.0 1.48.1.1 1.5.0 1.50.0.0 1.50.0.1 1.51.0.0 1.51.0.1 1.52.0.0 1.52.0.1 1.53.0.0 1.53.0.1 1.54.0.0 1.54.0.1 1.55.0.0 1.55.0.1 1.56.0.0 1.56.0.1 1.57.0.0 1.57.0.2 1.57.0.3 1.57.0.4 1.57.0.5 1.57.1.0 1.57.1.1 1.57.1.2 1.58.0.0 1.58.0.1 1.59.0.0 1.59.0.1 1.6.0 1.60.0.0 1.60.0.1 1.63.0.0 1.63.0.1 1.64.0.0 1.64.0.1 1.64.1.0 1.64.1.2 1.67.0.0 1.67.0.1 1.68.0.0 1.68.0.1 1.69.0.0 1.69.0.1 1.69.1.1 1.69.1.2 1.7.1 1.70.0.0 1.70.0.1 1.71.0.0 1.71.0.1 1.72.0.0 1.72.1.0 1.72.1.1 1.73.0.0 1.73.0.1 1.74.0.0 1.74.0.1 1.75.0.0 1.75.1.0 1.75.1.1 1.76.0.0 1.76.0.1 1.76.1.0 1.76.1.1 1.76.2.0 1.76.2.1 1.77.0.0 1.77.0.1 1.78.0.0 1.78.0.1 1.79.0.0 1.79.0.1 1.79.0.2 1.79.0.3 1.79.1.0 1.79.1.1 1.8.2 1.80.1.0 1.80.1.1 1.80.1.2 1.81.0.1 1.81.0.2
vk-blocks / src / utils / common.scss
vk-blocks / src / utils Last commit date
store 3 months ago GenerateBgImage.js 3 months ago block-duplicate-helper.js 3 months ago capitalize.js 3 months ago color-code-to-class.js 3 months ago color-slug-to-color-code.js 3 months ago common.scss 2 weeks ago convert-to-grid.js 3 months ago default-color-palette.js 3 months ago delete-from-array.js 3 months ago depModules.js 3 months ago disable-links.js 2 months ago empty-string-to-undefined.js 3 months ago example-data.js 3 months ago fixBrokenUnicode.js 3 months ago font-awesome-new.js 2 months ago font-awesome-version.js 3 months ago font-awesome.js 3 months ago formatNumCol.js 3 months ago gradient-slug-to-gradient-code.js 3 months ago heading-level-utils.js 3 months ago hex-to-rgba.js 3 months ago horizontal-scroll-controls.js 3 months ago icon-label.js 2 months ago is-excludes-blocks.js 3 months ago is-gradient-style.js 3 months ago is-hex-color.js 3 months ago is-not-json.js 3 months ago is-parent-reusable-block.js 1 month ago merge-colors.js 3 months ago multi-array-flaten.js 3 months ago removeProperty.js 3 months ago replaceClientId.js 3 months ago sanitizeSlug.js 3 months ago settings-page-url.js 2 months ago strip-html.js 3 months ago taxonomy-utils.js 3 months ago to-number.js 3 months ago to-preset-spacing-var.js 3 months ago unit-options.js 3 months ago wrap-unwrap.js 3 months ago
common.scss
1644 lines
1 :root {
2 --vk-margin-elem:2rem;
3 }
4
5 .text-nowrap {
6 white-space: nowrap;
7 }
8
9 /*-------------------------------------------*/
10 /* core/column をコンテンツ�
11 の半分のインナーブロックにする .is-vk-content-width-half 対応
12 /*-------------------------------------------*/
13 // front / editor 両方に適用
14 .is-vk-content-width-half {
15 // TT5などテーマによっては border-box 指定がなくてレイアウトが崩れるため
16 box-sizing: border-box;
17 }
18 :where(:not(.is-vk-row-reverse)) > :first-child.is-vk-content-width-half,
19 :where(.is-vk-row-reverse) > :nth-child(2).is-vk-content-width-half {
20 // 100svh では編集画面でパネルの�
21 などを含んでしまうため100%を使用
22 padding-left:calc( ( 100% - var(--wp--style--global--content-size) ) / 2 ) !important;
23 }
24 :where(:not(.is-vk-row-reverse)) > :nth-child(2).is-vk-content-width-half,
25 :where(.is-vk-row-reverse) > :first-child.is-vk-content-width-half {
26 padding-right:calc( ( 100% - var(--wp--style--global--content-size) ) / 2 ) !important;
27 }
28 // カラムの�
29 に 50% 指定がない場合にも�
30 がバラけないように対応
31 .wp-block-columns:has(.is-vk-content-width-half) {
32 & > :where(.wp-block-column) {
33 max-width: 50%;
34 }
35 }
36 @media (max-width: 781.98px) {
37 // モバイルで縦積みの場合のみ打ち消し
38 .wp-block-columns:where(:not(.is-not-stacked-on-mobile)){
39 // 各カラムのスタイルでPC用で中央側に padding を指定するのが一般的なため、!importantをつけないと上書きできない
40 .is-vk-content-width-half{
41 padding-left:0 !important;
42 padding-right:0 !important;
43 &.is-layout-flow > * {
44 // .is-layout-flow でも左右ベタ付けにならずにコンテンツ�
45 に抑える(.is-layout-constrainedと同じ挙動にする)ため
46 max-width: var(--wp--style--global--content-size);
47 margin-left: auto !important;
48 margin-right: auto !important;
49 }
50 }
51 .has-global-padding .is-vk-content-width-half {
52 padding-right: var(--wp--style--root--padding-right) !important;
53 padding-left: var(--wp--style--root--padding-left) !important;
54 }
55 &:has(.is-vk-content-width-half) {
56 & > :where(.wp-block-column) {
57 max-width: 100%;
58 }
59 }
60 }
61 }
62
63 /*-------------------------------------------*/
64 /* 蛍�
65 �マーカー
66 /*-------------------------------------------*/
67 @mixin vk-highlighter-gradient($direction: null) {
68 @if $direction == null {
69 background-image: linear-gradient(transparent 60%, var(--vk-highlighter-color) 0);
70 } @else {
71 background-image: linear-gradient(#{$direction}, transparent 60%, var(--vk-highlighter-color) 0);
72 }
73 }
74
75 .vk_highlighter,
76 [class*="--vk-highlighter"]*="--vk-highlighter""] {
77 @include vk-highlighter-gradient();
78 }
79 [style*="vertical-rl"]*="vertical-rl""] .vk_highlighter,
80 [style*="vertical-rl"]*="vertical-rl""] [class*="--vk-highlighter"]*="--vk-highlighter""] {
81 @include vk-highlighter-gradient(to left);
82 }
83 [style*="vertical-lr"]*="vertical-lr""] .vk_highlighter,
84 [style*="vertical-lr"]*="vertical-lr""] [class*="--vk-highlighter"]*="--vk-highlighter""] {
85 @include vk-highlighter-gradient(to right);
86 }
87
88 /*-------------------------------------------*/
89 /* 余白(レスポンシブスペーサー,�
90 �通余白で使用)
91 /*-------------------------------------------*/
92 :root {
93 --vk-margin-xxs : 0.375rem;
94 --vk-margin-xs : 0.75rem;
95 --vk-margin-sm : 1.5rem;
96 --vk-margin-md : 2.4rem;
97 --vk-margin-lg : 4rem;
98 --vk-margin-xl : 6rem;
99 --vk-margin-xxl : 9rem;
100 }
101 .vk_block{
102 &-margin-0 {
103 &--margin-top {
104 margin-top: 0 !important;
105 & > table { //テーマ側でtableにmargin-bottom や margin-top の余白がついている場合、完�
106 �に0にならないので�
107
108 margin-top:0;
109 }
110 }
111 &--margin-bottom {
112 margin-bottom: 0 !important;
113 & > table { //テーマ側でtableにmargin-bottom や margin-top の余白がついている場合、完�
114 �に0にならないので�
115
116 margin-bottom:0;
117 }
118 }
119 }
120 &-margin-xxs {
121 margin-top: var(--vk-margin-xxs); /* 旧バージョンでdeprecatedが走ってない状�
122 �のfallback */
123 &--margin-top {
124 margin-top: var(--vk-margin-xxs) !important;
125 }
126 &--margin-bottom {
127 margin-bottom: var(--vk-margin-xxs) !important;
128 }
129 &--height {
130 height: var(--vk-margin-xxs);
131 }
132 }
133 &-margin-xs {
134 margin-top: var(--vk-margin-xs); /* 旧バージョンでdeprecatedが走ってない状�
135 �のfallback */
136 &--margin-top {
137 margin-top: var(--vk-margin-xs) !important;
138 }
139 &--margin-bottom {
140 margin-bottom: var(--vk-margin-xs) !important;
141 }
142 &--height {
143 height: var(--vk-margin-xs);
144 }
145 }
146 &-margin-sm {
147 margin-top: var(--vk-margin-sm); /* 旧バージョンでdeprecatedが走ってない状�
148 �のfallback */
149 &--margin-top {
150 margin-top: var(--vk-margin-sm) !important;
151 }
152 &--margin-bottom {
153 margin-bottom: var(--vk-margin-sm) !important;
154 }
155 &--height {
156 height: var(--vk-margin-sm);
157 }
158 }
159 &-margin-md {
160 margin-top: var(--vk-margin-md); /* 旧バージョンでdeprecatedが走ってない状�
161 �のfallback */
162 &--margin-top {
163 margin-top: var(--vk-margin-md) !important;
164 }
165 &--margin-bottom {
166 margin-bottom: var(--vk-margin-md) !important;
167 }
168 &--height {
169 height: var(--vk-margin-md);
170 }
171 }
172 &-margin-lg {
173 margin-top: var(--vk-margin-lg); /* 旧バージョンでdeprecatedが走ってない状�
174 �のfallback */
175 &--margin-top {
176 margin-top: var(--vk-margin-lg) !important;
177 }
178 &--margin-bottom {
179 margin-bottom: var(--vk-margin-lg) !important;
180 }
181 &--height {
182 height: var(--vk-margin-lg);
183 }
184 }
185 &-margin-xl {
186 margin-top: var(--vk-margin-xl); /* 旧バージョンでdeprecatedが走ってない状�
187 �のfallback */
188 &--margin-top {
189 margin-top: var(--vk-margin-xl) !important;
190 }
191 &--margin-bottom {
192 margin-bottom: var(--vk-margin-xl) !important;
193 }
194 &--height {
195 height: var(--vk-margin-xl);
196 }
197 }
198 &-margin-xxl {
199 margin-top: var(--vk-margin-xxl); /* 旧バージョンでdeprecatedが走ってない状�
200 �のfallback */
201 &--margin-top {
202 margin-top: var(--vk-margin-xxl) !important;
203 }
204 &--margin-bottom {
205 margin-bottom: var(--vk-margin-xxl) !important;
206 }
207 &--height {
208 height: var(--vk-margin-xxl);
209 }
210 }
211 }
212
213 /*-------------------------------------------*/
214 /* パレット設定
215 /*-------------------------------------------*/
216 $stylePalette: (
217 is-style-vk-arrow-mark: "\f138",
218 is-style-vk-triangle-mark: "\f0da",
219 is-style-vk-check-mark: "\f00c",
220 is-style-vk-check-circle-mark: "\f058",
221 is-style-vk-check-square-mark: "\f14a",
222 is-style-vk-handpoint-mark: "\f0a4",
223 is-style-vk-pencil-mark: "\f303",
224 is-style-vk-smile-mark: "\f118",
225 is-style-vk-frown-mark: "\f119",
226 is-style-vk-circle-mark: "\f111",
227 is-style-vk-times-mark: "\f00d",
228 );
229
230 $colorPalette: (
231 (pale-pink, #f78da7),
232 (vivid-red, #cf2e2e),
233 (luminous-vivid-orange, #ff6900),
234 (luminous-vivid-amber, #fcb900),
235 (light-green-cyan, #7bdcb5),
236 (vivid-green-cyan, #00d084),
237 (pale-cyan-blue, #8ed1fc),
238 (vivid-cyan-blue, #0693e3),
239 (vivid-purple, #9b51e0),
240 (very-light-gray, #eee),
241 (cyan-bluish-gray, #abb8c3),
242 (very-dark-gray, #313131),
243 (white, #ffffff),
244 (color-primary, var(--wp--preset--color--vk-color-primary)),
245 (color-primary-dark, var(--wp--preset--color--vk-color-primary-dark)),
246 (color-primary-vivid, var(--wp--preset--color--vk-color-primary-vivid)),
247 (color-custom-1, var(--wp--preset--color--vk-color-custom-1)),
248 (color-custom-2, var(--wp--preset--color--vk-color-custom-2)),
249 (color-custom-3, var(--wp--preset--color--vk-color-custom-3)),
250 (color-custom-4, var(--wp--preset--color--vk-color-custom-4)),
251 (color-custom-5, var(--wp--preset--color--vk-color-custom-5))
252 );
253
254 /*-------------------------------------------*/
255 /* カラー設定
256 /*-------------------------------------------*/
257 @each $colorClass, $color in $colorPalette {
258 :root {
259 // 一般的なカラー設定
260 .vk-has-#{"#{$colorClass}"}-background-color,
261 .has-vk-#{"#{$colorClass}"}-background-color {
262 @if $colorClass == color-primary {
263 // color-primaryに関する特殊処理
264 background-color: var(--wp--preset--color--vk-color-primary, #337ab7);
265 } @else {
266 background-color: #{$color};
267 }
268 }
269
270 .vk-has-#{"#{$colorClass}"}-color,
271 .has-vk-#{"#{$colorClass}"}-color {
272 @if $colorClass == color-primary {
273 // color-primaryに関する特殊処理
274 color: var(--wp--preset--color--vk-color-primary, #337ab7);
275 } @else {
276 color: #{$color};
277 }
278 }
279 }
280 }
281
282 /*-------------------------------------------*/
283 /* リストデザイン
284 /*-------------------------------------------*/
285 @mixin mark-before {
286 font-family: "Font Awesome 5 Free";
287 font-weight: 900;
288 position: absolute;
289 }
290
291 .wp-block-list {
292 &.is-style {
293 &-default,
294 &-vk-arrow-mark,
295 &-vk-triangle-mark,
296 &-vk-check-mark,
297 &-vk-check-circle-mark,
298 &-vk-check-square-mark,
299 &-vk-handpoint-mark,
300 &-vk-pencil-mark,
301 &-vk-smile-mark,
302 &-vk-frown-mark,
303 &-vk-circle-mark,
304 &-vk-times-mark,
305 &-vk-numbered-circle-mark,
306 &-vk-numbered-square-mark {
307 padding-inline-start: 2em;
308 &:not(.has-text-color),
309 &:not(.has-link-color) {
310 color: inherit;
311 }
312 &:where(:not(.is-style-default)) {
313 line-height: calc( 1rem * 1.65 );
314 li {
315 list-style: none;
316 position: relative;
317 margin-top:0;
318 margin-left: 0;
319 margin:calc( 1rem * 0.8 ) 0;
320 }
321 }
322 }
323 }
324
325 &.is-style-vk-numbered-circle-mark {
326 counter-reset: number;
327 list-style-type: none;
328
329 li {
330 --vk-numbered-marker-leading: 0px;
331 position: relative;
332 list-style: none;
333 padding-left: .5em;
334 &:before {
335 position: absolute;
336 left: 0;
337 top: var( --vk-numbered-marker-leading, 0 );
338 counter-increment: number;
339 content: counter(number);
340 margin-left: -1.8em;
341 background: #222;
342 color: #fff;
343 text-indent: 0;
344 display: inline-block;
345 font-weight: bold;
346 border-radius: 50%;
347 font-size: calc( 1rem * 1 );
348 line-height: calc( 1rem * 1.8 );
349 width: 26px;
350 height: 26px;
351 text-align: center;
352 }
353
354 ul,
355 ol {
356 counter-reset: num_inner;
357 content: counter(num_inner);
358
359 li {
360 &:before {
361 counter-increment: num_inner;
362 content: counter(num_inner);
363 }
364 }
365 }
366 }
367 }
368
369 &.is-style-vk-numbered-square-mark {
370 counter-reset: number;
371 list-style-type: none;
372
373 li {
374 --vk-numbered-marker-leading: 0px;
375 position: relative;
376 list-style: none;
377 padding-left: .5em;
378 &:before {
379 position: absolute;
380 left: -0.3em;
381 top: var( --vk-numbered-marker-leading, 0 );
382 counter-increment: number;
383 content: counter(number);
384 margin-left: -25px;
385 background: #222;
386 color: #fff;
387 text-indent: 0;
388 display: inline-block;
389 font-weight: bold;
390 font-size: calc( 1rem * 1 );
391 line-height: calc( 1rem * 1.8 );
392 width: 26px;
393 height: 26px;
394 text-align: center;
395 border-radius: 2px;
396 }
397
398 ul,
399 ol {
400 counter-reset: num_inner;
401 content: counter(num_inner);
402
403 li {
404 &:before {
405 counter-increment: num_inner;
406 content: counter(num_inner);
407 }
408 }
409 }
410 }
411 }
412
413 &.is-style-vk-numbered-circle-mark,
414 &.is-style-vk-numbered-square-mark {
415 --vk-numbered-default-line-height-length: calc( 1rem * 1.65 );
416
417 li {
418 --vk-numbered-marker-leading: max(
419 calc(
420 (
421 var( --vk-numbered-line-height-length, var( --vk-numbered-default-line-height-length ) )
422 - var( --vk-numbered-default-line-height-length )
423 ) / 2
424 ),
425 0px
426 );
427 }
428
429 &.fa-lg {
430 li::before {
431 left: -0.8em;
432 }
433 }
434
435 &.fa-2x {
436 li {
437 line-height: 1.25em;
438 }
439
440 li::before {
441 left: -1.1em;
442 }
443 }
444
445 &.fa-3x {
446 li {
447 line-height: 1.25em;
448 }
449
450 li::before {
451 left: -1.4em;
452 }
453 }
454
455 &.fa-4x {
456 li {
457 line-height: 1.25em;
458 }
459
460 li::before {
461 left: -1.5em;
462 }
463 }
464
465 &.fa-5x {
466 li {
467 line-height: 1.25em;
468 }
469
470 li::before {
471 left: -1.6em;
472 }
473 }
474 }
475
476 @each $styleClass, $faCode in $stylePalette {
477 &.#{$styleClass} {
478 li {
479 &::before {
480 @include mark-before;
481 content: $faCode;
482 left: -1.5em;
483 }
484 }
485 }
486 &.is-style-vk-default {
487 li {
488 &::before {
489 font-size: 22px;
490 line-height: 1.1em;
491 }
492 }
493 }
494 }
495
496 // Use FA Regular weight for hollow circle look on Circle style
497 &.is-style-vk-circle-mark {
498 li::before {
499 font-weight: 400;
500 }
501 }
502
503 @each $colorClass, $color in $colorPalette {
504 &.vk-has-#{"#{$colorClass}"}-color,
505 &.has-vk-#{"#{$colorClass}"}-color {
506 li::marker {
507 color: $color;
508 }
509 li::before {
510 color: $color;
511 }
512 }
513
514 &.is-style-vk-numbered-circle-mark,
515 &.is-style-vk-numbered-square-mark {
516 &.vk-has-#{"#{$colorClass}"}-color,
517 &.has-vk-#{"#{$colorClass}"}-color {
518 li::before {
519 color: #fff;
520 background-color: $color;
521 }
522 }
523 }
524
525 }
526 }
527 //ul,ol
528
529 /*-------------------------------------------*/
530 /* グループブロック デザイン
531 /*-------------------------------------------*/
532
533 @mixin pad-mag {
534 padding: 1.8em;
535 margin-top: var( --vk-margin-elem );
536 margin-bottom: var( --vk-margin-elem );
537 }
538 @mixin inner-item-pad-mag {
539 h2,
540 h3,
541 h4,
542 h5,
543 h6 {
544 margin-bottom: 1rem;
545 }
546 ul,
547 ol {
548 margin-top: 0;
549 li:last-child {
550 margin-bottom: 0;
551 }
552 }
553 }
554
555 .wp-block-group {
556 h3:first-child,
557 h4:first-child {
558 margin-top: 0;
559 }
560
561 /* *:last-child で指定するとブロックエディタでカラムの中にいれた時に枠の外にはみ出す */
562 p,
563 ul,
564 ol,
565 dl,
566 table,
567 .wp-block-columns {
568 &:last-child {
569 margin-bottom: 0;
570 }
571 }
572
573 @each $colorClass, $color in $colorPalette {
574 // 線の色パネル用(vk-has-*)→ テキスト色は変えない
575 &.vk-has-#{"#{$colorClass}"}-color {
576 color: inherit;
577 border-color: $color;
578 .wp-block-group__inner-container {
579 color: inherit;
580 border-color: $color;
581 }
582 }
583 // テキスト色用(has-vk-*)→ :rootルールに任せる
584 &.has-vk-#{"#{$colorClass}"}-color {
585 border-color: $color;
586 .wp-block-group__inner-container {
587 border-color: $color;
588 }
589 }
590 }
591 } //.wp-block-group
592 .is-style-vk-group {
593 &-solid {
594 border: solid 3px;
595 @include pad-mag;
596 @include inner-item-pad-mag;
597 }
598 &-solid-roundcorner {
599 border: solid 3px;
600 border-radius: 8px;
601 @include pad-mag;
602 @include inner-item-pad-mag;
603 }
604 &-dotted {
605 border: dotted 1px;
606 @include pad-mag;
607 @include inner-item-pad-mag;
608 }
609 &-dashed {
610 border: dashed 2px;
611 @include pad-mag;
612 @include inner-item-pad-mag;
613 }
614 &-double {
615 border: double 5px;
616 @include pad-mag;
617 @include inner-item-pad-mag;
618 }
619 &-stitch {
620 position: relative;
621 margin: 1em auto;
622 padding: 2.3em;
623 border-radius: 8px;
624 &::before {
625 content: "";
626 position: absolute;
627 top: .5em;
628 left: .5em;
629 width: calc(100% - 1em);
630 height: calc(100% - 1em);
631 border: dashed 2px;
632 border-color: inherit;
633 border-radius: 8px;
634 pointer-events: none;
635 }
636 //@include inner-item-pad-mag;
637 // thema.jsonでは .wp-block-group__inner-container がつかないためコメントアウト
638 //.wp-block-group__inner-container {
639 // border: dashed 2px;
640 // border-radius: 8px;
641 // padding: 1.8em;
642 // }
643 }
644 &-top-bottom-border {
645 border-top: solid 1px;
646 border-bottom: solid 1px;
647 @include pad-mag;
648 @include inner-item-pad-mag;
649 padding-left: 0;
650 padding-right: 0;
651 }
652 &-shadow {
653 box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
654 @include pad-mag;
655 @include inner-item-pad-mag;
656 }
657 &-alert-info {
658 background-color: #d9edf7;
659 color: #31708f;
660 border-radius: 3px;
661 border: 1px solid #bce8f1;
662 @include pad-mag;
663 @include inner-item-pad-mag;
664 }
665 &-alert-success {
666 background-color: #dff0d8;
667 color: #3c763d;
668 border-radius: 3px;
669 border: 1px solid #d6e9c6;
670 @include pad-mag;
671 @include inner-item-pad-mag;
672 }
673 &-alert-warning {
674 background-color: #fcf8e3;
675 color: #8a6d3b;
676 border-radius: 3px;
677 border: 1px solid #faebcc;
678 @include pad-mag;
679 @include inner-item-pad-mag;
680 }
681 &-alert-danger {
682 background-color: #f2dede;
683 color: #a94442;
684 border-radius: 3px;
685 border: 1px solid #ebccd1;
686 @include pad-mag;
687 @include inner-item-pad-mag;
688 }
689 }
690
691
692 /*-------------------------------------------*/
693 /* Group Block
694 /*-------------------------------------------*/
695 .editor-styles-wrapper .wp-block-group {
696 // これがないとコアに勝手にwidthが左右1em余白をあけられる
697 // → だがしかし Grid Column 2 で中の要素が勝手に小さくされるので一旦コメントアウト
698 .wp-block{
699 // width:auto;
700 }
701 }
702
703 /*-------------------------------------------*/
704 /* YouTube
705 /*-------------------------------------------*/
706 .wp-block-embed {
707 &-youtube {
708 iframe {
709 width: 100%;
710 }
711 }
712 }
713
714 .has-text-align-right {
715 text-align: right;
716 }
717 .has-text-align-left {
718 text-align: left;
719 }
720 .has-text-align-center {
721 text-align: center;
722 }
723
724 /*-------------------------------------------*/
725 /* ソーシャルアイコン
726 /*-------------------------------------------*/
727 .wp-block-social-links{
728 flex-wrap: wrap;
729 }
730
731 /*-------------------------------------------*/
732 /* Swiper
733 /*-------------------------------------------*/
734 :root {
735 --vk-color-background-white-translucent:rgba(255, 255, 255, 0.5);
736 }
737
738 // Painted size of the navigation buttons. The pagination's side clearance is derived from
739 // it, so the arrow size and the space reserved for it can never drift apart.
740 //ナビゲーションボタンの描画サイズ。ページネーションの左右クリアランスをここから算出するため、
741 //矢印のサイズと確保する余白がずれることがない。
742 $swiper-nav-size: 2.4rem;
743
744 // Distance every overlay control (arrows, pause/play button) keeps from the edge of the slider.
745 // Kept in one place so the controls cannot drift apart when one of them is touched. It is
746 // exposed as --vk-slider-edge-offset so a theme or user CSS can move every control at once:
747 // the arrows, the pause/play button, the space the pagination leaves for the arrows and the
748 // pagination's own distance from the bottom edge all follow the same value.
749 // The variable is declared nowhere, only read with a fallback, so it can be set on any
750 // ancestor — inheritance is the point here, unlike the pagination variables further down,
751 // which are deliberately scoped so they cannot reach a nested slider. It applies to the Post
752 // List Slider (Pro) too, since both blocks share these rules.
753 // It has to be a length (10px, 1rem …). A unitless value such as 10 would make the clearance
754 // calc() invalid at computed-value time, which is what the @property registration below
755 // guards against — a var() fallback alone does not cover an invalid value. Note that a
756 // unitless 0 is a valid <length>, so it is honoured as 0px rather than falling back; the
757 // clamp on the value below is what keeps a negative value from reopening the hole this offset
758 // exists to close (a negative clearance clamps padding to 0, letting the arrow's hit area
759 // swallow the first bullet's taps again).
760 // Raising it eats horizontal space on narrow screens, so the number of bullets that fit on
761 // one line falls as the value rises; the bullets wrap onto a second row once that number
762 // drops below the slide count. Where that happens therefore depends on how many slides the
763 // slider has, not on a fixed threshold value.
764 //スライダー上に重ねるコントロール(矢印・停止/再生ボタン)が端から空ける距離。
765 //片方だけ触って静かにずれることが無いよう 1 箇所にまとめる。テーマやユーザー CSS から
766 //まとめて動かせるよう --vk-slider-edge-offset として�
767 �開し、矢印・停止/再生ボタン・
768 //ページネーションが矢印のために空ける左右の余白・ページネーション自身の下端からの距離が、
769 //すべて同じ値に追従する。変数はどこにも宣言せずフォールバック付きで
770 //参�
771 �するだけなので、任意の祖�
772 �要素で指定できる。これらのルールは投稿リストスライダー(Pro)と
773 //�
774 �通のため、Pro にも同じように効く(後述のページネーション用の変数は�
775 �れ子のスライダーに
776 //届かないよう意図的にスコープを絞っているが、この変数は逆に継承させるのが目的)。
777 //指定は長さ(10px・1rem など)で行う。10 のような単位なしの値ではクリアランスの
778 //calc() が計算時に無効になるため、下の @property 登録でそれを防いでいる
779 //(var() のフォールバックは「未定義」の時しか効かず、不正値は救えない)。
780 //なお単位なしの 0 は <length> として妥当なため、フォールバックせず 0px として効く。
781 //負の値も <length> として通ってしまい、クリアランスが負になると padding は 0 に
782 //クランプされて「当たり判定が�
783 �頭 bullet のタップを奪う」——このオフセットが
784 //塞いだはずの穴——が変数経由で再現するため、下の値で 0 を下限にしている。
785 //値を上げると狭い画面では横�
786 を消費するぶん 1 行に並ぶ bullets の枚数が減り、
787 //枚数がスライド数を下回った時点で 2 行に折り返す。つまり折り返しが起きる値は
788 //スライドの枚数によって決まり、固定のしきい値があるわけではない。
789 $swiper-edge-offset: 10px;
790 $swiper-edge-offset-var: max(0px, var(--vk-slider-edge-offset, #{$swiper-edge-offset}));
791
792 // Registering the custom property makes an invalid or unitless value fall back to the
793 // default instead of invalidating the whole declaration it is used in — without this,
794 // `--vk-slider-edge-offset: 10` drops the pagination's padding to 0 (bullets slide under
795 // the arrows) while the arrows' own offset still falls back, so the breakage is uneven and
796 // hard to trace. inherits: true is mandatory here: the default is false, which would stop a
797 // value set on an ancestor from reaching the controls at all.
798 //カスタムプロパティを登録しておくと、不正値・単位なしの値が指定された時に「その宣言�
799 �体が
800 //無効」になるのではなく既定値へフォールバックする。これが無いと
801 //`--vk-slider-edge-offset: 10` でページネーションの padding だけが 0 に落ちて
802 //(bullets が矢印の下に潜る)、矢印側はフォールバックが効く、という不揃いな壊れ方になり
803 //原因を追いにくい。inherits: true は�
804 須で、既定の false では祖�
805 �で指定した値が
806 //コントロールに届かなくなる。
807 // Note that @property is not supported below Safari 16.4 / Firefox 128, so on those the
808 // uneven fallback described above still happens for a unitless value. Valid lengths behave
809 // the same everywhere.
810 //なお @property は Safari 16.4 未満・Firefox 128 未満では効かないため、それらのブラウザでは
811 //単位なしの値を指定した場合に上記の不揃いなフォールバックが依然として起きる。
812 //正しい長さを指定している限り、どのブラウザでも挙動は同じ。
813 @property --vk-slider-edge-offset {
814 syntax: "<length>";
815 inherits: true;
816 initial-value: #{$swiper-edge-offset};
817 }
818
819 // Swiper's own defaults for how far the pagination sits from the bottom edge (8px for
820 // bullets, and the value below for the fraction counter, which vk-blocks sets itself).
821 // The pagination follows --vk-slider-edge-offset only by the amount the value is raised
822 // above its 10px default, so the default layout does not move: reading the variable
823 // directly would shift the bullets from 8px to 10px on every existing slider. Without this
824 // the arrows would move away from the bottom edge while the bullets stayed put, leaving the
825 // arrows above the bullet row and the side clearance reserved for nothing.
826 //ページネーションが下端から空ける距離の既定値(bullets は Swiper 既定の 8px、
827 //スライド枚数表示は vk-blocks 側で指定している下の値)。
828 //ページネーションは --vk-slider-edge-offset を「既定の 10px から上げたぶん」だけ追従する。
829 //変数をそのまま読むと既存のすべてのスライダーで bullets が 8px から 10px へ動いてしまうため、
830 //既定の見た目を変えないためにこの形にしている。追従させないと、値を上げた時に矢印だけが
831 //下端から離れて bullets が取り残され、矢印が bullet 列の上に来たうえ、
832 //左右に確保したクリアランスが誰のためでもない余白になる。
833 $swiper-pagination-bullets-bottom: 8px;
834 $swiper-pagination-fraction-bottom: 5px;
835 // 「既定値」と「既定値+上げたぶん」の大きい方。
836 // calc() 側だけで「既定の 10px なら既定値のまま」は成立するので、max() は別の意思決定
837 // ——「既定より小さい値でもページネーションを既定位置より下げない」ための下限クランプ——
838 // である。0 や負の値で bullets が下端からはみ出して切れるのを防ぐのが目的で、
839 // そのぶん下方向には追従しない(矢印だけが端に寄る)非対称な挙動になる。
840 // The calc() alone already keeps the default in place at the default 10px, so max() is a
841 // separate decision: it clamps the pagination so it never sits closer to the bottom edge
842 // than its default, which is what stops 0 or negative values from pushing the bullets
843 // outside the slider. The trade-off is that it does not follow downwards — below 10px only
844 // the arrows and the pause/play button move closer to the edge.
845 $swiper-pagination-bullets-bottom-var: max(#{$swiper-pagination-bullets-bottom}, calc(#{$swiper-edge-offset-var} - #{$swiper-edge-offset} + #{$swiper-pagination-bullets-bottom}));
846 $swiper-pagination-fraction-bottom-var: max(#{$swiper-pagination-fraction-bottom}, calc(#{$swiper-edge-offset-var} - #{$swiper-edge-offset} + #{$swiper-pagination-fraction-bottom}));
847
848 // Minimum pointer target size (WCAG 2.1 SC 2.5.5 Target Size, AAA / Apple HIG 44pt).
849 // This is applied as an invisible hit area, not by enlarging the button itself: WCAG
850 // measures the target, not the painted box. Growing the painted button would also widen
851 // the clearance the bullets have to leave for it, which measurably reduced how many
852 // bullets fit on mobile — this way both are satisfied at once.
853 //ポインタターゲットの最小サイズ(WCAG 2.1 SC 2.5.5・AAA / Apple HIG 44pt)。
854 //ボタン自体を大きくするのではなく不可視の当たり判定として付与する。WCAG が測るのは
855 //ターゲットであって描画ボックスではないため。描画サイズを大きくすると bullets が
856 //空けるべきクリアランスまで広がり、実測でモバイルの bullets 収容数が減ってしまうので、
857 //この方法なら見た目・収容数を変えずに両立できる。
858 $swiper-touch-target: 44px;
859
860 // Expands the pointer target to $swiper-touch-target without changing the painted size.
861 //描画サイズを変えずにポインタターゲットだけを $swiper-touch-target まで広げる。
862 @mixin vk-slider-touch-target {
863 &::before {
864 content: "";
865 position: absolute;
866 top: 50%;
867 left: 50%;
868 transform: translate(-50%, -50%);
869 width: max(100%, #{$swiper-touch-target});
870 height: max(100%, #{$swiper-touch-target});
871 }
872 }
873
874 // Focus ring shared by every keyboard-reachable slider control (pagination bullets,
875 // navigation arrows, pause/play button). All of them sit on arbitrary photos, so a
876 // single-coloured ring can disappear on an image of the same tone. The ring is therefore a
877 // dark line with a white halo outside it, which keeps the focus position visible against
878 // both dark and light images (WCAG 2.1 SC 2.4.7 / SC 1.4.11).
879 //キーボードで到達できるスライダーのコントロール(ページネーションの bullets・ナビゲーション矢印・
880 //停止/再生ボタン)で�
881 �有するフォーカスリング。いずれも任意の写真の上に載るため、単色のリングでは
882 //同系色の画像で消えてしまう。そのため暗い線の外側に白いハローを置き、暗い写真・明るい写真の
883 //どちらでもフォーカス位置が分かるようにする(WCAG 2.1 SC 2.4.7 / SC 1.4.11)。
884 //
885 // The ring colour is a literal, not var(--vk-color-text-body): that variable is supplied by
886 // vk-component and the Lightning themes, so a theme that sets a light body colour (or one
887 // that turns vk-components off, leaving it undefined) would produce a white ring inside a
888 // white halo — no focus indicator at all on a light image. The bullets themselves are also
889 // fixed colours (#ccc / #666), so the ring has no theme colour to follow in the first place.
890 //リング色は var(--vk-color-text-body) ではなくリテラルにしている。この変数は vk-component や
891 //Lightning 系テーマが供給するもので、本文色に明るい色を設定したテーマ(あるいは vk-components を
892 //切って未定義になったテーマ)では「白いリング+白いハロー」になり、明るい画像の上でフォーカス表示が
893 //皆無になる。bullets 自身も #ccc / #666 の固定色なので、そもそもリングが追従すべきテーマ色は無い。
894 //
895 // The outer spread has to clear the ring's outer edge to be visible at all: outline-offset
896 // 2px plus outline-width 2px puts that edge 4px out, and the outline is painted over the
897 // box-shadow, so a 4px spread would sit entirely underneath it. 6px leaves 2px of white
898 // outside the ring. The bullet gap is 8px on mobile and 10px on PC, so it still does not
899 // reach the neighbouring bullet.
900 //外側の広がりはリングの外端を越えないと見えない。outline-offset 2px + outline-width 2px で
901 //リングの外端は 4px の位置にあり、outline は box-shadow の上に描かれるため、4px では
902 //ハローが完�
903 �に隠れてしまう。6px にするとリングの外側に白が 2px 残る。bullet の間隔は
904 //モバイル 8px・PC 10px あるため、隣の bullet には届かない。
905 //
906 // The inner 1px shadow reproduces the translucent white hairline that `outline` replaces on
907 // the bullets (`outline` is a single property, so the focus ring overwrites the permanent
908 // one). On the arrows and the pause/play button there is no permanent hairline, so it simply
909 // becomes the inner half of the same sandwich.
910 //�
911 側の 1px は、bullets で `outline` が置き換えてしまう半透明の白ヘアラインを再現するためのもの
912 //(`outline` は単一プロパティなので、フォーカスリングが常時のヘアラインを上書きする)。矢印と
913 //停止/再生ボタンには常時のヘアラインが無いため、同じサンドイッチの�
914 側の層になるだけ。
915 //
916 // The two shadow layers deliberately differ in where their colour comes from. The outer halo
917 // is a literal for the same reason the ring is: if a theme overrode
918 // --vk-color-background-white-translucent with a dark colour, the sandwich would become
919 // "dark ring + dark halo" and the focus position would vanish on a light image — the exact
920 // hole this ring was added to close, reopened through another door. The inner 1px keeps the
921 // variable because its job is to reproduce the permanent hairline above, which reads the same
922 // variable: if a theme changes that hairline, this layer has to follow it.
923 //2 つの影は色の出どころをあえて変えている。外側のハローをリテラルにするのはリングと同じ理由で、
924 //テーマが --vk-color-background-white-translucent を暗い色に上書きすると「暗いリング+暗いハロー」
925 //になり、明るい画像の上でフォーカス位置が消える(このリングで塞いだ穴が別経路で再現する)。
926 //�
927 側の 1px を変数のままにするのは、その役割が上の常時ヘアライン(同じ変数を読む)の再現だから。
928 //テーマがヘアラインを変えたなら、この層も追従しなければならない。
929 $swiper-focus-ring-color: #333;
930 $swiper-focus-ring-halo-color: rgba(255, 255, 255, 0.5);
931
932 @mixin vk-slider-focus-ring {
933 &:focus-visible {
934 outline: 2px solid $swiper-focus-ring-color;
935 outline-offset: 2px;
936 box-shadow:
937 0 0 0 1px var(--vk-color-background-white-translucent),
938 0 0 0 6px $swiper-focus-ring-halo-color;
939 }
940 }
941
942 // The injected SVG draws a thinner stroke than the icon font used up to Swiper v11, and it
943 // sits on a translucent white circle over arbitrary photos, so the contrast against the
944 // slide (WCAG 2.1 SC 1.4.11) depends on the image. Scaling the arrow up slightly thickens
945 // the stroke and brings it back to roughly the previous weight. The circle's opacity is
946 // left alone on purpose — it comes from a shared variable used by other controls too.
947 //注�
948 �される SVG は Swiper v11 までのアイコンフォントより線が細く、任意の写真の上に置かれた
949 //半透明の白丸に載るため、スライドとのコントラスト(WCAG 2.1 SC 1.4.11)が画像に左右される。
950 //矢印を少し大きくすると線も太くなり、従来の見た目に近づく。白丸の不透明度は他のコントロールでも
951 //使う�
952 �通変数のため、あえて触っていない。
953 $swiper-arrow-height: 1.4rem;
954
955 // Arrow icon used as a mask when Swiper has not injected its own SVG yet.
956 // The shape matches the SVG Swiper v12+ injects, so both look identical.
957 //Swiper がまだ SVG を注�
958 �していない時にマスクとして使う矢印アイコン。
959 //Swiper v12 以降が注�
960 �する SVG と同じ形なので、どちらでも見た目は同じになる。
961 $swiper-arrow-icon: "data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2011%2020'%3E%3Cpath%20d='M0.38296%2020.0762C0.111788%2019.805%200.111788%2019.3654%200.38296%2019.0942L9.19758%2010.2796L0.38296%201.46497C0.111788%201.19379%200.111788%200.754138%200.38296%200.482966C0.654131%200.211794%201.09379%200.211794%201.36496%200.482966L10.4341%209.55214C10.8359%209.9539%2010.8359%2010.6053%2010.4341%2011.007L1.36496%2020.0762C1.09379%2020.3474%200.654131%2020.3474%200.38296%2020.0762Z'%20fill='%23000'/%3E%3C/svg%3E";
962
963 // Slider container
964 // -----------------------------------------------------------------------------
965 .vk_slider,
966 .vk_post_list_slider {
967 //�
968 �通ではないためvk_sliderの中に格納
969 height: auto; //100%だとサイトエディター画面でおかしくなるのでautoに
970 position: relative;
971
972 .swiper-wrapper {
973 height: auto; //100%だとおかしくなるのでautoに
974 transition-timing-function: cubic-bezier(0.77, 0.2, 0.05, 1);
975 }
976
977 // Next and previous buttons for vk_slider.
978 //vk_slider用のnextとprevボタン
979 .swiper-button-next,
980 .swiper-button-prev {
981 // Swiper derives the button's width, height and vertical centering offset from this
982 // variable, so setting it alone is enough — no separate width/height is needed.
983 //Swiper はこの変数からボタンの�
984 ・高さ・上下中央寄せのオフセットを算出するため、
985 //この 1 本を指定すれば足り、width/height を別途書く�
986 要はない。
987 --swiper-navigation-size: #{$swiper-nav-size};
988
989 // Swiper's default sides offset changed from 10px (v11) to 4px (v14). Pin it to the
990 // shared edge offset so the arrows keep their previous position and stay aligned with
991 // .swiper-pause-button. Declaring Swiper's own variable on the element would beat any
992 // value inherited from an ancestor, so the override goes through --vk-slider-edge-offset,
993 // which every control reads — setting it moves the arrows, the pause/play button and the
994 // pagination clearance together instead of just one of them.
995 //Swiper 既定の左右オフセットは v11 の 10px から v14 で 4px に変わったため、�
996 �通の
997 //端オフセットに固定し、停止/再生ボタン(.swiper-pause-button)と端からの距離を揃える。
998 //Swiper 自身の変数を要素に直接宣言すると祖�
999 �からの継承に�
1000 ず勝ってしまうため、上書きは
1001 //�
1002 �コントロールが読む --vk-slider-edge-offset 経由にする。これにより矢印だけでなく
1003 //停止/再生ボタン・ページネーションのクリアランスも一緒に動く。
1004 --swiper-navigation-sides-offset: #{$swiper-edge-offset-var};
1005
1006 // The fallback is required: vk-blocks itself does not define --vk-color-text-body (it is
1007 // commented out in class-vk-blocks-print-css-variables.php); vk-component and the
1008 // Lightning themes supply it. On a theme that turns vk-components off via the
1009 // vk_blocks_should_load_vk_components filter it is undefined, this declaration is
1010 // invalid at computed-value time and `color` falls back to the inherited value — which
1011 // can be light, leaving the arrow invisible on the translucent white circle.
1012 //フォールバックは�
1013 須。--vk-color-text-bodyvk-blocks 自身では定義しておらず
1014 //(class-vk-blocks-print-css-variables.php でコメントアウト)、vk-component や
1015 //Lightning 系テーマが供給している。vk_blocks_should_load_vk_components フィルタで
1016 //vk-components を切ったテーマでは未定義になり、この宣言が計算時に無効化されて `color` は
1017 //継承値に落ちる。継承値が明るい色だと半透明の白丸の上で矢印が見えなくなる。
1018 color: var(--vk-color-text-body, #333);
1019 background-color: var(--vk-color-background-white-translucent);
1020 border-radius: var(--vk-size-radius);
1021 background-image: none;
1022 z-index: 20;
1023
1024 // 見た目は変えずに当たり判定だけ 44px 角にする
1025 @include vk-slider-touch-target;
1026
1027 // bullets と同じフォーカスリング。矢印は role="button" tabindex="0" でフォーカスできる。
1028 @include vk-slider-focus-ring;
1029
1030 // Since Swiper v12 the arrow is an injected SVG (.swiper-navigation-icon) instead of
1031 // an ::after icon font. Its viewBox is 11:20, so only the height is fixed and the
1032 // width follows the aspect ratio instead of being letterboxed into a square.
1033 //Swiper v12 以降、矢印は ::after のアイコンフォントではなく注�
1034 �される SVG(.swiper-navigation-icon)になった。
1035 //viewBox が 11:20 のため、正方形に収めてレターボックスさせず、高さだけを固定して�
1036 は比率に従わせる。
1037 .swiper-navigation-icon {
1038 height: $swiper-arrow-height;
1039 width: auto;
1040 }
1041
1042 // Swiper injects the arrow SVG on initialization, and only into an empty button.
1043 // The block editor preview does not initialize Swiper, so the button would stay
1044 // empty and show no arrow at all (up to Swiper v11 the arrow came from a CSS icon
1045 // font, so it rendered without JS). Draw the same arrow here while the button is
1046 // empty; once the SVG is injected the button is no longer :empty and this stops.
1047 //Swiper は初期化時に、中身が空のボタンにだけ矢印 SVG を注�
1048 �する。
1049 //ブロックエディタのプレビューでは Swiper を初期化しないため、そのままだと
1050 //ボタンが空のままで矢印が出ない(v11 まではアイコンフォント=CSS だけで描画できていた)。
1051 //そこで中身が空の間だけ同じ形の矢印を描画する。SVG 注�
1052 �後は :empty でなくなり自動的に無効になる。
1053 &:where(:empty)::after {
1054 content: "";
1055 // height と aspect-ratio はインラインボックスには効かないため、明示的に
1056 // 非インラインにする。Swiper 側のボタンが display:flex なので現状は
1057 // フレックスアイテムとして blockify され結果的に効いているが、それに
1058 // 依存すると Swiper のボタンのスタイルが変わった時に静かに矢印が消える。
1059 //This pseudo-element needs a non-inline display for height / aspect-ratio to
1060 //apply. Swiper's own button is display:flex, so it is blockified as a flex item
1061 //today — relying on that would silently drop the arrow if Swiper changes it.
1062 display: block;
1063 height: $swiper-arrow-height;
1064 aspect-ratio: 11 / 20; //注�
1065 �される SVG の viewBox と同じ比率
1066 background-color: currentColor;
1067 -webkit-mask: url($swiper-arrow-icon) no-repeat center / contain;
1068 mask: url($swiper-arrow-icon) no-repeat center / contain;
1069 }
1070
1071 // Keep arrows fixed at the bottom on all devices.
1072 //�
1073 �デバイスで矢印を下部固定
1074 &.swiper-button-always-bottom {
1075 top: unset;
1076 bottom: $swiper-edge-offset-var;
1077 }
1078 }
1079
1080 // The prev arrow reuses the same icon, rotated 180 degrees. It sits outside the
1081 // `.swiper-button-next, .swiper-button-prev` nest above on purpose, because the rotation must
1082 // apply to the prev arrow only — inside that nest the declaration would reach both arrows and
1083 // point the next arrow backwards. (Writing it there as `&.swiper-button-prev` would scope it
1084 // correctly but also emit a `.swiper-button-next.swiper-button-prev` branch that no element
1085 // can match: harmless, yet dead output that reads as if such an element existed.)
1086 //prev は同じアイコンを 180 度回して使う。上の `.swiper-button-next, .swiper-button-prev` の
1087 //ネストの外に置くのは、この回転を prev だけに効かせる�
1088 要があるため。ネスト�
1089 に書くと
1090 //next にも掛かり、next の矢印が逆向きになってしまう。
1091 //(ネスト�
1092 で `&.swiper-button-prev` と書けば対象は正しく絞れるが、どの要素にも一致しない
1093 //`.swiper-button-next.swiper-button-prev` の分岐まで出力される。害は無いものの、
1094 //そういう要素が存在するかのように読める死んだ出力が残る。)
1095 .swiper-button-prev:where(:empty)::after {
1096 transform: rotate(180deg);
1097 }
1098 }
1099
1100 //vk_slider用の自動再生 停止/再生ボタン
1101 //矢印ボタンと同じ見た目で、ページネーションや矢印と干渉しにくい右上に�
1102 �置する
1103 .vk_slider,
1104 .vk_post_list_slider {
1105 .swiper-pause-button {
1106 position: absolute;
1107 top: $swiper-edge-offset-var;
1108 right: $swiper-edge-offset-var;
1109 left: auto;
1110 z-index: 20;
1111 display: flex;
1112 align-items: center;
1113 justify-content: center;
1114 width: $swiper-nav-size;
1115 height: $swiper-nav-size;
1116 padding: 0;
1117 border: none;
1118 cursor: pointer;
1119 // 矢印と同じ理由でフォールバックを付ける(上の .swiper-button-next / -prev のコメント参�
1120 �)。
1121 //Same fallback as the arrows — see the comment on .swiper-button-next / -prev above.
1122 color: var(--vk-color-text-body, #333);
1123 background-color: var(--vk-color-background-white-translucent);
1124 border-radius: var(--vk-size-radius);
1125
1126 // 矢印ボタンと同じく、見た目は変えずに当たり判定だけ 44px 角にする
1127 @include vk-slider-touch-target;
1128
1129 // bullets・矢印と同じフォーカスリング。
1130 @include vk-slider-focus-ring;
1131
1132 .vk_slider_pauseButton_icon {
1133 width: $swiper-arrow-height;
1134 height: $swiper-arrow-height;
1135 fill: currentColor;
1136 }
1137 //再生中(既定)は停止アイコンのみ表示し、再生アイコンは隠す
1138 .vk_slider_pauseButton_icon-play {
1139 display: none;
1140 }
1141 //停止中は再生アイコンを表示し、停止アイコンを隠す
1142 &.is-paused {
1143 .vk_slider_pauseButton_icon-pause {
1144 display: none;
1145 }
1146 .vk_slider_pauseButton_icon-play {
1147 display: block;
1148 }
1149 }
1150 }
1151 }
1152
1153 // vk_width-full を出力していた頃(〜1.34.1)の保存済みコンテンツ向けの互換ルール。
1154 // 起点は Swiper 由来の旧クラス .swiper-container ではなく、当時から一貫して付いている
1155 // .vk_slider にする(新しい保存出力からは .swiper-container を削除したため / #3069)。
1156 // Compatibility rule for content saved back when vk_width-full was emitted (up to 1.34.1).
1157 // It is anchored on .vk_slider — present in every version — instead of Swiper's legacy
1158 // .swiper-container class, which the current save output no longer emits (#3069).
1159 .vk_slider.vk_width-full {
1160 //�
1161 ��
1162 の時
1163 margin: 0 calc(50% - 50vw);
1164 width: 100vw;
1165 }
1166
1167 // Slides
1168 // -----------------------------------------------------------------------------
1169 // Slides are laid out as a column box so that inner blocks stack and stay vertically
1170 // centered regardless of how tall the slide content is.
1171 //スライドの中身の高さに関わらずインナーブロックが縦に積まれ上下中央に収まるよう、縦方向のボックスにする。
1172 .swiper-slide {
1173 height: auto; //100%だとおかしくなるのでautoに
1174 font-size: 18px;
1175 display: flex;
1176 align-items: center;
1177 flex-direction: column;
1178 }
1179
1180 // Pagination (bullets)
1181 // =============================================================================
1182 // The old selectors were anchored on .swiper-container-horizontal, which Swiper renamed
1183 // in v8, so they had stopped matching. They are re-anchored on the block's own class
1184 // instead of the new .swiper-horizontal because Swiper is never initialized vertically
1185 // here (no direction option is passed) and, in the block editor, Swiper is initialized on
1186 // an inner element so .swiper-horizontal never lands on the block root itself.
1187 //旧セレクタは Swiper が v8 でリネームした .swiper-container-horizontal を起点にしていたため不発だった。
1188 //新クラス .swiper-horizontal ではなくブロック自身のクラスを起点にするのは、direction オプションを
1189 //渡しておらず縦スライダーが存在しないことと、ブロックエディタでは Swiper が�
1190 側の要素に初期化されるため
1191 //.swiper-horizontal がブロックのルート自体には付かないため。
1192
1193 // The conditions that mean "the arrows sit at the bottom", kept in one place. The clearance
1194 // and the bullet shrink that pays for it must always match; splitting these apart is what
1195 // previously left always-bottom with the clearance but not the smaller bullets.
1196 //「矢印が下部にある」という条件を 1 箇所にまとめる。クリアランスと、その分を取り戻すための
1197 //bullet 縮小は常に一致していなければならず、これを別�
1198 に書いたことが
1199 //always-bottom にクリアランスだけ効いて bullet が縮まない不�
1200 �合の原因だった。
1201 // Each variable stays a single selector — the comma lives inside :has(), which takes a
1202 // relative selector list — so they behave the same wherever they are interpolated. A
1203 // top-level comma would silently split the compound selector when used outside :where().
1204 //カンマは相対セレクタリストを取れる :has() の�
1205 側に置き、各変数を単一セレクタに保つ。
1206 //トップレベルにカンマがあると :where() の外で使ったときにセレクタが分割され、
1207 //`.vk_slider` が外れた条件が黙って過剰マッチしてしまう。
1208 // These are always interpolated inside :where(), which IS forgiving: on a browser without
1209 // :has() support the unknown :has() is dropped from the list and :where() ends up empty, so
1210 // the rule stays valid but matches nothing. The clearance and the bullet shrink therefore
1211 // never apply one without the other — the pagination simply keeps the layout it had before
1212 // this change, which is the same kind of safe degradation as the @property note further up.
1213 // Note that it is :where() providing this, not :has(): taking :where() off would make the
1214 // whole selector invalid instead.
1215 //これらは�
1216 ず forgiving な `:where()` の�
1217 側に補間する。`:has()` 非対応ブラウザでは
1218 //未知の `:has()` がリストから捨てられて `:where()` が空になるため、ルール自体は有効なまま
1219 //どの要素にも一致しない。そのため左右クリアランスと bullet 縮小が片方だけ適用されることはなく、
1220 //ページネーションはこの変更前と同じレイアウトのまま残る(上の @property の注記と同じく安�
1221 �に劣化する)。
1222 //この安�
1223 �な劣化を�
1224 保しているのは `:has()` ではなく `:where()` である点に注意。`:where()` を
1225 //外すとセレクタ�
1226 �体が無効になる。
1227 //:has() が使えるのは Chrome / Edge 105 以降・Safari 15.4 以降・Firefox 121 以降。
1228 $swiper-nav-mobile-bottom-class: ".swiper-button-mobile-bottom";
1229 $swiper-nav-always-bottom-class: ".swiper-button-always-bottom";
1230 $swiper-nav-mobile-bottom: ":has(> #{$swiper-nav-mobile-bottom-class})";
1231 $swiper-nav-always-bottom: ":has(> #{$swiper-nav-always-bottom-class})";
1232 $swiper-nav-bottom-any: ":has(> #{$swiper-nav-mobile-bottom-class}, > #{$swiper-nav-always-bottom-class})";
1233
1234 // Side clearance so the bullets do not run underneath the arrow buttons.
1235 // Only applied when the arrows are actually at the bottom, i.e. on the same row as the
1236 // bullets. Reserving it unconditionally would waste roughly 100px even when the arrows are
1237 // hidden or vertically centered, which noticeably reduces how many bullets fit on mobile.
1238 //矢印ボタンの下に bullets が潜り込まないようにするための左右の余白。
1239 //矢印が実際に下部にある(=bullets と同じ高さに並ぶ)時だけ適用する。
1240 //無条件に確保すると、矢印が無い(hide)・上下中央(center)の時にも約100px を消費してしまい、
1241 //特にモバイルで並べられる bullets の枚数が無駄に減るため。
1242 @mixin vk-slider-pagination-arrow-clearance {
1243 // Derived from the arrow's actual geometry so it cannot drift: the edge offset, plus the
1244 // distance to the arrow's centre, plus half of whatever is wider — the painted button or
1245 // its 44px pointer target. Reserving only the painted width let the invisible hit area
1246 // (z-index 20, above the pagination) swallow the first bullet's taps: with the previous
1247 // `2.4rem + 0.8rem` that happened whenever the root font-size was below 16px, the default
1248 // 16px sitting exactly on the boundary with zero margin. With a 16px root this evaluates
1249 // to the same 51.2px as before, so nothing moves in the default case.
1250 // Note that from a root font-size of about 18.3px upwards the painted button is the wider
1251 // of the two, so the clearance lands exactly on the painted button's edge and the visible
1252 // gap between the arrow and the first bullet becomes zero. Measured against the hit area
1253 // the clearance always lands exactly on its inner edge, at any root size — that is the
1254 // intended contract; only the visible gap is at stake here. An explicit spacing term would
1255 // restore it but would also move the default 51.2px, so keeping the default untouched wins.
1256 //矢印の実際の座標から導出してずれないようにする。端オフセット+矢印中心までの距離+
1257 //「描画ボックスと 44px のポインタターゲットのうち大きい方」の半分。描画�
1258 だけを確保すると、
1259 //不可視の当たり判定(z-index 20 で pagination の上)が�
1260 �頭 bullet のタップを奪ってしまう。
1261 //従来の `2.4rem + 0.8rem` ではルート font-size が 16px 未満のとき常にこれが起き、
1262 //既定の 16px はちょうど余裕ゼロの境界だった。ルート 16px では従来と同じ 51.2px になるため、
1263 //既定の見た目は変わらない。
1264 //なおルート font-size が約 18.3px 以上になると描画ボックスの方が大きくなるため、
1265 //クリアランスが描画ボックスの端そのものと一致し、矢印と�
1266 �頭 bullet の**見た目の**隙間が
1267 //0 になる。当たり判定を基準にすればクリアランスはどのルート値でも常にその�
1268 端と一致し、
1269 //そちらが�
1270 保したい契約(既定の 16px でも接している)。ここで問題にしているのは
1271 //見た目の隙間だけ。式に明示的な間隔�
1272 を足せば解消できるが既定の 51.2px が動いてしまうため、
1273 //既定を変えないことを優�
1274 �している。
1275 $clearance: calc(
1276 #{$swiper-edge-offset-var} + #{$swiper-nav-size * 0.5} +
1277 max(#{$swiper-nav-size}, #{$swiper-touch-target}) * 0.5
1278 );
1279
1280 padding-left: $clearance;
1281 padding-right: $clearance;
1282 box-sizing: border-box; //他のFSEテーマではみ出るので追加
1283 }
1284
1285 // The rules below (clearance, bullet gap, mobile bullet size) apply to .vk_slider only. The
1286 // Post List Slider (Pro) lays its pagination out with position: inherit, i.e. in the normal
1287 // flow underneath the slides rather than overlaying them, so the layout it starts from is a
1288 // different one. The old selector had been dead since Swiper v8, so leaving the Pro block out
1289 // keeps it rendering as it does today. #3069
1290 //
1291 // Do NOT read this as "the arrows and the bullets can never overlap on Pro". They can, and in
1292 // the default configuration they do: Pro's navigationPosition defaults to mobile-bottom, so on
1293 // mobile its arrows are absolutely positioned at bottom: 0 and land on the same row as the
1294 // bullets in the normal flow. Measured at 375px with the defaults, the prev arrow's 44px
1295 // pointer target covers the leftmost 3.7px of the first bullet (30px wide), and
1296 // elementFromPoint there returns the arrow because the arrows are z-index 20 against the
1297 // pagination's 10. The remaining 26.3px of the bullet still takes the tap. The overlap predates
1298 // this change (the painted 38.4px button already covered 0.89px); widening the pointer target
1299 // to 44px added 2.8px. Pro is left out because that residual overlap is judged acceptable, not
1300 // because it is structurally impossible.
1301 //以下のルール(クリアランス・bullet の間隔・モバイルの bullet �
1302 )は .vk_slider だけに限定する。
1303 //投稿リストスライダー(Pro)は pagination を position: inherit で通常フロー(スライドの下)に
1304 //置くため、出発点となる�
1305 �置構造が異なる。旧セレクタは Swiper v8 以降ずっと不発だったため、
1306 //Pro を対象外にすることで現状の表示を一切変えずに済む。#3069
1307 //
1308 //これを「Pro では矢印と bullets が重なり得ない」と読まないこと。既定の設定では実際に重なる。
1309 //Pro の navigationPosition の既定値は mobile-bottom なので、モバイルでは矢印が bottom: 0 の
1310 //絶対�
1311 �置になり、通常フローにある bullets 行と同じ高さに来る。既定設定・375px で実測すると、
1312 //前矢印の 44px のポインタターゲットが�
1313 �頭 bullet(�
1314 30px)の左端 3.7px を覆い、その点の
1315 //elementFromPoint は矢印を返す(矢印が z-index 20、pagination が 10 のため)。bullet の残り
1316 //26.3px はタップを受け取れる。重なり自体はこの変更以前からあり(描画ボックス 38.4px の時点で
1317 //0.89px)、ポインタターゲットを 44px に広げたぶん 2.8px 増えた。Pro を対象外にしているのは
1318 //構造的に起こり得ないからではなく、この残りの重なりを許容できると判断したためである。
1319
1320 // Everything below is scoped to the block's own pagination element (`> .swiper-pagination-bullets`)
1321 // rather than to .vk_slider itself. A slider item can hold arbitrary inner blocks, including a
1322 // Post List Slider (Pro): declaring the custom property on .vk_slider would let it inherit into
1323 // that nested pagination, and a descendant bullet selector would match its bullets too.
1324 //以下はすべて .vk_slider 自身ではなく、そのブロック直下の pagination 要素
1325 //(`> .swiper-pagination-bullets`)を起点にする。スライドの中には任意のインナーブロック、
1326 //たとえば投稿リストスライダー(Pro)も�
1327 �れられるため、カスタムプロパティを .vk_slider に
1328 //置くと�
1329 �れ子の pagination まで継承され、bullet の子孫セレクタも�
1330 �れ子側に当たってしまう。
1331 .vk_slider > .swiper-pagination-bullets {
1332 // The bullet gap is set through Swiper's own custom property instead of overriding
1333 // its margin rule, so no direction class (.swiper-horizontal) has to be matched.
1334 //bullet の間隔は Swiper の margin ルールを上書きせず、Swiper 自身のカスタムプロパティで指定する。
1335 //これにより方向クラス(.swiper-horizontal)を起点にする�
1336 要が無くなる。
1337 --swiper-pagination-bullet-horizontal-gap: 5px;
1338
1339 // Keeps the default position relationship with the arrows when the shared edge offset is
1340 // raised (the two are never level — the arrows are 38.4px tall at 10px from the edge, the
1341 // bullets 5px tall at 8px; what is preserved is that 2px difference at the bottom), so the
1342 // arrows do not end up above the bullet row. Stays at Swiper's default 8px otherwise.
1343 // How the variable maps onto each control: the arrows and the pause/play button take it as
1344 // their distance from the edge directly, while the pagination follows it from its own
1345 // default position, and only upwards — the max() further up clamps the downward direction
1346 // at that default. Unlike the side clearance, the follow is not limited to the bottom
1347 // arrow positions: what moves the pagination is the requested distance from the edge, not
1348 // where the arrows happen to be. With hide / center there is simply no arrow on that row
1349 // to line up with, and the bullets still honour the offset.
1350 //�
1351 �通の端オフセットを上げた時に、矢印との既定の位置関係を保つ(両�
1352 の高さが揃うわけではない。
1353 //矢印は端から 10px・高さ 38.4px、bullets は 8px・高さ 5px で、維持されるのは下端の 2px 差)。
1354 //これにより矢印が bullet 列の上に来ることを防ぐ。それ以外の場合は Swiper 既定の 8px のまま。
1355 //この変数が各コントロールに効く形は同じではない。矢印と停止/再生ボタンは端からの距離を
1356 //そのまま指定するが、ページネーションは自身の既定位置を基準に「上げたぶんだけ」追従する
1357 //(下方向は上の max() で既定位置を下限にクランプ)。
1358 //左右のクリアランスと違って矢印が下部にある場合に限定していないのは、ページネーションを
1359 //動かしているのが矢印の位置ではなく「端からの距離」の指定だから。hide / center では
1360 //同じ行に揃える矢印が無いだけで、指定された端からの距離は bullets にも同じように効かせる。
1361 --swiper-pagination-bottom: #{$swiper-pagination-bullets-bottom-var};
1362
1363 // The painted bar is only 5px tall, so a finger that is a few pixels off vertically misses
1364 // it — and on mobile the bar is narrowed to 20px on top of that. This gives it an invisible
1365 // target 24px tall (WCAG 2.2 SC 2.5.8 Target Size Minimum). Only the height grows: widening
1366 // it would eat into the neighbouring bullet's target and into the clearance reserved for the
1367 // arrows, which is the very thing the narrowing pays for. Height alone leaves the painted
1368 // size and the number of bullets that fit on one line exactly as they are.
1369 // Scoped to this block's own pagination like the rules above, so the Post List Slider (Pro)
1370 // keeps its current target — Pro lays its pagination out in the normal flow, where a taller
1371 // target would reach into the content above and below instead of into the slide.
1372 //描画されるバーは高さ 5px しかないため、指が縦に数 px ずれるだけで外れる(モバイルではさらに
1373 //�
1374 20px に縮んでいる)。ここで高さ 24px の不可視ターゲットを与える
1375 //(WCAG 2.2 SC 2.5.8 Target Size Minimum)。広げるのは高さだけ。横に広げると隣の bullet の
1376 //ターゲットと、矢印のために空けたクリアランス(バーを縮めてまで確保したもの)を侵食する。
1377 //高さだけなら描画サイズも 1 行に並ぶ枚数もそのままで済む。
1378 //
1379 // How SC 2.5.8 is met depends on the pointer, not on the width — this target only exists
1380 // where a coarse pointer is available (see the media query below), so there are two paths:
1381 // - With a coarse pointer: 30x24 on PC (meets the 24x24 minimum outright) and 20x24 on
1382 // mobile, where the narrowed bar falls back to the spacing exception (bullet 20px +
1383 // 4px gap on each side = 28px between centres).
1384 // - Mouse-only devices: no target is generated, so the bullet stays at its painted
1385 // 30x5 and passes solely through the spacing exception (30px + 5px gap on each side
1386 // = 40px between centres).
1387 // Either way the spacing exception is what the narrow cases rest on, and it requires at
1388 // least 24px between centres. Narrowing the bar or the gap further would drop it.
1389 // Watch the arrow side before the neighbouring bullet: on mobile the clearance puts the
1390 // first bullet's centre at 65.2px, so the left edge of its 24px circle sits at 53.2px —
1391 // only 2px clear of the arrow's 44px target (inner edge 51.2px). Tightening the clearance
1392 // formula or the mobile gap breaks the exception here first, not between the bullets.
1393 //注意すべきは隣の bullet より�
1394 �に矢印側。モバイルではクリアランスにより�
1395 �頭 bullet の
1396 //中心が 65.2px になり、その 24px 円の左端は 53.2px = 矢印の 44px ターゲットの�
1397
1398 //(51.2px)との余裕は 2px しかない。クリアランスの式やモバイルの gap を詰めると、
1399 //bullet 同士より�
1400 �にこちら側で例外が外れる。
1401 //SC 2.5.8 の満たし方は�
1402 ではなくポインタで変わる。このターゲットは粗いポインタがある環境に
1403 //しか存在しない(下のメディアクエリ)ため、経路は 2 つある。
1404 // - 粗いポインタあり: PC は 30x24 で 24x24 の最小サイズを直接満たす。モバイルはバーが
1405 // 20px に縮むため 20x24 となり、間隔例外で成立する
1406 // (bullet 20px + 左右 4px ずつの gap = 中心間 28px)。
1407 // - マウスのみの環境: ターゲットは生成されないので bullet は描画どおりの 30x5 で、
1408 // 間隔例外だけで成立する(bullet 30px + 左右 5px ずつの gap = 中心間 40px)。
1409 //いずれの狭いケースも拠り所は間隔例外で、中心間 24px 以上が�
1410 要。
1411 //バーや gap をこれ以上詰めると、その例外から外れる。
1412 //上のルールと同じくこのブロック直下の pagination に限定し、投稿リストスライダー(Pro)は
1413 //現状のターゲットを維持する。Pro は pagination を通常フローに置くため、縦に広げると
1414 //スライドではなく前後のコンテンツへ食い込むからである。
1415 //
1416 // Limited to devices that have a coarse pointer available. The bullet is positioned and
1417 // keeps pointer-events: auto inside a pagination that has them off, and that pagination
1418 // carries Swiper's own z-index: 10 (the bullet itself resolves to z-index: auto), so this
1419 // target sits in front of whatever the slide puts under it — on a mouse-only device that
1420 // just takes clicks away, since the benefit (absorbing vertical finger drift) does not
1421 // apply to a precise pointer. SC 2.5.8 is likewise about low-precision input.
1422 // `any-pointer` rather than `pointer`: the latter describes only the *primary* pointer, so a
1423 // touch-capable laptop reports `pointer: fine` and would lose the target for finger input
1424 // even though the screen is being touched. `any-pointer: coarse` matches whenever *some*
1425 // coarse pointer exists, which is exactly the condition this target is for.
1426 //粗いポインタを持つ環境に限定する。bullet は positioned で、pointer-events を切った
1427 //pagination の中で auto を保つ。その pagination に Swiper 自身が z-index: 10 を付けている
1428 //ため(bullet 自身は z-index: auto)、このターゲットはスライド側に置かれたものより手前に
1429 //来る。マウスしか無い環境では「指の縦ブレを吸収する」という恩恵が無く、クリックを奪う
1430 //副作用だけが残る。SC 2.5.8 が想定しているのも精度の低い�
1431 �力である。
1432 //`pointer` ではなく `any-pointer` を使うのは、前�
1433 **ポインタしか表さないため。
1434 //タッチ対応のノート PC は `pointer: fine` を返すので、画面を指で操作していてもターゲットが
1435 //効かなくなる。`any-pointer: coarse` は粗いポインタが 1 つでもあれば一致し、
1436 //これがまさにこのターゲットを出したい条件になる。
1437 @media (any-pointer: coarse) {
1438 > .swiper-pagination-bullet {
1439 position: relative;
1440
1441 &::before {
1442 content: "";
1443 position: absolute;
1444 top: 50%;
1445 left: 0;
1446 transform: translateY(-50%);
1447 width: 100%;
1448 height: 24px;
1449 }
1450 }
1451 }
1452 }
1453
1454 // always-bottom は�
1455 �デバイスで矢印が下部
1456 .vk_slider:where(#{$swiper-nav-always-bottom}) > .swiper-pagination-bullets {
1457 @include vk-slider-pagination-arrow-clearance;
1458 }
1459
1460 @media (max-width: 575.98px) {
1461 // mobile-bottom(既定)はモバイル�
1462 でのみ矢印が下部
1463 .vk_slider:where(#{$swiper-nav-mobile-bottom}) > .swiper-pagination-bullets {
1464 @include vk-slider-pagination-arrow-clearance;
1465 }
1466
1467 // Applied under the same condition as the clearance — both bottom positions, since the
1468 // clearance is what costs the space. Reserving it costs horizontal space, which reduces
1469 // how many bullets fit on one line — on a 375px screen it would drop from 8 to 6, and once
1470 // they wrap they overlap the slide and the rows sit too close together to keep the
1471 // WCAG 2.1 SC 2.5.8 spacing exception. Slightly smaller bullets on mobile keep the
1472 // count at least at what it was before the clearance started applying. Without arrows at
1473 // the bottom (hide / center) there is no clearance, so the bullets stay at their normal 30px.
1474 // (Swiper's dynamicBullets would remove wrapping entirely, but it scales inactive
1475 // bullets to .33 — fine for round dots, unusable for these 30x5 bars.)
1476 //クリアランスと同じ条件(下部�
1477 �置の 2 種類)で適用する。横�
1478 を消費しているのは
1479 //クリアランスだからである。クリアランスを確保すると 1 行に並べられる bullets の枚数が減る
1480 //(375px �
1481 で 8枚→6枚)。折り返すとスライドに重なるうえ、行間が詰まって
1482 //WCAG 2.1 SC 2.5.8 の間隔例外も成立しなくなる。モバイルでは bullet を少し小さくして、
1483 //クリアランスが効く前と同等以上の枚数を維持する。矢印が下部に無い(hide / center)場合は
1484 //クリアランス自体が無いので bullet は通常の 30px のままにする。
1485 //(Swiper の dynamicBullets なら折り返し自体が無くなるが、非アクティブな bullet を
1486 // scale(.33) で縮小する仕様のため、円形ドットならともかく 30x5 のバーでは破綻する)
1487 .vk_slider:where(#{$swiper-nav-bottom-any}) > .swiper-pagination-bullets {
1488 --swiper-pagination-bullet-horizontal-gap: 4px;
1489
1490 > .swiper-pagination-bullet {
1491 width: 20px;
1492 }
1493 }
1494 }
1495 //pagination
1496 .swiper-pagination{
1497 pointer-events: none;
1498 //標準
1499 &-bullet{
1500 border-radius: unset;
1501 width: 30px;
1502 height: 5px;
1503 background-color: #ccc;
1504 opacity: unset;
1505 outline: 1px solid var(--vk-color-background-white-translucent);
1506 pointer-events: auto;
1507 &-active {
1508 background: #666;
1509 }
1510
1511 // Swiper marks clickable bullets with role="button" and tabindex="0", so they are
1512 // keyboard focusable. The permanent translucent outline above would otherwise hide
1513 // the focus indicator, so an explicit focus ring is required (WCAG 2.1 SC 2.4.7).
1514 // The ring itself is shared with the arrows and the pause/play button so that every
1515 // control in the widget shows focus the same way (see vk-slider-focus-ring).
1516 //Swiper はクリック可能な bullet に role="button" と tabindex="0" を付けるためキーボードで
1517 //フォーカスできる。上の常時 outline がフォーカス表示を潰してしまうため、明示的に
1518 //フォーカスリングを指定する(WCAG 2.1 SC 2.4.7)。リング自体は矢印・停止/再生ボタンと
1519 //�
1520 �有し、ウィジェット�
1521 のどのコントロールでもフォーカス表示が同じになるようにしている
1522 //(vk-slider-focus-ring を参�
1523 �)。
1524 @include vk-slider-focus-ring;
1525 }
1526 //標準以外(スライドの枚数)
1527 &.swiper-pagination-fraction:not(.swiper-pagination-bullets){
1528 width: auto;
1529 left: 50%;
1530 transform: translateX(-50%);
1531 background: var(--vk-color-background-white-translucent);
1532 padding: 0.4rem 1.5rem;
1533 border-radius: 30px;
1534 bottom: $swiper-pagination-fraction-bottom;
1535 }
1536 }
1537
1538 // The counter follows the shared edge offset only on the main slider, so it does not stay
1539 // behind when the arrows move away from the bottom edge. It is deliberately not applied to
1540 // the Post List Slider (Pro): that block lays its pagination out in the normal flow
1541 // (position: inherit), so moving `bottom` would push the counter into the slides instead of
1542 // away from the edge — the same reason the side clearance and the bullet variables above are
1543 // scoped to .vk_slider.
1544 //枚数表示の端オフセット追従は本体スライダーだけに限定する。矢印が下端から離れた時に
1545 //枚数表示だけ取り残されないようにするためのもので、投稿リストスライダー(Pro)は
1546 //pagination を通常フロー(position: inherit)に置くため bottom を動かすと端から離れるのではなく
1547 //スライド側へ食い込んでしまう。上のクリアランスや bullet 用の変数を .vk_slider 限定に
1548 //しているのと同じ理由。
1549 // :not() は詳細度を上げないよう :where() で�
1550 む。基底ルールと同じ (0,3,0) になるため、
1551 // ソース順の後勝ちで効かせる(基底ルールはこの上にある)。
1552 .vk_slider > .swiper-pagination.swiper-pagination-fraction:where(:not(.swiper-pagination-bullets)) {
1553 bottom: #{$swiper-pagination-fraction-bottom-var};
1554 }
1555
1556 // 矢印ボタン モバイルは下部。
1557 // 起点を .vk_slider に限定する。投稿リストスライダー(Pro)はモバイルでの下部位置を
1558 // 自前の style.scss(bottom: 0)で決めており、こちらは対象外。無起点のままだと
1559 // Pro にも一致してしまい、Pro 側の指定が消えた時に黙って端オフセットへ追従し始める
1560 // (=always-bottom で実際に起きた不整合と同じ形)。
1561 // Anchored on .vk_slider: the Post List Slider (Pro) decides its own mobile bottom
1562 // position in its style.scss (bottom: 0). Without an anchor this also matches Pro, so
1563 // removing Pro's own rule would silently make it follow the edge offset instead — the
1564 // same kind of mismatch that actually happened with always-bottom.
1565 @media (max-width: 575.98px) {
1566 .vk_slider {
1567 .swiper-button-next,
1568 .swiper-button-prev {
1569 &.swiper-button-mobile-bottom {
1570 top: unset;
1571 bottom: $swiper-edge-offset-var;
1572 }
1573 }
1574 }
1575
1576 // 投稿リストスライダー(Pro)は always-bottom でもモバイル�
1577 では下端ベタ付き
1578 // (bottom: 0)を維持する。PC・タブレット�
1579 は上の�
1580 �有ルールの端オフセットに従う。
1581 // このルールは以前 Pro の style.scss にあったが、�
1582 �有ルールと詳細度が同じ (0,3,0) で
1583 // 別ファイルとして読み込まれるため順序で勝敗が決まり、実際には�
1584 �有ルールが後勝ちして
1585 // モバイルでも 10px になっていた(mobile-bottom と位置が揃わない)。�
1586 �有ルールと
1587 // 同じファイルでソース順を後ろにすることで、読み込み順に依存せず�
1588 ず効く。#3069
1589 // The Post List Slider (Pro) keeps its arrows flush with the bottom edge on mobile even
1590 // with always-bottom; PC / tablet follow the shared edge offset above. This lived in Pro's
1591 // style.scss, but it has the same specificity (0,3,0) as the shared rule and shipped in a
1592 // separate file, so load order decided the winner — the shared rule won and mobile stayed
1593 // at 10px, out of line with mobile-bottom. Keeping it in the same file as the shared rule
1594 // lets source order settle it, independent of load order. #3069
1595 .vk_post_list_slider {
1596 .swiper-button-next,
1597 .swiper-button-prev {
1598 &.swiper-button-always-bottom {
1599 bottom: 0;
1600 }
1601 }
1602 }
1603 }
1604
1605 /*-------------------------------------------*/
1606 /* col-xxl
1607 /*-------------------------------------------*/
1608 $xxl-min: 1400px;
1609 .col {
1610 // Bootstrap4 では xxl サイズがないので独自に追加
1611 @media (min-width: $xxl-min) {
1612 &-xxl-2 {
1613 flex: 0 0 16.66667%;
1614 max-width: 16.66667%;
1615 }
1616 &-xxl-3 {
1617 flex: 0 0 25%;
1618 max-width: 25%;
1619 }
1620 &-xxl-4 {
1621 flex: 0 0 33.33333%;
1622 max-width: 33.33333%;
1623 }
1624 &-xxl-6 {
1625 flex: 0 0 50%;
1626 max-width: 50%;
1627 }
1628 &-xxl-12 {
1629 flex: 0 0 100%;
1630 max-width: 100%;
1631 }
1632 }
1633 }
1634
1635 /*-------------------------------------------*/
1636 /* カラム
1637 /*-------------------------------------------*/
1638 .wp-block-columns {
1639 /* カラムの方向 */
1640 &.wp-block-columns.is-vk-row-reverse {
1641 flex-direction: row-reverse;
1642 }
1643 }
1644