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