Skip to content

Commit 0660d87

Browse files
authored
Merge pull request cryingjoker#194 from cryingjoker/newb2b
tabs renewed design + container width fix
2 parents 3ecc020 + a2ae487 commit 0660d87

File tree

4 files changed

+109
-28
lines changed

4 files changed

+109
-28
lines changed

src/example-pages/css/app.styl

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
padding-left: 100px
3434
height: 100%
3535
align-items center
36+
border-bottom-color transparent
37+
&:after
38+
display none
3639
.rt-tabs-navigation__item-name
3740
height: 48px
3841
&:before
@@ -103,6 +106,7 @@
103106
transition-timing-function ease-in-out
104107
transition-duration .3s
105108
transition-property background-color, left, right
109+
z-index 8
106110
&:hover,
107111
&:focus
108112
background-color: main-color

src/lib/components/ColorLineText/ColorLineText.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ export default {
5454
}
5555
},
5656
render(h){
57-
// let isMobile = window.innerWidth <= parseInt(variables['mobile-upper-limit']);
58-
// console.log(isMobile);
57+
5958
const icon = ()=>{
6059
return <svg
6160
class={"color-line-paragraph-icon " + this.colorLineIconClass}

src/lib/css/components/grid/index.styl

+4
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,10 @@ for devideStep in steps
468468
transition-property opacity, visibility
469469

470470
@media (max-width: tablet-upper-limit)
471+
padding-left horizontal-space * 1.5
472+
padding-right horizontal-space * 1.5
473+
474+
@media (max-width: mobile-upper-limit)
471475
padding-left horizontal-space * .5
472476
padding-right horizontal-space * .5
473477

src/lib/css/components/tabs.styl

+100-26
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
width 100%
33
font-size 18px
44
&-content
5-
border-top 1px solid main-color01
5+
//border-top 1px solid main-color01
66
.{newAppName}-row-list__item
77
padding-top vertical-space
88
padding-bottom vertical-space
@@ -65,16 +65,18 @@
6565
text-align: center
6666
.{newAppName}-tabs-navigation-wrapper
6767
display: inline-block
68-
border-bottom 1px solid main-color01
68+
//border-bottom 1px solid main-color01
6969
height 35px
7070
@media (max-width: tablet-upper-limit)
7171
position relative
7272
width calc(100% + 40px)
7373
left -20px
7474
.{newAppName}-tabs-navigation
7575
margin-bottom 30px
76+
//display flex
77+
//justify-content center
7678
@media (max-width: tablet-upper-limit)
77-
width 100%
79+
width auto
7880
margin-left 0
7981
margin-right 0
8082
overflow-y hidden!important
@@ -84,47 +86,107 @@
8486
border-top none
8587

8688
.{newAppName}-tabs-navigation
87-
display flex
89+
display inline-flex
8890
flex-direction row
89-
width calc(100% + 20px)
90-
margin-left -(vertical-space)
91-
margin-right -(vertical-space)
91+
max-width 100% //calc(100% + 20px)
92+
//margin-left -(vertical-space)
93+
//margin-right -(vertical-space)
9294
scrollbar-width: none
95+
position relative
96+
&:after
97+
content: ''
98+
position absolute
99+
bottom 0
100+
height 2px
101+
left 0
102+
width 100%
103+
background-color b2c-cool-grey
93104
&::-webkit-scrollbar
94105
display: none
95106

96-
.rt-tabs-tablet &,
107+
.rt-tabs-tablet &
108+
//display block
109+
overflow auto
110+
//overflow-y hidden
111+
white-space nowrap
112+
padding-left 40px
113+
&:after
114+
//left 40px
115+
//right 0
116+
display none
97117
.rt-tabs-mobile &
98-
display block
118+
//display block
99119
overflow auto
100-
overflow-y hidden
120+
//overflow-y hidden
101121
white-space nowrap
102-
position relative
122+
padding-left 20px
123+
&:after
124+
//left 20px
125+
//right 0
126+
display none
103127

104128
.{newAppName}-tabs-navigation-wrapper
105129
.rt-tabs-tablet &,
106130
.rt-tabs-mobile &
107-
display block
108-
overflow hidden
109-
position relative
131+
width: 100vw
132+
left: calc((100% - 100vw)/2)
133+
position: relative
110134
&::-webkit-scrollbar
111135
display: none
112136

113137
.{newAppName}-tabs-navigation__item
114-
padding-left vertical-space
115-
padding-right vertical-space
138+
//padding-left vertical-space
139+
//padding-right vertical-space
116140
cursor pointer
141+
z-index 9
142+
&+&
143+
margin-left 40px
117144

118-
.rt-tabs-tablet &,
145+
.rt-tabs-tablet &
146+
display inline-block
147+
position relative
148+
&:last-child
149+
padding-right 40px
150+
&:after
151+
width calc(100% + 40px - 40px)
152+
&:first-child
153+
&:after
154+
width 100%
155+
left 0
156+
&:after
157+
position absolute
158+
content: ''
159+
width calc(100% + 40px)
160+
left -40px
161+
bottom 0
162+
background-color b2c-cool-grey
163+
height 2px
119164
.rt-tabs-mobile &
120165
display inline-block
166+
position relative
167+
&:last-child
168+
padding-right 20px
169+
&:after
170+
width calc(100% + 40px - 20px)
171+
&:first-child
172+
&:after
173+
width 100%
174+
left 0
175+
&:after
176+
position absolute
177+
content: ''
178+
width calc(100% + 40px)
179+
left -40px
180+
bottom 0
181+
background-color b2c-cool-grey
182+
height 2px
121183

122184
.{newAppName}-tabs-navigation__item-name
123185
box-sizing border-box
124186
text-align inherit
125187
border none
126188
outline none
127-
padding-bottom horizontal-space * .5
189+
padding-bottom 12px
128190
position relative
129191

130192
&:before
@@ -134,13 +196,14 @@
134196
text-shadow 0 0 0
135197
border-bottom 2px solid transparent
136198
position absolute
137-
bottom -1px
199+
bottom 0
138200
left 0
139201
right 0
202+
border-radius 1px
140203
transition-timing-function ease-in-out
141204
transition-duration .2s
142205
transition-property border, width, text-shadow
143-
206+
z-index 9
144207
&:hover,
145208
&:focus,
146209
.{newAppName}-tabs-navigation__item--is-active &
@@ -156,14 +219,23 @@
156219
.{newAppName}-tabs-navigation__item
157220
padding-left: 0
158221
padding-right: 0
222+
&:after
223+
display none
224+
&:last-child
225+
padding-right: 0
226+
&+.{newAppName}-tabs-navigation__item
227+
margin-left: 0
228+
border-left 2px solid b2c-purple
159229
.rt-tabs-navigation
160230
margin-left: 0
161231
margin-right: 0
232+
border-bottom none
233+
padding-left: 0
162234
.rt-tabs-navigation__item-name
163-
padding-left: 20px
164-
padding-right: 20px
165-
padding-top: 16px
166-
padding-bottom: 14px
235+
padding-left: 30px
236+
padding-right: 30px
237+
padding-top: 15px
238+
padding-bottom: 15px
167239
&:before
168240
width: 0!important
169241
&:hover,
@@ -175,14 +247,15 @@
175247
.{newAppName}-tabs-navigation-wrapper
176248
overflow: hidden
177249
display: inline-block
178-
border-radius 10px
250+
border-radius 5px
179251
border 2px solid b2c-purple
252+
left 0
253+
width auto
180254
.{newAppName}-tabs-navigation__item-name
181255
padding-left: 20px
182256
padding-right: 20px
183257
.{newAppName}-tabs-navigation__item
184258
background-color: transparent
185-
186259
&+&
187260
margin-left: -1ex
188261
.{newAppName}-tabs-navigation__item--is-active
@@ -223,3 +296,4 @@
223296
background linear-gradient(to bottom, rgba(16, 24, 40, 0), rgba(16, 24, 40, 0.23) 33%, rgba(16, 24, 40, 0.67) 63%, rgba(16, 24, 40, 0.9) 85%, #101828);
224297
.rt-card__content
225298
z-index 5
299+

0 commit comments

Comments
 (0)