Blame view

src/styles/components/tabs.less 5.2 KB
17f52abf   梁灏   update Tabs
1
2
3
4
5
6
7
8
9
10
11
12
13
  @tabs-prefix-cls: ~"@{css-prefix}tabs";
  
  .@{tabs-prefix-cls} {
      box-sizing: border-box;
      position: relative;
      overflow: hidden;
      color: @text-color;
      .clearfix;
  
      &-bar {
          outline: none;
      }
  
2bfebe0c   chenhaodong   fix
14
      /*wynn*/
17f52abf   梁灏   update Tabs
15
16
17
      &-ink-bar {
          height: 2px;
          box-sizing: border-box;
36b9106f   wynn   ui
18
          background-color: @mew-common-color;
17f52abf   梁灏   update Tabs
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
          position: absolute;
          left: 0;
          bottom: 1px;
          z-index: 1;
          transition: transform .3s @ease-in-out;
          transform-origin: 0 0;
      }
  
      &-bar {
          border-bottom: 1px solid @border-color-base;
          margin-bottom: 16px;
      }
  
      &-nav-container {
          margin-bottom: -1px;
          line-height: @line-height-base;
          font-size: @font-size-base;
          box-sizing: border-box;
          white-space: nowrap;
          overflow: hidden;
          position: relative;
          .clearfix;
      }
  
7be1069a   Sergio Crisostomo   Add tab navigatio...
43
44
45
46
47
48
49
      &-nav-container:focus {
          outline: none;
          .@{tabs-prefix-cls}-tab-focused {
              border-color: @link-hover-color !important;
          }
      }
  
17f52abf   梁灏   update Tabs
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
      &-nav-container-scrolling {
          padding-left: 32px;
          padding-right: 32px;
      }
  
      &-nav-wrap {
          overflow: hidden;
          margin-bottom: -1px;
      }
  
      &-nav-scroll {
          overflow: hidden;
          white-space: nowrap;
      }
  
c4eb5dcf   H   tabs组件导航区添加右侧slot...
65
66
      &-nav-right{
          float: right;
be3fbd24   marxy   Tabs add scroll
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
          margin-left: 5px;
      }
  
      &-nav-prev{
          position:absolute;
          line-height: 32px;
          cursor: pointer;
          left:0;
      }
  
      &-nav-next{
          position:absolute;
          line-height: 32px;
          cursor: pointer;
          right:0;
      }
  
      &-nav-scrollable{
          padding: 0 12px;
      }
  
      &-nav-scroll-disabled{
          display: none;
c4eb5dcf   H   tabs组件导航区添加右侧slot...
90
91
      }
  
17f52abf   梁灏   update Tabs
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
      &-nav {
          padding-left: 0;
          margin: 0;
          float: left;
          list-style: none;
          box-sizing: border-box;
          position: relative;
          transition: transform 0.5s @ease-in-out;
  
          &:before,
          &:after {
              display: table;
              content: " ";
          }
  
          &:after {
              clear: both;
          }
  
          .@{tabs-prefix-cls}-tab-disabled {
              pointer-events: none;
              cursor: default;
              color: #ccc;
          }
  
          .@{tabs-prefix-cls}-tab {
              display: inline-block;
              height: 100%;
              padding: 8px 16px;
              margin-right: 16px;
              box-sizing: border-box;
              cursor: pointer;
              text-decoration: none;
              position: relative;
              transition: color .3s @ease-in-out;
  
2bfebe0c   chenhaodong   fix
128
              /*wynn*/
17f52abf   梁灏   update Tabs
129
              &:hover {
36b9106f   wynn   ui
130
                  color: @mew-common-color;
17f52abf   梁灏   update Tabs
131
132
133
              }
  
              &:active {
36b9106f   wynn   ui
134
                  color: @mew-common-color;
17f52abf   梁灏   update Tabs
135
136
137
138
139
140
141
142
              }
              .@{css-prefix-iconfont} {
                  width: 14px;
                  height: 14px;
                  margin-right: 8px;
              }
          }
  
2bfebe0c   chenhaodong   fix
143
          /*wynn*/
17f52abf   梁灏   update Tabs
144
          .@{tabs-prefix-cls}-tab-active {
36b9106f   wynn   ui
145
              color: @mew-common-color;
17f52abf   梁灏   update Tabs
146
147
148
149
150
151
152
153
154
          }
      }
      &-mini &-nav-container {
          font-size: @font-size-base;
      }
  
      &-mini &-tab {
          margin-right: 0;
          padding: 8px 16px;
9fc59aa6   梁灏   update Tabs
155
          font-size: @font-size-small;
17f52abf   梁灏   update Tabs
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
      }
  
      & {
          .@{tabs-prefix-cls}-content-animated {
              display: flex;
              flex-direction: row;
              will-change: transform;
              transition: transform .3s @ease-in-out;
          }
  
          .@{tabs-prefix-cls}-tabpane {
              flex-shrink: 0;
              width: 100%;
              transition: opacity .3s;
              opacity: 1;
7be1069a   Sergio Crisostomo   Add tab navigatio...
171
              outline: none;
17f52abf   梁灏   update Tabs
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
          }
  
          .@{tabs-prefix-cls}-tabpane-inactive {
              opacity: 0;
              height: 0;
          }
      }
  
      // card style
      &&-card > &-bar &-nav-container {
          height: 32px;
      }
      &&-card > &-bar &-ink-bar {
          visibility: hidden;
      }
      &&-card > &-bar &-tab {
          margin: 0;
          margin-right: 4px;
          height: 31px;
          padding: 5px 16px 4px;
          border: 1px solid @border-color-base;
          border-bottom: 0;
          border-radius: @btn-border-radius @btn-border-radius 0 0;
          transition: all 0.3s @ease-in-out;
          background: @table-thead-bg;
      }
      &&-card > &-bar &-tab-active {
          height: 32px;
          padding-bottom: 5px;
          background: #fff;
          transform: translateZ(0);
          border-color: @border-color-base;
          color: @primary-color;
      }
      &&-card > &-bar &-nav-wrap {
          margin-bottom: 0;
      }
383e96a8   梁灏   Tabs add global s...
209
      &&-card > &-bar &-tab &-close {
17f52abf   梁灏   update Tabs
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
          width: 0;
          height: 22px;
          font-size: 22px;
          margin-right: 0;
          color: @legend-color;
          text-align: right;
          vertical-align: middle;
          overflow: hidden;
          position: relative;
          top: -1px;
          transform-origin: 100% 50%;
          transition: all 0.3s @ease-in-out;
          &:hover {
              color: #444;
          }
      }
  
383e96a8   梁灏   Tabs add global s...
227
228
      &&-card > &-bar &-tab-active &-close,
      &&-card > &-bar &-tab:hover &-close {
34981e5c   梁灏   update Tabs style
229
          width: 22px;
17f52abf   梁灏   update Tabs
230
          transform: translateZ(0);
34981e5c   梁灏   update Tabs style
231
          margin-right: -6px;
17f52abf   梁灏   update Tabs
232
233
234
235
      }
  }
  
  .@{tabs-prefix-cls}-no-animation{
2e7b3df4   Rijn   Restrict no-anima...
236
      > .@{tabs-prefix-cls}-content {
77bafb31   梁灏   update Tabs
237
          transform: none!important;
17f52abf   梁灏   update Tabs
238
239
240
241
242
  
          > .@{tabs-prefix-cls}-tabpane-inactive {
              display: none;
          }
      }
7be1069a   Sergio Crisostomo   Add tab navigatio...
243
  }