Blame view

src/styles/components/menu.less 5.57 KB
e05d7289   梁灏   update Menu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  @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;
  
      &-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
32
33
34
35
36
37
38
39
40
41
42
          &.@{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
43
                  z-index: 1;
e05d7289   梁灏   update Menu
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
              }
          }
      }
  
      &-light{
          background: #fff;
      }
      &-dark{
          background: @title-color;
      }
      &-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
67
      }
0acdae19   梁灏   update Menu
68
69
70
71
72
73
74
      &-item > i{
          margin-right: 6px;
      }
      &-submenu-title > i, &-submenu-title span > i{
          margin-right: 8px;
      }
  
e05d7289   梁灏   update Menu
75
76
77
78
79
80
81
      &-horizontal &-item,
      &-horizontal &-submenu
      {
          float: left;
          padding: 0 20px;
          position: relative;
          cursor: pointer;
0acdae19   梁灏   update Menu
82
          z-index: 3;
e05d7289   梁灏   update Menu
83
84
85
86
87
88
89
          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
90
          color: @text-color;
e05d7289   梁灏   update Menu
91
92
93
94
95
96
          &-active, &:hover{
              color: @primary-color;
              border-bottom: 2px solid @primary-color;
          }
      }
  
0acdae19   梁灏   update Menu
97
98
      &-dark&-horizontal &-item, &-dark&-horizontal &-submenu{
          color: @subsidiary-color;
e05d7289   梁灏   update Menu
99
100
101
102
103
          &-active, &:hover{
              color: #fff;
          }
      }
  
0acdae19   梁灏   update Menu
104
105
      &-primary&-horizontal &-item, &-primary&-horizontal &-submenu{
          color: #fff;
e05d7289   梁灏   update Menu
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
          &-active, &:hover{
              background: @link-active-color;
          }
      }
  
      &-horizontal &-submenu .@{select-dropdown-prefix-cls} {
          width: 100%;
          .@{menu-prefix-cls}-item{
              height: auto;
              line-height: normal;
              border-bottom: 0;
              float: none;
          }
      }
  
      &-item-group{
          line-height: normal;
          &-title {
f9d87766   梁灏   update Menu
124
125
              height: 30px;
              line-height: 30px;
e05d7289   梁灏   update Menu
126
              padding-left: 8px;
0acdae19   梁灏   update Menu
127
              font-size: @font-size-small;
e05d7289   梁灏   update Menu
128
              color: @legend-color;
fc3ffbe0   梁灏   publish 0.9.10-rc-2
129
130
131
132
133
          }
  
          & > ul{
              padding: 0 !important;
              list-style: none !important;
e05d7289   梁灏   update Menu
134
135
          }
      }
0acdae19   梁灏   update Menu
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
  
      // vertical
      &-vertical &-item,
      &-vertical &-submenu-title
      {
          padding: 14px 24px;
          position: relative;
          cursor: pointer;
          z-index: 1;
          transition: all @transition-time @ease-in-out;
  
          &:hover{
              background: @background-color-select-hover;
          }
      }
  
      &-vertical &-submenu-title-icon{
          float: right;
          position: relative;
          top: 4px;
      }
      &-submenu-title-icon {
          transition: transform @transition-time @ease-in-out;
      }
      &-opened &-submenu-title-icon{
          transform: rotate(180deg);
      }
  
      &-vertical &-submenu &-item{
          padding-left: 43px;
      }
      &-vertical &-item-group{
          &-title{
f9d87766   梁灏   update Menu
169
170
              height: 48px;
              line-height: 48px;
0acdae19   梁灏   update Menu
171
172
173
174
              font-size: @font-size-base;
              padding-left: 28px;
          }
      }
21cc957a   梁灏   update Menu
175
176
177
178
179
      &-dark&-vertical &-item-group{
          &-title{
              color: @text-color;
          }
      }
0acdae19   梁灏   update Menu
180
181
182
183
184
185
186
187
188
  
      &-light&-vertical &-item{
          border-right: 2px solid transparent;
          &-active:not(.@{menu-prefix-cls}-submenu){
              color: @primary-color;
              border-right: 2px solid @primary-color;
              z-index: 2;
          }
      }
21cc957a   梁灏   update Menu
189
190
191
  
      &-dark&-vertical &-item, &-dark&-vertical &-submenu-title{
          color: @subsidiary-color;
fc3ffbe0   梁灏   publish 0.9.10-rc-2
192
193
194
          &-active:not(.@{menu-prefix-cls}-submenu),
          &-active:not(.@{menu-prefix-cls}-submenu):hover
          {
21cc957a   梁灏   update Menu
195
196
              background: @menu-dark-active-bg;
          }
fc3ffbe0   梁灏   publish 0.9.10-rc-2
197
198
199
200
          &:hover{
              color: #fff;
              background: @title-color;
          }
21cc957a   梁灏   update Menu
201
202
203
204
205
206
207
          &-active:not(.@{menu-prefix-cls}-submenu){
              color: @primary-color;
              border-right: 2px solid @primary-color;
          }
      }
      &-dark&-vertical &-submenu &-item{
          &:hover{
fd5cd823   梁灏   publish 0.9.10-rc-1
208
              color: #fff;
fc3ffbe0   梁灏   publish 0.9.10-rc-2
209
              background: transparent !important;
21cc957a   梁灏   update Menu
210
          }
fc3ffbe0   梁灏   publish 0.9.10-rc-2
211
          &-active,&-active:hover{
21cc957a   梁灏   update Menu
212
213
              border-right: none;
              color: #fff;
fc3ffbe0   梁灏   publish 0.9.10-rc-2
214
              background: @primary-color !important;
21cc957a   梁灏   update Menu
215
216
          }
      }
fc3ffbe0   梁灏   publish 0.9.10-rc-2
217
218
219
      &-dark&-vertical &-item-active &-submenu-title{
          color: #fff;
      }
21cc957a   梁灏   update Menu
220
221
222
  
      &-dark&-vertical &-opened{
          background: @menu-dark-active-bg;
fc3ffbe0   梁灏   publish 0.9.10-rc-2
223
224
225
          .@{menu-prefix-cls}-submenu-title{
              background: @title-color;
          }
21cc957a   梁灏   update Menu
226
      }
e05d7289   梁灏   update Menu
227
  }
f9d87766   梁灏   update Menu
228
229
230
231
232
233
  .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;
  }