Blame view

src/styles/components/menu.less 7.04 KB
e05d7289   梁灏   update Menu
1
2
3
4
5
6
7
8
9
10
11
12
  @menu-prefix-cls: ~"@{css-prefix}menu";
  @menu-dropdown-item-prefix-cls: ~"@{menu-prefix-cls}-horizontal .@{menu-prefix-cls}-submenu .@{select-dropdown-prefix-cls} .@{menu-prefix-cls}-item";
  
  .@{menu-prefix-cls} {
      display: block;
      margin: 0;
      padding: 0;
      outline: none;
      list-style: none;
      color: @text-color;
      font-size: @font-size-base;
      position: relative;
75873f90   梁灏   fixed #823
13
      z-index: @zindex-select;
e05d7289   梁灏   update Menu
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
  
      &-horizontal{
          height: 60px;
          line-height: 60px;
  
          &.@{menu-prefix-cls}-light{
              &:after{
                  content: '';
                  display: block;
                  width: 100%;
                  height: 1px;
                  background: @border-color-base;
                  position: absolute;
                  bottom: 0;
                  left: 0;
              }
          }
      }
      &-vertical{
e05d7289   梁灏   update Menu
33
34
35
36
37
38
39
40
41
42
43
          &.@{menu-prefix-cls}-light{
              &:after{
                  content: '';
                  display: block;
                  width: 1px;
                  height: 100%;
                  background: @border-color-base;
                  position: absolute;
                  top: 0;
                  bottom: 0;
                  right: 0;
0acdae19   梁灏   update Menu
44
                  z-index: 1;
e05d7289   梁灏   update Menu
45
46
47
48
49
50
51
52
              }
          }
      }
  
      &-light{
          background: #fff;
      }
      &-dark{
c0478e27   Aresn   update Menu style
53
          background: @menu-dark-title;
e05d7289   梁灏   update Menu
54
55
56
57
58
59
60
61
62
63
64
65
66
67
      }
      &-primary{
          background: @primary-color;
      }
  
      &-item{
          display: block;
          outline: none;
          list-style: none;
          font-size: @font-size-base;
          position: relative;
          z-index: 1;
          cursor: pointer;
          transition: all @transition-time @ease-in-out;
e05d7289   梁灏   update Menu
68
      }
7d0b7384   梁灏   fixed #3484
69
70
71
72
73
74
      a&-item{
          color: inherit;
          &:hover, &:active{
              color: inherit;
          }
      }
0acdae19   梁灏   update Menu
75
76
77
78
79
80
81
      &-item > i{
          margin-right: 6px;
      }
      &-submenu-title > i, &-submenu-title span > i{
          margin-right: 8px;
      }
  
e05d7289   梁灏   update Menu
82
83
84
85
86
87
88
      &-horizontal &-item,
      &-horizontal &-submenu
      {
          float: left;
          padding: 0 20px;
          position: relative;
          cursor: pointer;
0acdae19   梁灏   update Menu
89
          z-index: 3;
e05d7289   梁灏   update Menu
90
91
92
93
94
95
96
          transition: all @transition-time @ease-in-out;
      }
  
      &-light&-horizontal &-item, &-light&-horizontal &-submenu{
          height: inherit;
          line-height: inherit;
          border-bottom: 2px solid transparent;
0acdae19   梁灏   update Menu
97
          color: @text-color;
e05d7289   梁灏   update Menu
98
          &-active, &:hover{
28e7adb7   wynn   添加注释
99
              /*wynn*/
36b9106f   wynn   ui
100
101
              color: @mew-common-color;
              border-bottom: 2px solid @mew-common-color;
e05d7289   梁灏   update Menu
102
103
104
          }
      }
  
0acdae19   梁灏   update Menu
105
      &-dark&-horizontal &-item, &-dark&-horizontal &-submenu{
c0478e27   Aresn   update Menu style
106
          color: @menu-dark-subsidiary-color;
e05d7289   梁灏   update Menu
107
108
109
110
111
          &-active, &:hover{
              color: #fff;
          }
      }
  
0acdae19   梁灏   update Menu
112
113
      &-primary&-horizontal &-item, &-primary&-horizontal &-submenu{
          color: #fff;
e05d7289   梁灏   update Menu
114
          &-active, &:hover{
ae3de6ae   梁灏   fix Menu style
115
              //background: @link-active-color;
e05d7289   梁灏   update Menu
116
117
118
119
          }
      }
  
      &-horizontal &-submenu .@{select-dropdown-prefix-cls} {
cbd3591c   梁灏   fixed #131
120
121
          min-width: 100%;
          width: auto;
d31b0d47   梁灏   remove submenu ma...
122
          max-height: none;
e05d7289   梁灏   update Menu
123
124
125
126
127
128
129
130
131
132
133
          .@{menu-prefix-cls}-item{
              height: auto;
              line-height: normal;
              border-bottom: 0;
              float: none;
          }
      }
  
      &-item-group{
          line-height: normal;
          &-title {
f9d87766   梁灏   update Menu
134
135
              height: 30px;
              line-height: 30px;
e05d7289   梁灏   update Menu
136
              padding-left: 8px;
0acdae19   梁灏   update Menu
137
              font-size: @font-size-small;
e05d7289   梁灏   update Menu
138
              color: @legend-color;
fc3ffbe0   梁灏   publish 0.9.10-rc-2
139
140
141
142
143
          }
  
          & > ul{
              padding: 0 !important;
              list-style: none !important;
e05d7289   梁灏   update Menu
144
145
          }
      }
0acdae19   梁灏   update Menu
146
147
148
149
150
151
152
153
154
155
156
157
  
      // vertical
      &-vertical &-item,
      &-vertical &-submenu-title
      {
          padding: 14px 24px;
          position: relative;
          cursor: pointer;
          z-index: 1;
          transition: all @transition-time @ease-in-out;
  
          &:hover{
28e7adb7   wynn   添加注释
158
              /*wynn*/
cbaf4e23   梁灏   update Menu style
159
              //background: @background-color-select-hover;
36b9106f   wynn   ui
160
              color: @mew-common-color;
0acdae19   梁灏   update Menu
161
162
163
164
          }
      }
  
      &-vertical &-submenu-title-icon{
d082f8cc   梁灏   menu add global s...
165
166
167
168
169
170
171
172
          // #5592 支持自定义图标 size 后,换一种位置
          //float: right;
          //position: relative;
          //top: 4px;
          position: absolute;
          top: 50%;
          right: 24px;
          transform: translateY(-50%);
0acdae19   梁灏   update Menu
173
174
175
176
      }
      &-submenu-title-icon {
          transition: transform @transition-time @ease-in-out;
      }
d082f8cc   梁灏   menu add global s...
177
      &-horizontal &-opened > * > &-submenu-title-icon{
0acdae19   梁灏   update Menu
178
179
          transform: rotate(180deg);
      }
d082f8cc   梁灏   menu add global s...
180
      &-vertical &-opened > * > &-submenu-title-icon{
d082f8cc   梁灏   menu add global s...
181
      }
0acdae19   梁灏   update Menu
182
  
4bce7645   zhigang.li   make menu support...
183
184
185
186
187
188
189
190
      &-vertical &-submenu{
          &-nested{
              padding-left: 20px;
          }
          .@{menu-prefix-cls}-item{
              padding-left: 43px;
          }
      } 
0acdae19   梁灏   update Menu
191
192
      &-vertical &-item-group{
          &-title{
f9d87766   梁灏   update Menu
193
194
              height: 48px;
              line-height: 48px;
0acdae19   梁灏   update Menu
195
196
197
198
              font-size: @font-size-base;
              padding-left: 28px;
          }
      }
21cc957a   梁灏   update Menu
199
200
      &-dark&-vertical &-item-group{
          &-title{
c0478e27   Aresn   update Menu style
201
              color: @menu-dark-group-title-color;
21cc957a   梁灏   update Menu
202
203
          }
      }
0acdae19   梁灏   update Menu
204
205
  
      &-light&-vertical &-item{
cbaf4e23   梁灏   update Menu style
206
          //border-right: 2px solid transparent;
0acdae19   梁灏   update Menu
207
          &-active:not(.@{menu-prefix-cls}-submenu){
28e7adb7   wynn   添加注释
208
              /*wynn*/
36b9106f   wynn   ui
209
210
              color: @mew-common-color;
              background: ~`colorPalette("@{mew-common-color}", 1)`;
cbaf4e23   梁灏   update Menu style
211
              //border-right: 2px solid @primary-color;
0acdae19   梁灏   update Menu
212
              z-index: 2;
cbaf4e23   梁灏   update Menu style
213
214
215
216
217
218
219
220
              &:after{
                  content: '';
                  display: block;
                  width: 2px;
                  position: absolute;
                  top: 0;
                  bottom: 0;
                  right: 0;
28e7adb7   wynn   添加注释
221
                  background: @mew-common-color;/*wynn*/
cbaf4e23   梁灏   update Menu style
222
              }
0acdae19   梁灏   update Menu
223
224
          }
      }
21cc957a   梁灏   update Menu
225
226
  
      &-dark&-vertical &-item, &-dark&-vertical &-submenu-title{
28e7adb7   wynn   添加注释
227
          /*wynn*/
e601e496   wynn   fix
228
          color: @mew-black-color;
fc3ffbe0   梁灏   publish 0.9.10-rc-2
229
230
231
          &-active:not(.@{menu-prefix-cls}-submenu),
          &-active:not(.@{menu-prefix-cls}-submenu):hover
          {
36b9106f   wynn   ui
232
              background: #fff;
21cc957a   梁灏   update Menu
233
          }
fc3ffbe0   梁灏   publish 0.9.10-rc-2
234
          &:hover{
28e7adb7   wynn   添加注释
235
              /*wynn*/
36b9106f   wynn   ui
236
              color: @mew-common-color !important;
c0478e27   Aresn   update Menu style
237
              background: @menu-dark-title;
fc3ffbe0   梁灏   publish 0.9.10-rc-2
238
          }
21cc957a   梁灏   update Menu
239
          &-active:not(.@{menu-prefix-cls}-submenu){
28e7adb7   wynn   添加注释
240
              /*wynn*/
36b9106f   wynn   ui
241
              color: @mew-common-color;
7b487076   chenhaodong   fix
242
              background: #f6f6f6;
cbaf4e23   梁灏   update Menu style
243
              //border-right: 2px solid @primary-color;
21cc957a   梁灏   update Menu
244
245
246
247
          }
      }
      &-dark&-vertical &-submenu &-item{
          &:hover{
28e7adb7   wynn   添加注释
248
              /*wynn*/
36b9106f   wynn   ui
249
              color: @mew-black-color;
fc3ffbe0   梁灏   publish 0.9.10-rc-2
250
              background: transparent !important;
21cc957a   梁灏   update Menu
251
          }
fc3ffbe0   梁灏   publish 0.9.10-rc-2
252
          &-active,&-active:hover{
21cc957a   梁灏   update Menu
253
              border-right: none;
36b9106f   wynn   ui
254
255
              color: @menu-dark-group-title-color;
              background: @menu-dark-title !important;
21cc957a   梁灏   update Menu
256
257
          }
      }
4bce7645   zhigang.li   make menu support...
258
259
260
261
      // &-dark&-vertical &-item-active &-submenu-title{
      //     color: #fff;
      // }
      &-dark&-vertical &-child-item-active > &-submenu-title{
28e7adb7   wynn   添加注释
262
          /*wynn*/
e601e496   wynn   fix
263
          color: @mew-black-color;
fc3ffbe0   梁灏   publish 0.9.10-rc-2
264
      }
21cc957a   梁灏   update Menu
265
266
267
  
      &-dark&-vertical &-opened{
          background: @menu-dark-active-bg;
fc3ffbe0   梁灏   publish 0.9.10-rc-2
268
          .@{menu-prefix-cls}-submenu-title{
7b487076   chenhaodong   fix
269
              background: #f6f6f6;
fc3ffbe0   梁灏   publish 0.9.10-rc-2
270
          }
4bce7645   zhigang.li   make menu support...
271
272
273
274
275
276
  
          .@{menu-prefix-cls}-submenu-has-parent-submenu{
              .@{menu-prefix-cls}-submenu-title{
                  background: transparent;
              }
          }
21cc957a   梁灏   update Menu
277
      }
e05d7289   梁灏   update Menu
278
  }
f9d87766   梁灏   update Menu
279
280
281
282
283
284
  .select-item(@menu-prefix-cls, @menu-dropdown-item-prefix-cls);
  
  .@{menu-dropdown-item-prefix-cls} {
      padding: 7px 16px 8px;
      font-size: @font-size-base !important;
  }