_base.scss
79 lines
| 1 | /*-------------------------------------------*/ |
| 2 | /* スクロールヒント - � |
| 3 | �通ベーススタイル |
| 4 | /*-------------------------------------------*/ |
| 5 | @mixin scrollable-block-scroll-hint { |
| 6 | display: block; |
| 7 | text-align: right; |
| 8 | font-size: .85rem; |
| 9 | &:has(i:last-of-type ) { |
| 10 | margin-right: 3px; |
| 11 | } |
| 12 | i { |
| 13 | margin: 0; |
| 14 | &:first-of-type { |
| 15 | animation: shake-left 1.5s ease-in-out infinite; |
| 16 | } |
| 17 | &:last-of-type { |
| 18 | animation: shake-right 1.5s ease-in-out infinite; |
| 19 | } |
| 20 | // 視覚過敏対策: prefers-reduced-motionでアニメーションを停止 |
| 21 | @media (prefers-reduced-motion: reduce) { |
| 22 | animation: none; |
| 23 | } |
| 24 | } |
| 25 | /* 横揺れアニメーションの定義 */ |
| 26 | @keyframes shake-left { |
| 27 | 0% { transform: translateX(0); } |
| 28 | 50% { transform: translateX(-3px); } |
| 29 | 100% { transform: translateX(0); } |
| 30 | } |
| 31 | @keyframes shake-right { |
| 32 | 0% { transform: translateX(0); } |
| 33 | 50% { transform: translateX(3px); } |
| 34 | 100% { transform: translateX(0); } |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | .vk-scroll-hint { |
| 39 | display: none; |
| 40 | |
| 41 | // ブレークポイントの定義 |
| 42 | $breakpoints: ( |
| 43 | 'mobile': 575.98px, |
| 44 | 'tablet': 991.98px, |
| 45 | 'pc': null, // PCはメディアクエリなし |
| 46 | ); |
| 47 | |
| 48 | // ブロックタイプの定義 |
| 49 | $block-types: 'table', 'group'; |
| 50 | |
| 51 | // 各ブロックタイプとブレークポイントの組み合わせを生成 |
| 52 | @each $block-type in $block-types { |
| 53 | @each $breakpoint-name, $max-width in $breakpoints { |
| 54 | $attr-value: '#{$block-type}-scrollable-#{$breakpoint-name}'; |
| 55 | |
| 56 | &[data-scroll-breakpoint="#{$attr-value}"]="#{$attr-value}""] { |
| 57 | @if $max-width { |
| 58 | @media (max-width: $max-width) { |
| 59 | @include scrollable-block-scroll-hint; |
| 60 | } |
| 61 | } @else { |
| 62 | @include scrollable-block-scroll-hint; |
| 63 | } |
| 64 | } |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | + * { |
| 69 | margin-top: 0; |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | .editor-styles-wrapper { |
| 74 | .vk-scroll-hint { |
| 75 | @include scrollable-block-scroll-hint; |
| 76 | } |
| 77 | } |
| 78 | |
| 79 |