Commit 4cbdea0355119b04e8bfb477c4ea27a40d76a4fe
Committed by
GitHub
Merge pull request #98 from jingsam/clean-css
Clean css
Showing
35 changed files
with
104 additions
and
175 deletions
Show diff stats
build/build-style.js
1 | 1 | var gulp = require('gulp'); |
2 | -var minifyCSS = require('gulp-minify-css'); | |
2 | +var cleanCSS = require('gulp-clean-css'); | |
3 | 3 | var less = require('gulp-less'); |
4 | 4 | var rename = require('gulp-rename'); |
5 | 5 | var autoprefixer = require('gulp-autoprefixer'); |
... | ... | @@ -9,9 +9,9 @@ gulp.task('css', function () { |
9 | 9 | gulp.src('../src/styles/index.less') |
10 | 10 | .pipe(less()) |
11 | 11 | .pipe(autoprefixer({ |
12 | - browsers: ['last 2 versions'] | |
12 | + browsers: ['last 2 versions', 'ie > 8'] | |
13 | 13 | })) |
14 | - .pipe(minifyCSS()) | |
14 | + .pipe(cleanCSS()) | |
15 | 15 | .pipe(rename('iview.css')) |
16 | 16 | .pipe(gulp.dest('../dist/styles')) |
17 | 17 | }); | ... | ... |
package.json
... | ... | @@ -57,8 +57,8 @@ |
57 | 57 | "file-loader": "^0.8.5", |
58 | 58 | "gulp": "^3.9.1", |
59 | 59 | "gulp-autoprefixer": "^3.1.1", |
60 | + "gulp-clean-css": "^2.0.13", | |
60 | 61 | "gulp-less": "^3.1.0", |
61 | - "gulp-minify-css": "^1.2.4", | |
62 | 62 | "gulp-rename": "^1.2.2", |
63 | 63 | "html-loader": "^0.3.0", |
64 | 64 | "less": "^2.7.1", | ... | ... |
src/styles/common/base.less
... | ... | @@ -46,7 +46,7 @@ a { |
46 | 46 | text-decoration: none; |
47 | 47 | outline: none; |
48 | 48 | cursor: pointer; |
49 | - .transition(color @transition-time ease); | |
49 | + transition: color @transition-time ease; | |
50 | 50 | |
51 | 51 | &:hover { |
52 | 52 | color: @link-hover-color; |
... | ... | @@ -74,4 +74,4 @@ kbd, |
74 | 74 | pre, |
75 | 75 | samp { |
76 | 76 | font-family: @code-family; |
77 | -} | |
78 | 77 | \ No newline at end of file |
78 | +} | ... | ... |
src/styles/components/back-top.less
... | ... | @@ -13,8 +13,8 @@ |
13 | 13 | &-inner { |
14 | 14 | background-color: rgba(0,0,0,.6); |
15 | 15 | border-radius: 2px; |
16 | - .box-shadow(0 1px 3px rgba(0,0,0,.2)); | |
17 | - .transition(all @transition-time @ease-in-out); | |
16 | + box-shadow: 0 1px 3px rgba(0,0,0,.2); | |
17 | + transition: all @transition-time @ease-in-out; | |
18 | 18 | |
19 | 19 | &:hover { |
20 | 20 | background-color: rgba(0,0,0,.7); |
... | ... | @@ -26,4 +26,4 @@ |
26 | 26 | font-size: 24px; |
27 | 27 | padding: 8px 12px; |
28 | 28 | } |
29 | -} | |
30 | 29 | \ No newline at end of file |
30 | +} | ... | ... |
src/styles/components/badge.less
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | |
9 | 9 | &-count { |
10 | 10 | position: absolute; |
11 | - .transform(translateX(50%)); | |
11 | + transform: translateX(50%); | |
12 | 12 | top: -10px; |
13 | 13 | right: 0; |
14 | 14 | height: 20px; |
... | ... | @@ -22,9 +22,9 @@ |
22 | 22 | padding: 0 6px; |
23 | 23 | font-size: 12px; |
24 | 24 | white-space: nowrap; |
25 | - .transform-origin(-10% center); | |
25 | + transform-origin: -10% center; | |
26 | 26 | z-index: 10; |
27 | - .box-shadow(0 0 0 1px #fff); | |
27 | + box-shadow: 0 0 0 1px #fff; | |
28 | 28 | |
29 | 29 | a, |
30 | 30 | a:hover { |
... | ... | @@ -35,14 +35,14 @@ |
35 | 35 | top: auto; |
36 | 36 | display: block; |
37 | 37 | position: relative; |
38 | - .transform(translateX(0)); | |
38 | + transform: translateX(0); | |
39 | 39 | } |
40 | 40 | } |
41 | 41 | |
42 | 42 | &-dot { |
43 | 43 | position: absolute; |
44 | - .transform(translateX(-50%)); | |
45 | - .transform-origin(0 center); | |
44 | + transform: translateX(-50%); | |
45 | + transform-origin: 0 center; | |
46 | 46 | top: -4px; |
47 | 47 | right: -8px; |
48 | 48 | height: 8px; |
... | ... | @@ -50,6 +50,6 @@ |
50 | 50 | border-radius: 100%; |
51 | 51 | background: @error-color; |
52 | 52 | z-index: 10; |
53 | - .box-shadow(0 0 0 1px #fff); | |
53 | + box-shadow: 0 0 0 1px #fff; | |
54 | 54 | } |
55 | -} | |
56 | 55 | \ No newline at end of file |
56 | +} | ... | ... |
src/styles/components/button.less
... | ... | @@ -82,7 +82,7 @@ |
82 | 82 | content: ''; |
83 | 83 | border-radius: inherit; |
84 | 84 | z-index: 1; |
85 | - .transition(opacity @transition-time); | |
85 | + transition: opacity @transition-time; | |
86 | 86 | pointer-events: none; |
87 | 87 | display: none; |
88 | 88 | } |
... | ... | @@ -99,4 +99,4 @@ |
99 | 99 | &-group { |
100 | 100 | .btn-group(@btn-prefix-cls); |
101 | 101 | } |
102 | -} | |
103 | 102 | \ No newline at end of file |
103 | +} | ... | ... |
src/styles/components/cascader.less
... | ... | @@ -29,8 +29,8 @@ |
29 | 29 | &-arrow { |
30 | 30 | .inner-arrow(); |
31 | 31 | } |
32 | - &-visible &-arrow:nth-of-type(2){ | |
33 | - .transform(rotate(180deg)); | |
32 | + &-visible &-arrow:nth-of-type(2) { | |
33 | + transform: rotate(180deg); | |
34 | 34 | } |
35 | 35 | |
36 | 36 | .@{select-dropdown-prefix-cls} { |
... | ... | @@ -67,7 +67,7 @@ |
67 | 67 | & &-item{ |
68 | 68 | position: relative; |
69 | 69 | padding-right: 24px; |
70 | - .transition(all @transition-time @ease-in-out); | |
70 | + transition: all @transition-time @ease-in-out; | |
71 | 71 | |
72 | 72 | i{ |
73 | 73 | font-size: @font-size-small; |
... | ... | @@ -83,4 +83,4 @@ |
83 | 83 | } |
84 | 84 | } |
85 | 85 | } |
86 | -} | |
87 | 86 | \ No newline at end of file |
87 | +} | ... | ... |
src/styles/components/circle.less
src/styles/components/collapse.less
... | ... | @@ -20,12 +20,12 @@ |
20 | 20 | position: relative; |
21 | 21 | |
22 | 22 | > i{ |
23 | - .transition(transform @transition-time @ease-in-out); | |
23 | + transition: transform @transition-time @ease-in-out; | |
24 | 24 | } |
25 | 25 | } |
26 | 26 | } |
27 | 27 | & > &-item&-item-active > &-header > i{ |
28 | - .transform(rotate(90deg)); | |
28 | + transform: rotate(90deg); | |
29 | 29 | } |
30 | 30 | |
31 | 31 | &-content{ |
... | ... | @@ -48,4 +48,4 @@ |
48 | 48 | border-radius: 0 0 3px 3px; |
49 | 49 | } |
50 | 50 | } |
51 | -} | |
52 | 51 | \ No newline at end of file |
52 | +} | ... | ... |
src/styles/components/input-number.less
... | ... | @@ -30,7 +30,7 @@ |
30 | 30 | top: 0; |
31 | 31 | right: 0; |
32 | 32 | opacity: 0; |
33 | - .transition(opacity @transition-time @ease-in-out); | |
33 | + transition: opacity @transition-time @ease-in-out; | |
34 | 34 | } |
35 | 35 | |
36 | 36 | &:hover &-handler-wrap { |
... | ... | @@ -73,10 +73,10 @@ |
73 | 73 | line-height: 12px; |
74 | 74 | font-size: 14px; |
75 | 75 | color: #999; |
76 | - .user-select(); | |
76 | + user-select: none; | |
77 | 77 | position: absolute; |
78 | 78 | right: 4px; |
79 | - .transition(all @transition-time linear); | |
79 | + transition: all @transition-time linear; | |
80 | 80 | } |
81 | 81 | |
82 | 82 | &:hover { |
... | ... | @@ -107,7 +107,7 @@ |
107 | 107 | color: #666; |
108 | 108 | border: 0; |
109 | 109 | border-radius: @btn-border-radius; |
110 | - .transition(all @transition-time linear); | |
110 | + transition: all @transition-time linear; | |
111 | 111 | |
112 | 112 | &[disabled] { |
113 | 113 | .disabled(); |
... | ... | @@ -183,4 +183,4 @@ |
183 | 183 | .handler-disabled(); |
184 | 184 | } |
185 | 185 | } |
186 | -} | |
187 | 186 | \ No newline at end of file |
187 | +} | ... | ... |
src/styles/components/loading-bar.less
... | ... | @@ -9,7 +9,7 @@ |
9 | 9 | z-index: @zindex-loading-bar; |
10 | 10 | |
11 | 11 | &-inner { |
12 | - .transition(width @transition-time linear); | |
12 | + transition: width @transition-time linear; | |
13 | 13 | |
14 | 14 | &-color-primary { |
15 | 15 | background-color: @primary-color; |
... | ... | @@ -19,4 +19,4 @@ |
19 | 19 | background-color: @error-color; |
20 | 20 | } |
21 | 21 | } |
22 | -} | |
23 | 22 | \ No newline at end of file |
23 | +} | ... | ... |
src/styles/components/page.less
... | ... | @@ -19,18 +19,18 @@ |
19 | 19 | text-align: center; |
20 | 20 | list-style: none; |
21 | 21 | background-color: #fff; |
22 | - .user-select(); | |
22 | + user-select: none; | |
23 | 23 | cursor: pointer; |
24 | 24 | font-family: Arial; |
25 | 25 | border: 1px solid @border-color-base; |
26 | 26 | border-radius: @btn-border-radius; |
27 | - .transition(all @transition-time @ease-in-out); | |
27 | + transition: all @transition-time @ease-in-out; | |
28 | 28 | |
29 | 29 | a { |
30 | 30 | margin: 0 6px; |
31 | 31 | text-decoration: none; |
32 | 32 | color: @text-color; |
33 | - //.transition(none); | |
33 | + //transition: none; | |
34 | 34 | } |
35 | 35 | |
36 | 36 | &:hover { |
... | ... | @@ -114,7 +114,7 @@ |
114 | 114 | font-family: Arial; |
115 | 115 | border: 1px solid @border-color-base; |
116 | 116 | border-radius: @btn-border-radius; |
117 | - .transition(all @transition-time @ease-in-out); | |
117 | + transition: all @transition-time @ease-in-out; | |
118 | 118 | } |
119 | 119 | |
120 | 120 | &-prev, |
... | ... | @@ -202,7 +202,7 @@ |
202 | 202 | outline: none; |
203 | 203 | border: 1px solid @border-color-base; |
204 | 204 | border-radius: @btn-border-radius; |
205 | - .transition(border-color @transition-time @ease-in-out); | |
205 | + transition: border-color @transition-time @ease-in-out; | |
206 | 206 | |
207 | 207 | &:hover { |
208 | 208 | border-color: @primary-color; |
... | ... | @@ -266,4 +266,4 @@ |
266 | 266 | } |
267 | 267 | } |
268 | 268 | } |
269 | -} | |
270 | 269 | \ No newline at end of file |
270 | +} | ... | ... |
src/styles/components/progress.less
... | ... | @@ -29,7 +29,7 @@ |
29 | 29 | &-bg { |
30 | 30 | border-radius: 100px; |
31 | 31 | background-color: @info-color; |
32 | - .transition(all @transition-time linear); | |
32 | + transition: all @transition-time linear; | |
33 | 33 | position: relative; |
34 | 34 | } |
35 | 35 | |
... | ... | @@ -52,7 +52,7 @@ |
52 | 52 | bottom: 0; |
53 | 53 | background: #fff; |
54 | 54 | border-radius: 10px; |
55 | - .animation(ivu-progress-active 2s @ease-in-out infinite); | |
55 | + animation: ivu-progress-active 2s @ease-in-out infinite; | |
56 | 56 | } |
57 | 57 | } |
58 | 58 | |
... | ... | @@ -84,4 +84,4 @@ |
84 | 84 | opacity: 0; |
85 | 85 | width: 100%; |
86 | 86 | } |
87 | -} | |
88 | 87 | \ No newline at end of file |
88 | +} | ... | ... |
src/styles/components/radio.less
... | ... | @@ -42,7 +42,7 @@ |
42 | 42 | background-color: #fff; |
43 | 43 | border: 1px solid @border-color-base; |
44 | 44 | border-radius: 50%; |
45 | - .transition(all @transition-time @ease-in-out); | |
45 | + transition: all @transition-time @ease-in-out; | |
46 | 46 | |
47 | 47 | &:after { |
48 | 48 | position: absolute; |
... | ... | @@ -57,8 +57,8 @@ |
57 | 57 | content: ' '; |
58 | 58 | background-color: @primary-color; |
59 | 59 | opacity: 0; |
60 | - .transition(all @transition-time @ease-in-out); | |
61 | - .transform(scale(0)); | |
60 | + transition: all @transition-time @ease-in-out; | |
61 | + transform: scale(0); | |
62 | 62 | } |
63 | 63 | } |
64 | 64 | |
... | ... | @@ -80,8 +80,8 @@ |
80 | 80 | border-color: @primary-color; |
81 | 81 | &:after { |
82 | 82 | opacity: 1; |
83 | - .transform(scale(1)); | |
84 | - .transition(all @transition-time @ease-in-out); | |
83 | + transform: scale(1); | |
84 | + transition: all @transition-time @ease-in-out; | |
85 | 85 | } |
86 | 86 | } |
87 | 87 | &:hover { |
... | ... | @@ -138,7 +138,7 @@ span.@{radio-prefix-cls} + * { |
138 | 138 | padding: 0 16px; |
139 | 139 | font-size: @font-size-small; |
140 | 140 | color: @btn-default-color; |
141 | - .transition(all @transition-time ease-in-out); | |
141 | + transition: all @transition-time ease-in-out; | |
142 | 142 | cursor: pointer; |
143 | 143 | border: 1px solid @border-color-base; |
144 | 144 | border-left: 0; |
... | ... | @@ -156,7 +156,7 @@ span.@{radio-prefix-cls} + * { |
156 | 156 | left: -1px; |
157 | 157 | background: @border-color-base; |
158 | 158 | visibility: hidden; |
159 | - .transition(all @transition-time ease-in-out); | |
159 | + transition: all @transition-time ease-in-out; | |
160 | 160 | } |
161 | 161 | |
162 | 162 | &:first-child { |
... | ... | @@ -254,4 +254,4 @@ span.@{radio-prefix-cls} + * { |
254 | 254 | &:last-child { |
255 | 255 | border-radius: 0 @btn-border-radius-small @btn-border-radius-small 0; |
256 | 256 | } |
257 | -} | |
258 | 257 | \ No newline at end of file |
258 | +} | ... | ... |
src/styles/components/select.less
... | ... | @@ -15,13 +15,13 @@ |
15 | 15 | display: block; |
16 | 16 | box-sizing: border-box; |
17 | 17 | outline: none; |
18 | - .user-select(); | |
18 | + user-select: none; | |
19 | 19 | cursor: pointer; |
20 | 20 | |
21 | 21 | background-color: #fff; |
22 | 22 | border-radius: @btn-border-radius; |
23 | 23 | border: 1px solid @border-color-base; |
24 | - .transition(all @transition-time @ease-in-out); | |
24 | + transition: all @transition-time @ease-in-out; | |
25 | 25 | |
26 | 26 | .@{select-prefix-cls}-arrow:nth-of-type(1) { |
27 | 27 | display: none; |
... | ... | @@ -50,7 +50,7 @@ |
50 | 50 | } |
51 | 51 | |
52 | 52 | .@{select-prefix-cls}-arrow:nth-of-type(2) { |
53 | - .transform(rotate(180deg)); | |
53 | + transform: rotate(180deg); | |
54 | 54 | } |
55 | 55 | } |
56 | 56 | |
... | ... | @@ -214,4 +214,4 @@ |
214 | 214 | height: 30px; |
215 | 215 | line-height: 30px; |
216 | 216 | } |
217 | -} | |
218 | 217 | \ No newline at end of file |
218 | +} | ... | ... |
src/styles/components/slider.less
... | ... | @@ -18,11 +18,11 @@ |
18 | 18 | background-color: transparent; |
19 | 19 | position: absolute; |
20 | 20 | top: @slider-button-wrap-offset; |
21 | - .transform(translateX(-50%)); | |
21 | + transform: translateX(-50%); | |
22 | 22 | |
23 | 23 | .@{tooltip-prefix-cls} { |
24 | 24 | display: block; |
25 | - .user-select(); | |
25 | + user-select: none; | |
26 | 26 | } |
27 | 27 | } |
28 | 28 | |
... | ... | @@ -32,13 +32,13 @@ |
32 | 32 | border: 2px solid @slider-color; |
33 | 33 | border-radius: 50%; |
34 | 34 | background-color: #fff; |
35 | - .transition(all @transition-time linear); | |
35 | + transition: all @transition-time linear; | |
36 | 36 | |
37 | 37 | &:hover, |
38 | 38 | &-dragging |
39 | 39 | { |
40 | 40 | border-color: @primary-color; |
41 | - .transform(scale(1.5)); | |
41 | + transform: scale(1.5); | |
42 | 42 | } |
43 | 43 | |
44 | 44 | &:hover{ |
... | ... | @@ -63,7 +63,7 @@ |
63 | 63 | .square(@slider-height); |
64 | 64 | border-radius: 50%; |
65 | 65 | background-color: @slider-disabled-color; |
66 | - .transform(translateX(-50%)); | |
66 | + transform: translateX(-50%); | |
67 | 67 | } |
68 | 68 | } |
69 | 69 | |
... | ... | @@ -107,4 +107,4 @@ |
107 | 107 | float: right; |
108 | 108 | margin-top: -14px; |
109 | 109 | } |
110 | -} | |
111 | 110 | \ No newline at end of file |
111 | +} | ... | ... |
src/styles/components/spin.less
... | ... | @@ -14,7 +14,7 @@ |
14 | 14 | border-radius: 50%; |
15 | 15 | background-color: @primary-color; |
16 | 16 | .square(@spin-dot-size); |
17 | - .animation(ani-spin-bounce 1s 0s ease-in-out infinite); | |
17 | + animation: ani-spin-bounce 1s 0s ease-in-out infinite; | |
18 | 18 | } |
19 | 19 | |
20 | 20 | &-large &-dot { |
... | ... | @@ -59,11 +59,11 @@ |
59 | 59 | |
60 | 60 | @keyframes ani-spin-bounce { |
61 | 61 | 0% { |
62 | - .transform(scale(0)); | |
62 | + transform: scale(0); | |
63 | 63 | } |
64 | 64 | |
65 | 65 | 100% { |
66 | - .transform(scale(1)); | |
66 | + transform: scale(1); | |
67 | 67 | opacity: 0; |
68 | 68 | } |
69 | -} | |
70 | 69 | \ No newline at end of file |
70 | +} | ... | ... |
src/styles/components/steps.less
... | ... | @@ -61,7 +61,7 @@ |
61 | 61 | .@{steps-prefix-cls}-tail > i:after { |
62 | 62 | width: 100%; |
63 | 63 | background: @primary-color; |
64 | - .transition(all @transition-time @ease-in-out); | |
64 | + transition: all @transition-time @ease-in-out; | |
65 | 65 | opacity: 1; |
66 | 66 | } |
67 | 67 | .@{steps-prefix-cls}-title { |
... | ... | @@ -142,7 +142,7 @@ |
142 | 142 | border: 1px solid @steps-wait-icon-color; |
143 | 143 | border-radius: 50%; |
144 | 144 | font-size: 14px; |
145 | - .transition(background-color @transition-time @ease-in-out); | |
145 | + transition: background-color @transition-time @ease-in-out; | |
146 | 146 | |
147 | 147 | > .@{steps-prefix-cls}-icon { |
148 | 148 | line-height: 1; |
... | ... | @@ -350,4 +350,4 @@ |
350 | 350 | padding-left: 10px; |
351 | 351 | margin-left: -10px; |
352 | 352 | } |
353 | -} | |
354 | 353 | \ No newline at end of file |
354 | +} | ... | ... |
src/styles/components/switch.less
... | ... | @@ -11,8 +11,8 @@ |
11 | 11 | background-color: #ccc; |
12 | 12 | position: relative; |
13 | 13 | cursor: pointer; |
14 | - .user-select(); | |
15 | - .transition(all @transition-time @ease-in-out); | |
14 | + user-select: none; | |
15 | + transition: all @transition-time @ease-in-out; | |
16 | 16 | |
17 | 17 | &-inner { |
18 | 18 | color: #fff; |
... | ... | @@ -20,7 +20,7 @@ |
20 | 20 | position: absolute; |
21 | 21 | left: 25px; |
22 | 22 | |
23 | - i{ | |
23 | + i { | |
24 | 24 | width: 12px; |
25 | 25 | height: 12px; |
26 | 26 | text-align: center; |
... | ... | @@ -37,7 +37,7 @@ |
37 | 37 | left: 1px; |
38 | 38 | top: 1px; |
39 | 39 | cursor: pointer; |
40 | - .transition2(left @transition-time @ease-in-out, width @transition-time @ease-in-out); | |
40 | + transition: left @transition-time @ease-in-out, width @transition-time @ease-in-out; | |
41 | 41 | } |
42 | 42 | |
43 | 43 | &:active:after { |
... | ... | @@ -126,4 +126,4 @@ |
126 | 126 | color: #ccc; |
127 | 127 | } |
128 | 128 | } |
129 | -} | |
130 | 129 | \ No newline at end of file |
130 | +} | ... | ... |
src/styles/components/tag.less
... | ... | @@ -15,7 +15,7 @@ |
15 | 15 | opacity: 1; |
16 | 16 | overflow: hidden; |
17 | 17 | cursor: pointer; |
18 | - //.transition(all @transition-time @ease-in-out); | |
18 | + //transition: all @transition-time @ease-in-out; | |
19 | 19 | |
20 | 20 | &-dot{ |
21 | 21 | height: 32px; |
... | ... | @@ -146,7 +146,7 @@ |
146 | 146 | opacity: 0.66; |
147 | 147 | position: relative; |
148 | 148 | top: 1px; |
149 | - //.transition(all @transition-time @ease-in-out); | |
149 | + //transition: all @transition-time @ease-in-out; | |
150 | 150 | |
151 | 151 | &:hover { |
152 | 152 | opacity: 1; |
... | ... | @@ -190,4 +190,4 @@ |
190 | 190 | { |
191 | 191 | background: @error-color; |
192 | 192 | } |
193 | -} | |
194 | 193 | \ No newline at end of file |
194 | +} | ... | ... |
src/styles/components/timeline.less
... | ... | @@ -58,7 +58,7 @@ |
58 | 58 | font-size: @font-size-base; |
59 | 59 | position: absolute; |
60 | 60 | left: -13px; |
61 | - .transform(translateY(-50%)); | |
61 | + transform: translateY(-50%); | |
62 | 62 | } |
63 | 63 | |
64 | 64 | &-content { |
... | ... | @@ -84,4 +84,4 @@ |
84 | 84 | min-height: 48px; |
85 | 85 | } |
86 | 86 | } |
87 | -} | |
88 | 87 | \ No newline at end of file |
88 | +} | ... | ... |
src/styles/mixins/animation.less deleted
1 | -.animation(@string) { | |
2 | - -webkit-animation: @string; | |
3 | - -moz-animation: @string; | |
4 | - animation: @string; | |
5 | -} | |
6 | - | |
7 | -.animation-duration(@string) { | |
8 | - -webkit-animation-duration : @string; | |
9 | - -moz-animation-duration : @string; | |
10 | - animation-duration : @string; | |
11 | -} | |
12 | - | |
13 | -.animation-fill-mode(@string) { | |
14 | - -webkit-animation-fill-mode : @string; | |
15 | - -moz-animation-fill-mode : @string; | |
16 | - animation-fill-mode : @string; | |
17 | -} | |
18 | - | |
19 | -.animation-play-state(@string) { | |
20 | - -webkit-animation-play-state : @string; | |
21 | - -moz-animation-play-state : @string; | |
22 | - animation-play-state : @string; | |
23 | -} | |
24 | - | |
25 | -.animation-name(@string) { | |
26 | - -webkit-animation-name : @string; | |
27 | - -moz-animation-name : @string; | |
28 | - animation-name : @string; | |
29 | -} | |
30 | 0 | \ No newline at end of file |
src/styles/mixins/box-shadow.less deleted
src/styles/mixins/breadcrumb.less
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | |
7 | 7 | a { |
8 | 8 | color: @text-color; |
9 | - .transition(color @transition-time @ease-in-out); | |
9 | + transition: color @transition-time @ease-in-out; | |
10 | 10 | &:hover { |
11 | 11 | color: tint(@primary-color, 20%); |
12 | 12 | } |
... | ... | @@ -31,4 +31,4 @@ |
31 | 31 | margin-left: 4px; |
32 | 32 | } |
33 | 33 | } |
34 | -} | |
35 | 34 | \ No newline at end of file |
35 | +} | ... | ... |
src/styles/mixins/button.less
... | ... | @@ -120,11 +120,11 @@ |
120 | 120 | border: 1px solid transparent; |
121 | 121 | white-space: nowrap; |
122 | 122 | line-height: @line-height-base; |
123 | - .user-select(); | |
123 | + user-select: none; | |
124 | 124 | .button-size(@btn-padding-base; @btn-font-size; @btn-border-radius); |
125 | - .transform(translate3d(0, 0, 0)); | |
126 | - //.transition(all @transition-time linear); | |
127 | - .transition3(color @transition-time linear, background-color @transition-time linear, border @transition-time linear); | |
125 | + transform: translate3d(0, 0, 0); | |
126 | + //transition: all @transition-time linear; | |
127 | + transition: color @transition-time linear, background-color @transition-time linear, border @transition-time linear; | |
128 | 128 | |
129 | 129 | > .@{css-prefix-iconfont} { |
130 | 130 | line-height: 1; |
... | ... | @@ -142,7 +142,7 @@ |
142 | 142 | |
143 | 143 | &:not([disabled]):active { |
144 | 144 | outline: 0; |
145 | - .transition(none) | |
145 | + transition: none; | |
146 | 146 | } |
147 | 147 | |
148 | 148 | &.disabled, | ... | ... |
src/styles/mixins/checkbox.less
... | ... | @@ -31,8 +31,8 @@ |
31 | 31 | border: 1px solid @border-color-base; |
32 | 32 | border-radius: 2px; |
33 | 33 | background-color: #fff; |
34 | - .transition2(border-color @transition-time @ease-in-out,background-color @transition-time @ease-in-out); | |
35 | - | |
34 | + transition: border-color @transition-time @ease-in-out, background-color @transition-time @ease-in-out; | |
35 | + | |
36 | 36 | &:after { |
37 | 37 | content: ''; |
38 | 38 | display: table; |
... | ... | @@ -44,8 +44,8 @@ |
44 | 44 | border: 2px solid #fff; |
45 | 45 | border-top: 0; |
46 | 46 | border-left: 0; |
47 | - .transform(rotate(45deg) scale(0)); | |
48 | - .transition(all @transition-time @ease-in-out); | |
47 | + transform: rotate(45deg) scale(0); | |
48 | + transition: all @transition-time @ease-in-out; | |
49 | 49 | } |
50 | 50 | } |
51 | 51 | |
... | ... | @@ -91,8 +91,8 @@ |
91 | 91 | border: 2px solid #fff; |
92 | 92 | border-top: 0; |
93 | 93 | border-left: 0; |
94 | - .transform(rotate(45deg) scale(1)); | |
95 | - .transition(all @transition-time @ease-in-out); | |
94 | + transform: rotate(45deg) scale(1); | |
95 | + transition: all @transition-time @ease-in-out; | |
96 | 96 | } |
97 | 97 | } |
98 | 98 | } |
... | ... | @@ -166,4 +166,4 @@ |
166 | 166 | display: inline-block; |
167 | 167 | } |
168 | 168 | } |
169 | -} | |
170 | 169 | \ No newline at end of file |
170 | +} | ... | ... |
src/styles/mixins/clearfix.less
src/styles/mixins/common.less
... | ... | @@ -14,12 +14,6 @@ |
14 | 14 | } |
15 | 15 | } |
16 | 16 | |
17 | -.user-select(@type: none) { | |
18 | - -webkit-user-select: @type; | |
19 | - -moz-user-select: @type; | |
20 | - user-select: @type; | |
21 | -} | |
22 | - | |
23 | 17 | // for select and input like component's arrow |
24 | 18 | .inner-arrow() { |
25 | 19 | position: absolute; |
... | ... | @@ -29,5 +23,5 @@ |
29 | 23 | margin-top: -7px; |
30 | 24 | font-size: @font-size-base; |
31 | 25 | color: @subsidiary-color; |
32 | - .transition(all @transition-time @ease-in-out); | |
33 | -} | |
34 | 26 | \ No newline at end of file |
27 | + transition: all @transition-time @ease-in-out; | |
28 | +} | ... | ... |
src/styles/mixins/index.less
1 | 1 | @import "common"; |
2 | 2 | @import "clearfix"; |
3 | -@import "box-shadow"; | |
4 | -@import "transition"; | |
5 | -@import "transform"; | |
6 | -@import "animation"; | |
7 | 3 | @import "button"; |
8 | 4 | @import "layout"; |
9 | 5 | @import "size"; |
... | ... | @@ -15,4 +11,4 @@ |
15 | 11 | @import "mask"; |
16 | 12 | @import "content"; // card、modal |
17 | 13 | @import "tooltip"; |
18 | -@import "select"; | |
19 | 14 | \ No newline at end of file |
15 | +@import "select"; | ... | ... |
src/styles/mixins/input.less
... | ... | @@ -45,7 +45,7 @@ |
45 | 45 | position: relative; |
46 | 46 | cursor: text; |
47 | 47 | .placeholder(); |
48 | - .transition3(border @transition-time @ease-in-out, background @transition-time @ease-in-out, box-shadow @transition-time @ease-in-out); | |
48 | + transition: border @transition-time @ease-in-out, background @transition-time @ease-in-out, box-shadow @transition-time @ease-in-out; | |
49 | 49 | |
50 | 50 | &:hover { |
51 | 51 | .hover(); | ... | ... |
src/styles/mixins/loading.less
1 | 1 | // Loading for loop |
2 | 2 | .ivu-load-loop{ |
3 | - .animation(ani-load-loop 1s linear infinite); | |
3 | + animation: ani-load-loop 1s linear infinite; | |
4 | 4 | } |
5 | 5 | |
6 | 6 | @keyframes ani-load-loop { |
7 | 7 | from { transform: rotate(0deg);} |
8 | 8 | 50% { transform: rotate(180deg);} |
9 | 9 | to { transform: rotate(360deg);} |
10 | -} | |
11 | 10 | \ No newline at end of file |
11 | +} | ... | ... |
src/styles/mixins/select.less
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | white-space: nowrap; |
9 | 9 | list-style: none; |
10 | 10 | cursor: pointer; |
11 | - .transition(background @transition-time @ease-in-out); | |
11 | + transition: background @transition-time @ease-in-out; | |
12 | 12 | |
13 | 13 | &:hover{ |
14 | 14 | background: @background-color-select-hover; |
... | ... | @@ -43,4 +43,4 @@ |
43 | 43 | padding: 7px 16px 8px; |
44 | 44 | font-size: @font-size-base !important; |
45 | 45 | } |
46 | -} | |
47 | 46 | \ No newline at end of file |
47 | +} | ... | ... |
src/styles/mixins/size.less
... | ... | @@ -13,8 +13,8 @@ |
13 | 13 | @font-scale: unit(@size / @font-size-base); |
14 | 14 | font-size: @font-size-base; |
15 | 15 | font-size: ~"@{size} \9"; // ie8-9 |
16 | - .transform(scale(@font-scale) rotate(@rotate)); | |
16 | + transform: scale(@font-scale) rotate(@rotate); | |
17 | 17 | :root & { |
18 | 18 | font-size: @font-size-base; // reset ie9 and above |
19 | 19 | } |
20 | -} | |
21 | 20 | \ No newline at end of file |
21 | +} | ... | ... |
src/styles/mixins/transform.less deleted
src/styles/mixins/transition.less deleted
1 | -.transition (@string) { | |
2 | - -webkit-transition: @string; | |
3 | - -moz-transition: @string; | |
4 | - transition: @string; | |
5 | -} | |
6 | -.transition2 (@string1, @string2) { | |
7 | - -webkit-transition: @string1 , @string2; | |
8 | - -moz-transition: @string1 , @string2; | |
9 | - transition: @string1 , @string2; | |
10 | -} | |
11 | -.transition3 (@string1, @string2, @string3) { | |
12 | - -webkit-transition: @string1 , @string2 , @string3; | |
13 | - -moz-transition: @string1 , @string2 , @string3; | |
14 | - transition: @string1 , @string2 , @string3; | |
15 | -} | |
16 | 0 | \ No newline at end of file |