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