|
1 | 1 | <template> |
2 | | - <div> |
3 | | - <el-row :class="[tabStyle, 'tabs-container p-16']"> |
| 2 | + <div class="container"> |
| 3 | + <el-row :class="[tabStyle, 'tabs-container']"> |
4 | 4 | <el-col class="tabs-column"> |
5 | 5 | <span :class="[tabStyle, 'link-container']" v-for="tab in tabs" :key="tab.label"> |
6 | 6 | <!-- Expect this to be either nuxt-link or router-link --> |
|
29 | 29 | </span> |
30 | 30 | </el-col> |
31 | 31 | </el-row> |
32 | | - <div class="content px-16 pb-16"> |
| 32 | + <div class="content"> |
33 | 33 | <slot /> |
34 | 34 | </div> |
35 | 35 | </div> |
@@ -84,65 +84,57 @@ export default { |
84 | 84 |
|
85 | 85 | <style lang="scss" scoped> |
86 | 86 | @import '../../../assets/_variables.scss'; |
| 87 | +.container { |
| 88 | + width: fit-content; |
| 89 | + min-width: 100%; |
| 90 | + display: table; |
| 91 | +} |
| 92 | +
|
87 | 93 | .tab-link { |
88 | 94 | text-decoration: none; |
89 | 95 | flex-wrap: nowrap; |
90 | 96 | cursor: pointer; |
91 | 97 | &.style1, &.style3 { |
92 | | - border-bottom: 2px solid $lineColor1; |
| 98 | + border-bottom: .125em solid $lineColor1; |
93 | 99 | } |
94 | 100 | &.style1, &.style2 { |
95 | 101 | margin-right: 2rem; |
| 102 | + padding-bottom: .12em; |
96 | 103 | } |
97 | 104 | &.style3 { |
98 | 105 | margin-right: .5rem; |
| 106 | + padding-bottom: .2em; |
99 | 107 | } |
100 | 108 | &:hover, &.active { |
101 | 109 | &.style1, &.style3 { |
102 | | - border-bottom: 2px solid $purple; |
| 110 | + border-bottom: .125em solid $purple; |
103 | 111 | color: $purple; |
104 | 112 | font-weight: 500; |
105 | 113 | } |
106 | 114 | &.style2 { |
107 | | - border-bottom: 2px solid white; |
| 115 | + border-bottom: .125em solid white; |
108 | 116 | font-weight: 500; |
109 | 117 | } |
110 | 118 | } |
111 | 119 | } |
112 | | -.link-container { |
113 | | - position: relative; |
114 | | -} |
115 | 120 | .tabs-column { |
116 | 121 | .link-container:last-child > .tab-link { |
117 | 122 | margin-right: 0; |
118 | 123 | } |
119 | 124 | } |
120 | | -.link-container.style1:not(:first-child):after { |
121 | | - content: ''; |
122 | | - width: 2rem; |
123 | | - display: inline-block; |
124 | | - border-bottom: 2px solid $lineColor1; |
125 | | - position: absolute; |
126 | | - left: -2rem; |
127 | | - top: 1.2rem; |
128 | | -} |
129 | | -.link-container.style3:not(:first-child):after { |
130 | | - content: ''; |
131 | | - width: .5rem; |
132 | | - display: inline-block; |
133 | | - border-bottom: 2px solid $lineColor1; |
134 | | - position: absolute; |
135 | | - left: -.5rem; |
136 | | - top: 1.125rem; |
137 | | -} |
138 | 125 | .tabs-container { |
139 | 126 | white-space: nowrap; |
140 | | - width: fit-content; |
| 127 | + display: block; |
| 128 | + &.style1, &.style3 { |
| 129 | + border-bottom: .125em solid $lineColor1; |
| 130 | + } |
141 | 131 | &.style2 { |
142 | 132 | background-color: $darkBlue; |
| 133 | + padding: 1.5rem; |
143 | 134 | } |
144 | 135 | } |
145 | 136 | .content { |
146 | | - white-space: nowrap; |
| 137 | + display: table-caption; |
| 138 | + caption-side: bottom; |
147 | 139 | } |
148 | 140 | </style> |
0 commit comments