|
| 1 | +.doc .tabs { |
| 2 | + margin-bottom: 1.25em; |
| 3 | +} |
| 4 | + |
| 5 | +.doc .tablist.ulist, |
| 6 | +.doc .tablist.ulist > ul, |
| 7 | +.doc .tablist.ulist > ul li { |
| 8 | + margin: 0; |
| 9 | +} |
| 10 | + |
| 11 | +.doc .tablist > ul p { |
| 12 | + line-height: inherit; |
| 13 | + margin: 0; |
| 14 | +} |
| 15 | + |
| 16 | +.tablist.ulist { |
| 17 | + @apply relative flex rounded-t border; |
| 18 | +} |
| 19 | + |
| 20 | +.tablist.ulist > ul { |
| 21 | + @apply no-scrollbar flex overflow-x-auto rounded-t motion-safe:scroll-smooth; |
| 22 | + |
| 23 | + display: flex; |
| 24 | + flex-wrap: nowrap; |
| 25 | + list-style: none; |
| 26 | + margin: 0; |
| 27 | + padding: 0; |
| 28 | +} |
| 29 | + |
| 30 | +.tablist.ulist > ul li { |
| 31 | + @apply hover:bg-level1 transition-colors; |
| 32 | + |
| 33 | + align-items: center; |
| 34 | + cursor: pointer; |
| 35 | + display: flex; |
| 36 | + padding: 0.75rem 1rem; |
| 37 | + position: relative; |
| 38 | + |
| 39 | + & > * { |
| 40 | + white-space: nowrap; |
| 41 | + } |
| 42 | + |
| 43 | + &:first-of-type { |
| 44 | + @apply rounded-tl; |
| 45 | + } |
| 46 | +} |
| 47 | + |
| 48 | +.tablist > .scroll-btn-left, |
| 49 | +.tablist > .scroll-btn-right { |
| 50 | + @apply invisible absolute opacity-0 motion-safe:transition-all; |
| 51 | + |
| 52 | + &.active { |
| 53 | + @apply visible opacity-100; |
| 54 | + } |
| 55 | +} |
| 56 | + |
| 57 | +.tablist > .scroll-btn-left { |
| 58 | + @apply left-0 rounded-tl py-3 pl-2 pr-4; |
| 59 | +} |
| 60 | + |
| 61 | +.tablist > .scroll-btn-right { |
| 62 | + @apply right-0 rounded-tr py-3 pl-4 pr-2; |
| 63 | +} |
| 64 | + |
| 65 | +html[data-theme="light"] .tablist > .scroll-btn-left { |
| 66 | + background: linear-gradient(to left, rgba(255, 255, 255, 0), rgb(255, 255, 255), rgb(255, 255, 255) 50%); |
| 67 | +} |
| 68 | + |
| 69 | +html[data-theme="dark"] .tablist > .scroll-btn-left { |
| 70 | + background: linear-gradient(to left, rgba(9, 9, 9, 0), rgb(9, 9, 9), rgb(9, 9, 9) 50%); |
| 71 | +} |
| 72 | + |
| 73 | +html[data-theme="light"] .tablist > .scroll-btn-right { |
| 74 | + background: linear-gradient(to right, rgba(255, 255, 255, 0), rgb(255, 255, 255), rgb(255, 255, 255) 50%); |
| 75 | +} |
| 76 | + |
| 77 | +html[data-theme="dark"] .tablist > .scroll-btn-right { |
| 78 | + background: linear-gradient(to right, rgba(9, 9, 9, 0), rgb(9, 9, 9), rgb(9, 9, 9) 50%); |
| 79 | +} |
| 80 | + |
| 81 | +.tabs .tablist li::after { |
| 82 | + @apply transition-colors; |
| 83 | + |
| 84 | + content: ""; |
| 85 | + display: block; |
| 86 | + height: 2px; |
| 87 | + position: absolute; |
| 88 | + bottom: 0; |
| 89 | + left: 0; |
| 90 | + right: 0; |
| 91 | +} |
| 92 | + |
| 93 | +.tabs.is-loading .tablist li:first-child::after, |
| 94 | +.tabs:not(.is-loading) .tablist li.is-selected::after { |
| 95 | + background-color: var(--ds-text-primary); |
| 96 | +} |
| 97 | + |
| 98 | +.tabs.wrapping .tablist.ulist > ul li > * { |
| 99 | + white-space: normal; |
| 100 | +} |
| 101 | + |
| 102 | +.tablist > ul li:focus-visible { |
| 103 | + outline: none; |
| 104 | +} |
| 105 | + |
| 106 | +.tabpanel { |
| 107 | + @apply bg-body rounded-b border-x border-b p-6; |
| 108 | +} |
| 109 | + |
| 110 | +.tabs.is-loading .tabpanel + .tabpanel, |
| 111 | +.tabs:not(.is-loading) .tabpanel.is-hidden { |
| 112 | + display: none; |
| 113 | +} |
| 114 | + |
| 115 | +.doc .tabpanel > :first-child { |
| 116 | + margin-top: 0; |
| 117 | + |
| 118 | + &.olist ol, |
| 119 | + &.ulist ul { |
| 120 | + margin-top: 0; |
| 121 | + |
| 122 | + & li:first-of-type { |
| 123 | + margin-top: 0; |
| 124 | + } |
| 125 | + } |
| 126 | +} |
| 127 | + |
| 128 | +.doc .tabpanel > :last-child { |
| 129 | + margin-bottom: 0; |
| 130 | + |
| 131 | + &.olist ol, |
| 132 | + &.ulist ul { |
| 133 | + margin-bottom: 0; |
| 134 | + |
| 135 | + & li:last-of-type { |
| 136 | + margin-bottom: 0; |
| 137 | + } |
| 138 | + } |
| 139 | +} |
0 commit comments