better implement for a2804cb

This commit is contained in:
afc163 2016-07-25 14:03:56 +08:00
parent 964b46d876
commit ca57794ae7
11 changed files with 32 additions and 45 deletions

View File

@ -163,8 +163,7 @@
&-expand {
position: relative;
&:after {
content: '\e600';
font-family: 'anticon';
.iconfont-font("\e600");
.iconfont-size-under-12px(8px);
color: #999;
position: absolute;

View File

@ -190,8 +190,7 @@
@media @ie8 {
.@{checkbox-prefix-cls}-checked .@{checkbox-prefix-cls}-inner:before,
.@{checkbox-prefix-cls}-checked .@{checkbox-prefix-cls}-inner:after {
font-family: 'anticon';
content: '\E62E';
.iconfont-font("\e62e");
font-weight: bold;
font-size: 8px;
border: 0;

View File

@ -260,11 +260,7 @@
}
.@{calendar-prefix-cls}-clear-btn:after {
content: "\e631";
font-family: "anticon";
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
.iconfont-font("\e631");
font-size: 12px;
color: #ccc;
display: inline-block;

View File

@ -270,15 +270,12 @@ form {
top: 0;
right: 0;
visibility: visible;
font-family: "anticon" !important;
.square(@input-height-lg);
line-height: @input-height-lg;
text-align: center;
font-size: 14px;
animation: zoomIn .3s @ease-out-back;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
.iconfont-font("");
}
}

View File

@ -27,11 +27,7 @@
transition: color 0.3s ease, opacity 0.15s ease;
&:before {
display: block;
font-family: "anticon" !important;
content: "\E631";
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
.iconfont-font("\e631");
}
&:hover {
color: #999;
@ -480,8 +476,7 @@
&&--multiple {
.@{select-prefix-cls}-dropdown-menu-item {
&:after {
content: '\e62e';
font-family: 'anticon';
.iconfont-font("\e62e");
color: transparent;
.iconfont-size-under-12px(10px);
transition: all 0.2s ease;

View File

@ -27,20 +27,6 @@
.ie-rotate-via-degrees(@degrees);
}
// for iconfont font size
// fix chrome 12px bug, support ie
.iconfont-size-under-12px(@size, @rotate: 0deg) {
display: inline-block;
@font-scale: unit(@size/@font-size-base);
font-size: @font-size-base;
font-size: ~"@{size} \9"; // ie8-9
transform: scale(@font-scale) rotate(@rotate);
.ie-rotate-via-degrees(@rotate);
:root & {
font-size: @font-size-base; // reset ie9 and above
}
}
// Placeholder text
.placeholder(@color: @input-placeholder-color) {
// Firefox

View File

@ -14,3 +14,25 @@
font-family: "anticon" !important;
}
}
.iconfont-font(@content) {
font-family: 'anticon';
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
content: @content;
}
// for iconfont font size
// fix chrome 12px bug, support ie
.iconfont-size-under-12px(@size, @rotate: 0deg) {
display: inline-block;
@font-scale: unit(@size / @font-size-base);
font-size: @font-size-base;
font-size: ~"@{size} \9"; // ie8-9
transform: scale(@font-scale) rotate(@rotate);
.ie-rotate-via-degrees(@rotate);
:root & {
font-size: @font-size-base; // reset ie9 and above
}
}

View File

@ -61,17 +61,13 @@
}
&-clear-btn:after {
content: "\e631";
font-family: "anticon";
font-size: 12px;
color: #ccc;
display: inline-block;
line-height: 1;
width: 20px;
transition: color 0.3s ease;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
.iconfont-font("\e631");
}
&-clear-btn:hover:after {

View File

@ -61,9 +61,8 @@
}
&.@{select-tree-prefix-cls}-icon_loading {
&:after {
content: '\e6a1';
display: inline-block;
font-family: 'anticon';
.iconfont-font("\e6a1");
font-weight: bold;
animation: loadingCircle 1s infinite linear;
margin-top: 8px;

View File

@ -88,9 +88,8 @@
}
&.@{tree-prefix-cls}-icon_loading {
&:after {
content: '\e6a1';
display: inline-block;
font-family: 'anticon';
.iconfont-font("\e6a1");
animation: loadingCircle 1s infinite linear;
color: @primary-color;
}

View File

@ -4,9 +4,8 @@
position: relative;
&:after {
.iconfont-size-under-12px(6px);
content: '\e611';
display: inline-block;
font-family: 'anticon';
.iconfont-font("\e611");
font-weight: bold;
position: absolute;
top: 1px;