_table.scss
99 lines
| 1 | @use 'components/scroll-hint/styles/base' as *; |
| 2 | @use 'components/scrollbar-styles/scrollbar' as *; |
| 3 | @use 'utils/breakpoints' as *; |
| 4 | |
| 5 | /*-------------------------------------------*/ |
| 6 | /* スクロールヒント - テーブルブロック用 |
| 7 | /*-------------------------------------------*/ |
| 8 | // 横スクロール |
| 9 | @mixin scrollable-table { |
| 10 | display: block; |
| 11 | overflow-x: auto; |
| 12 | -webkit-overflow-scrolling: touch; |
| 13 | |
| 14 | table { |
| 15 | table-layout: auto; |
| 16 | |
| 17 | th, td { |
| 18 | white-space: nowrap; |
| 19 | overflow: hidden; |
| 20 | text-overflow: ellipsis; |
| 21 | } |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | @mixin scrollable-table-editor { |
| 26 | overflow-x: auto; |
| 27 | -webkit-overflow-scrolling: touch; |
| 28 | |
| 29 | table { |
| 30 | table-layout: auto; |
| 31 | |
| 32 | th, td { |
| 33 | > div[role="textbox"]="textbox""] { |
| 34 | white-space: nowrap !important; |
| 35 | overflow: hidden; |
| 36 | text-overflow: ellipsis; |
| 37 | } |
| 38 | } |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | /* フロントエンド |
| 43 | /*-------------------------------------------*/ |
| 44 | .wp-block-table { |
| 45 | &.is-style-vk-table-scrollable { |
| 46 | |
| 47 | &[data-scroll-breakpoint="table-scrollable-mobile"]="table-scrollable-mobile""] { |
| 48 | @media (width < $xs) { |
| 49 | @include scrollable-table; |
| 50 | @include scrollbar-custom; |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | &[data-scroll-breakpoint="table-scrollable-tablet"]="table-scrollable-tablet""] { |
| 55 | @media (width < $md) { |
| 56 | @include scrollable-table; |
| 57 | @include scrollbar-custom; |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | &[data-scroll-breakpoint="table-scrollable-pc"]="table-scrollable-pc""] { |
| 62 | @include scrollable-table; |
| 63 | @include scrollbar-custom; |
| 64 | } |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | /* 編集画面 |
| 69 | /*-------------------------------------------*/ |
| 70 | .editor-styles-wrapper { |
| 71 | .wp-block-table { |
| 72 | &.is-style-vk-table-scrollable { |
| 73 | |
| 74 | &[data-scroll-breakpoint="table-scrollable-mobile"]="table-scrollable-mobile""] { |
| 75 | @media (width < $xs) { |
| 76 | @include scrollable-table-editor; |
| 77 | @include scrollbar-custom; |
| 78 | @include scrollbar-custom-editor-override; |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | &[data-scroll-breakpoint="table-scrollable-tablet"]="table-scrollable-tablet""] { |
| 83 | @media (width < $md) { |
| 84 | @include scrollable-table-editor; |
| 85 | @include scrollbar-custom; |
| 86 | @include scrollbar-custom-editor-override; |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | &[data-scroll-breakpoint="table-scrollable-pc"]="table-scrollable-pc""] { |
| 91 | @include scrollable-table-editor; |
| 92 | @include scrollbar-custom; |
| 93 | @include scrollbar-custom-editor-override; |
| 94 | } |
| 95 | } |
| 96 | } |
| 97 | } |
| 98 | |
| 99 |