deprecated
2 weeks ago
block.json
20 hours ago
component.js
2 weeks ago
edit.js
20 hours ago
icon.svg
2 months ago
index.js
2 weeks ago
index.php
2 months ago
save.js
2 weeks ago
style.scss
2 weeks ago
transforms.js
2 months ago
style.scss
462 lines
| 1 | $vk-color-secondary: #6c757d; |
| 2 | $vk-color-success: #28a745; |
| 3 | $vk-color-info:#17a2b8; |
| 4 | $vk-color-warning:#ffc107; |
| 5 | $vk-color-danger: #dc3545; |
| 6 | $vk-color-light:#f8f9fa; |
| 7 | $vk-color-dark:#343a40; |
| 8 | |
| 9 | $xs-max: 575.98px; |
| 10 | $sm-max: 767.98px; |
| 11 | $md-max: 991.98px; |
| 12 | $lg-max: 1199.98px; |
| 13 | $xl-max: 1399.98px; |
| 14 | |
| 15 | $sm-min: 576px; |
| 16 | $md-min: 768px; |
| 17 | $lg-min: 992px; |
| 18 | $xl-min: 1200px; |
| 19 | $xxl-min: 1400px; |
| 20 | |
| 21 | // theme.json があるとコアに a:where(:not(.wp-element-button)) { text-decoration: underline; } が� |
| 22 | �るため打ち消し |
| 23 | a.vk_button_link { |
| 24 | text-decoration: none; |
| 25 | } |
| 26 | :root, |
| 27 | :root .editor-styles-wrapper { |
| 28 | .has-vk-color-primary-background-color, |
| 29 | .has-undefined-background-color { |
| 30 | // has-vk-color-primary-background-colorクラスはデフォルトで設定される。Lightning以外のテーマに対応するため代替値を設定 |
| 31 | background-color: var(--wp--preset--color--vk-color-primary,#337ab7); |
| 32 | } |
| 33 | .has-vk-color-secondary-background-color { |
| 34 | background-color: $vk-color-secondary; |
| 35 | } |
| 36 | .has-vk-color-success-background-color { |
| 37 | background-color: $vk-color-success; |
| 38 | } |
| 39 | .has-vk-color-info-background-color { |
| 40 | background-color: $vk-color-info; |
| 41 | } |
| 42 | .has-vk-color-warning-background-color { |
| 43 | background-color: $vk-color-warning; |
| 44 | } |
| 45 | // https://getbootstrap.jp/docs/5.0/components/buttons/ |
| 46 | .has-vk-color-danger-background-color { |
| 47 | background-color: $vk-color-danger; |
| 48 | } |
| 49 | .has-vk-color-light-background-color { |
| 50 | background-color: $vk-color-light; |
| 51 | } |
| 52 | .has-vk-color-dark-background-color { |
| 53 | background-color: $vk-color-dark; |
| 54 | } |
| 55 | .has-vk-color-primary-color { |
| 56 | color: var(--wp--preset--color--vk-color-primary); |
| 57 | } |
| 58 | .has-vk-color-secondary-color { |
| 59 | color: $vk-color-secondary; |
| 60 | } |
| 61 | .has-vk-color-success-color { |
| 62 | color: $vk-color-success; |
| 63 | } |
| 64 | .has-vk-color-info-color { |
| 65 | color: $vk-color-info; |
| 66 | } |
| 67 | .has-vk-color-warning-color { |
| 68 | color: $vk-color-warning; |
| 69 | } |
| 70 | .has-vk-color-danger-color { |
| 71 | color: $vk-color-danger; |
| 72 | } |
| 73 | .has-vk-color-light-color { |
| 74 | color: $vk-color-light; |
| 75 | } |
| 76 | .has-vk-color-dark-color { |
| 77 | color: $vk-color-dark; |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | .vk_button, |
| 82 | .editor-styles-wrapper .vk_button { |
| 83 | box-sizing: border-box; |
| 84 | /* 他テーマで0だと左寄せになる場合があるのでautoに変更 */ |
| 85 | /* → いやいや、vk_button が100% div じゃない時にそれでは右寄せなど効かなくなるので margin 左右は指定ナシに戻し */ |
| 86 | margin-top:0; |
| 87 | margin-bottom:5px; |
| 88 | text-align: center; /* テキストのみの時のセンター揃え */ |
| 89 | &-color-custom { |
| 90 | a:hover { |
| 91 | opacity: 0.8; |
| 92 | box-shadow: 0 0 0 0.2rem rgba(171, 184, 195, 0.25); |
| 93 | } |
| 94 | .vk_button_link-type-text:hover { |
| 95 | box-shadow: none; |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | @media (max-width: $xs-max) { |
| 100 | &[class*="vk_button-width-mobile-"]*="vk_button-width-mobile-""]{ |
| 101 | .vk_button_link { |
| 102 | display: block; |
| 103 | min-width: 50px; |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | &-width-mobile { |
| 108 | &-25 { |
| 109 | width: calc( 25% - 8px ); |
| 110 | } |
| 111 | &-50 { |
| 112 | width: calc( 50% - 8px ); |
| 113 | } |
| 114 | &-75 { |
| 115 | width: calc( 75% - 8px ); |
| 116 | } |
| 117 | &-100 { |
| 118 | width: 100%; |
| 119 | } |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | @media (min-width: $sm-min) and (max-width: $md-max) { |
| 124 | &[class*="vk_button-width-tablet-"]*="vk_button-width-tablet-""] { |
| 125 | .vk_button_link { |
| 126 | display: block; |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | &-width-tablet { |
| 131 | &-25 { |
| 132 | width: calc(25% - 8px); |
| 133 | } |
| 134 | |
| 135 | &-50 { |
| 136 | width: calc(50% - 8px); |
| 137 | } |
| 138 | |
| 139 | &-75 { |
| 140 | width: calc(75% - 8px); |
| 141 | } |
| 142 | |
| 143 | &-100 { |
| 144 | width: 100%; |
| 145 | } |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | @media (min-width: $lg-min) { |
| 150 | &[class*="vk_button-width-"]*="vk_button-width-""] { |
| 151 | .vk_button_link { |
| 152 | display: block; |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | &-width { |
| 157 | &-25 { |
| 158 | width: calc(25% - 8px); |
| 159 | } |
| 160 | |
| 161 | &-50 { |
| 162 | width: calc(50% - 8px); |
| 163 | } |
| 164 | |
| 165 | &-75 { |
| 166 | width: calc(75% - 8px); |
| 167 | } |
| 168 | |
| 169 | &-100 { |
| 170 | width: 100%; |
| 171 | } |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | // 塗り |
| 176 | .btn.has-background:not(.has-text-color) { |
| 177 | color: #fff; |
| 178 | /* 白っぽい色に対する対策 */ |
| 179 | &.has-vk-color-light-background-color, // https://getbootstrap.jp/docs/5.0/components/buttons/ |
| 180 | &.has-white-background-color { |
| 181 | color:#212529; |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | // アウトラインボタン(背景なし)の場合(.btnを含めるとカスタムカラーの 背景塗りなし:hover で背景が文字色と同じになる) |
| 186 | .has-text-color.is-style-outline { |
| 187 | background-color: transparent; |
| 188 | border: 1px solid currentColor; |
| 189 | &:hover { |
| 190 | /* 応急処置:規定カラー */ |
| 191 | &.has-vk-color-primary-color { |
| 192 | background-color: var(--wp--preset--color--vk-color-primary); |
| 193 | } |
| 194 | &.has-vk-color-secondary-color { |
| 195 | background-color: $vk-color-secondary; |
| 196 | } |
| 197 | &.has-vk-color-success-color { |
| 198 | background-color: $vk-color-success; |
| 199 | } |
| 200 | &.has-vk-color-info-color { |
| 201 | background-color: $vk-color-info; |
| 202 | } |
| 203 | &.has-vk-color-warning-color { |
| 204 | background-color: $vk-color-warning; |
| 205 | } |
| 206 | &.has-vk-color-danger-color { |
| 207 | background-color: $vk-color-danger; |
| 208 | } |
| 209 | &.has-vk-color-light-color { |
| 210 | background-color: $vk-color-light; |
| 211 | } |
| 212 | &.has-vk-color-dark-color { |
| 213 | background-color: $vk-color-dark; |
| 214 | } |
| 215 | /* 応急処置:カラーパレットコア */ |
| 216 | &.has-black-color { |
| 217 | background-color: #000000; |
| 218 | } |
| 219 | &.has-cyan-bluish-gray-color { |
| 220 | background-color: #abb8c3; |
| 221 | } |
| 222 | &.has-white-color { |
| 223 | background-color: #ffffff; |
| 224 | } |
| 225 | &.has-pale-pink-color { |
| 226 | background-color: #f78da7; |
| 227 | } |
| 228 | &.has-vivid-red-color { |
| 229 | background-color: #cf2e2e; |
| 230 | } |
| 231 | &.has-luminous-vivid-orange-color { |
| 232 | background-color: #ff6900; |
| 233 | } |
| 234 | &.has-luminous-vivid-amber-color { |
| 235 | background-color: #fcb900; |
| 236 | } |
| 237 | &.has-light-green-cyan-color { |
| 238 | background-color: #7bdcb5; |
| 239 | } |
| 240 | &.has-vivid-green-cyan-color { |
| 241 | background-color: #00d084; |
| 242 | } |
| 243 | &.has-pale-cyan-blue-color { |
| 244 | background-color: #8ed1fc; |
| 245 | } |
| 246 | &.has-vivid-cyan-blue-color { |
| 247 | background-color: #0693e3; |
| 248 | } |
| 249 | &.has-vivid-purple-color { |
| 250 | background-color: #9b51e0; |
| 251 | } |
| 252 | /* 応急処置:カラーパレットVK */ |
| 253 | &.has-vk-color-primary-color { |
| 254 | background-color: var(--wp--preset--color--vk-color-primary); |
| 255 | } |
| 256 | &.has-vk-color-primary-dark-color { |
| 257 | background-color: var(--wp--preset--color--vk-color-primary-dark); |
| 258 | } |
| 259 | &.has-vk-color-primary-vivid-color { |
| 260 | background-color: var(--wp--preset--color--vk-color-primary-vivid); |
| 261 | } |
| 262 | &.has-vk-color-custom-1-color { |
| 263 | background-color: var(--wp--preset--color--vk-color-custom-1); |
| 264 | } |
| 265 | &.has-vk-color-custom-2-color { |
| 266 | background-color: var(--wp--preset--color--vk-color-custom-2); |
| 267 | } |
| 268 | &.has-vk-color-custom-3-color { |
| 269 | background-color: var(--wp--preset--color--vk-color-custom-3); |
| 270 | } |
| 271 | &.has-vk-color-custom-4-color { |
| 272 | background-color: var(--wp--preset--color--vk-color-custom-4); |
| 273 | } |
| 274 | &.has-vk-color-custom-5-color { |
| 275 | background-color: var(--wp--preset--color--vk-color-custom-5); |
| 276 | } |
| 277 | // ここから標準� |
| 278 | 備 |
| 279 | // background-color: currentColor; |
| 280 | border: 1px solid #fff; |
| 281 | .vk_button_link_before, |
| 282 | .vk_button_link_txt, |
| 283 | .vk_button_link_after, |
| 284 | .vk_button_link_subCaption { |
| 285 | color: #fff; |
| 286 | } |
| 287 | /* 白っぽい色に対する対策 */ |
| 288 | &.has-vk-color-light-color .vk_button_link_before, |
| 289 | &.has-vk-color-light-color .vk_button_link_txt, |
| 290 | &.has-vk-color-light-color .vk_button_link_after, |
| 291 | &.has-vk-color-light-color .vk_button_link_subCaption, |
| 292 | &.has-white-color .vk_button_link_before, |
| 293 | &.has-white-color .vk_button_link_txt, |
| 294 | &.has-white-color .vk_button_link_after, |
| 295 | &.has-white-color .vk_button_link_subCaption { |
| 296 | color:#212529; |
| 297 | } |
| 298 | } |
| 299 | } |
| 300 | |
| 301 | // テキストのみ |
| 302 | .has-text-color.vk_button_link-type-text { |
| 303 | &:hover{ |
| 304 | opacity: unset; |
| 305 | .vk_button_link_txt, |
| 306 | .vk_button_link_subCaption { |
| 307 | text-decoration: underline; |
| 308 | text-decoration-style: dotted; |
| 309 | text-underline-offset:2px; |
| 310 | text-decoration-color:currentColor; |
| 311 | text-decoration-thickness: 1px; |
| 312 | } |
| 313 | } |
| 314 | } |
| 315 | |
| 316 | //� |
| 317 | �る |
| 318 | &.is-style-shine { |
| 319 | |
| 320 | // � |
| 321 | �るボタン |
| 322 | @keyframes shine {//� |
| 323 | �る速さのキーフレーム |
| 324 | 0% { left: -40%; } |
| 325 | 10% { left: 120%; } |
| 326 | 100% { left: 120%; } |
| 327 | } |
| 328 | |
| 329 | .btn.has-background { |
| 330 | // テキスト色が� |
| 331 | �ってない場合は白にしたいので追加 |
| 332 | &:not(.has-text-color){ |
| 333 | color: #fff; |
| 334 | } |
| 335 | |
| 336 | overflow:hidden; |
| 337 | position: relative; |
| 338 | &::before { // � |
| 339 | �りの擬似要素 |
| 340 | content: ''; |
| 341 | position: absolute; |
| 342 | top: 0; |
| 343 | left: -40%; |
| 344 | width: 50%; |
| 345 | height: 100%; |
| 346 | background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,.3) 100%); |
| 347 | transform: skewX(-25deg); |
| 348 | /* アニメーション */ |
| 349 | animation-name: shine; |
| 350 | animation-duration: 3s; |
| 351 | animation-timing-function: ease-in-out; |
| 352 | animation-iteration-count: infinite;//無制限に繰り返し |
| 353 | } |
| 354 | /* 白っぽい色に対する対策 */ |
| 355 | &.has-vk-color-light-background-color, |
| 356 | &.has-white-background-color { |
| 357 | color:#212529; |
| 358 | } |
| 359 | } |
| 360 | } |
| 361 | |
| 362 | &.vk_button-align { |
| 363 | &-left { |
| 364 | text-align: left; |
| 365 | } |
| 366 | |
| 367 | &-center { |
| 368 | text-align: center; |
| 369 | } |
| 370 | |
| 371 | &-right { |
| 372 | text-align: right; |
| 373 | } |
| 374 | |
| 375 | &-block { |
| 376 | display: block; |
| 377 | .vk_button_link { |
| 378 | width:100%; |
| 379 | } |
| 380 | } |
| 381 | &-wide { |
| 382 | display: block; |
| 383 | margin-left: auto; |
| 384 | margin-right: auto; |
| 385 | width: 100%; |
| 386 | max-width: 70%; |
| 387 | .vk_button_btn, |
| 388 | .btn { |
| 389 | display: block; |
| 390 | } |
| 391 | } |
| 392 | } |
| 393 | |
| 394 | .vk_button_link { |
| 395 | min-width: 100px; |
| 396 | min-height: 25px; |
| 397 | box-sizing: border-box; |
| 398 | &-type-text { |
| 399 | box-shadow: none; |
| 400 | padding: 0; |
| 401 | &:hover { |
| 402 | background: none; |
| 403 | box-shadow: none; |
| 404 | } |
| 405 | } |
| 406 | |
| 407 | &.btn { |
| 408 | // .btn指定がないと編集画面で標準の .btn の指定に負ける |
| 409 | // X-T9で .has-background に対して padding:0; 指定しているので、左右余白が 0 にならないように上書き |
| 410 | padding: 0.6em 1.5rem; |
| 411 | user-select: text; |
| 412 | text-decoration: none; |
| 413 | font-size: calc( 1rem * 1 ); |
| 414 | |
| 415 | |
| 416 | } |
| 417 | &.btn-xl { |
| 418 | font-size: calc( 1rem * 1.5 ); |
| 419 | } |
| 420 | &.btn-lg{ |
| 421 | font-size:calc( 1rem * 1.25 ); |
| 422 | } |
| 423 | &.btn-sm { |
| 424 | font-size: calc( 1rem * .875 ); |
| 425 | } |
| 426 | &.btn-xs { |
| 427 | font-size: calc( 1rem * .75 ); |
| 428 | } |
| 429 | // アイコンとテキストの間隔は固定値 (0.7rem) を採用。 |
| 430 | // font-size に追従させる em 単位は将来検討の余地あり。 |
| 431 | &_before { |
| 432 | margin-right: 0.7rem; |
| 433 | } |
| 434 | |
| 435 | &_after { |
| 436 | margin-left: 0.7rem; |
| 437 | } |
| 438 | |
| 439 | &_caption { |
| 440 | word-break: initial; // FireFox で tt5 の場合カラム� |
| 441 | でテキストが段落ちするので初期値にリセット |
| 442 | display: inline-flex; |
| 443 | align-items: center; |
| 444 | justify-content: center; |
| 445 | .vk_button_link_after { |
| 446 | margin-right: 0; |
| 447 | } |
| 448 | } |
| 449 | |
| 450 | &_subCaption { |
| 451 | display: block; |
| 452 | overflow: hidden; |
| 453 | margin: 0; |
| 454 | font-size: 80%; |
| 455 | } |
| 456 | } |
| 457 | |
| 458 | .editor-rich-text { |
| 459 | // Font Awesomeアイコンが管理画面側で改行されないために inline-block を指定 |
| 460 | display: inline-block; |
| 461 | } |
| 462 | } |