fix chrome 12px via .iconfont-size-under-12px() mixin

This commit is contained in:
afc163 2015-07-20 11:46:48 +08:00
parent 7cb9825237
commit 07fb9aa51b
8 changed files with 25 additions and 39 deletions

View File

@ -44,13 +44,9 @@
&-menu {
> .@{iconfont-css-prefix} {
font-size: @font-size-base;
font-size: ~"10px \9"; // ie8-9
.scale(0.83);
:root & {
font-size: @font-size-base; // reset ie9 and above
}
.iconfont-size-under-12px(10px);
position: relative;
top: -1px;
}
}

View File

@ -53,15 +53,9 @@
text-align: center;
text-transform: none;
text-rendering: auto;
// 更好地渲染字体
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0px;
-moz-osx-font-smoothing: grayscale;
width: 12px;
height: 12px;
font-size: @font-size-base;
font-size: ~"10px \9"; // ie8-9
.scale(0.83);
.iconfont-size-under-12px(10px);
line-height: 12px;
color:#000;
top:18px;

View File

@ -124,8 +124,7 @@
.@{dropdownPrefixCls}-link {
.anticon-down {
font-size: ~"60% \9"; // ie8-9
.scale(0.6);
.iconfont-size-under-12px(7px);
font-weight: bold;
vertical-align: top;
}

View File

@ -39,9 +39,7 @@
position: absolute;
width: 12px;
height: 12px;
font-size: @font-size-base;
font-size: ~"8px \9"; // ie8-9
.scale(0.67);
.iconfont-size-under-12px(8px);
right: 4px;
}

View File

@ -35,9 +35,7 @@
position: absolute;
top: 1px;
right: 1px;
font-size: @font-size-base;
font-size: ~"10px \9"; // ie8-9
.scale(0.83);
.iconfont-size-under-12px(10px);
width: 26px;
line-height: 26px;
@ -175,9 +173,7 @@
cursor: pointer;
display: inline-block;
font-weight: bold;
font-size: @font-size-base;
font-size: ~"8px \9"; // ie8-9
.scale(0.67);
.iconfont-size-under-12px(8px);
padding: 0 0 0 4px;
position: relative;
top: -1px;

View File

@ -189,9 +189,7 @@
font-size: 12px;
margin-right: 10px;
> .@{stepsPrefixClass}-icon.anticon {
font-size: 12px;
font-size: ~"9px \9"; // ie8-9
.scale(0.75);
.iconfont-size-under-12px(9px);
top: -1px;
}
}

View File

@ -26,8 +26,7 @@
margin-left: 4px;
position: relative;
top: -1px;
font-size: ~"10px \9"; // ie8-9
.scale(0.83);
.iconfont-size-under-12px(10px);
cursor: pointer;
color: #aaa;
transition: all 0.3s ease;
@ -45,12 +44,7 @@
padding: 7px 8px;
&.ant-dropdown-menu-item-selected:after {
right: 8px;
font-size: @font-size-base;
font-size: ~"10px \9"; // ie8-9
.scale(0.83);
:root & {
font-size: @font-size-base; // reset ie9 and above
}
.iconfont-size-under-12px(10px);
}
}
}
@ -178,8 +172,7 @@
}
.anticon-caret-up,
.anticon-caret-down {
font-size: ~"6px \9"; // ie8-9
.scale(0.5);
.iconfont-size-under-12px(6px);
line-height: 6px;
height: 6px;
color: #aaa;

View File

@ -3,4 +3,16 @@
// rotate for ie8 and blow
.ie-rotate(@rotation) {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation);
}
}
// for iconfont font size
// fix chrome 12px bug, support ie
.iconfont-size-under-12px(@iconfontSize) {
@font-scale: unit(@iconfontSize/@font-size-base);
font-size: @font-scale;
font-size: ~"@{iconfontSize} \9"; // ie8-9
.scale(@font-scale);
:root & {
font-size: @font-size-base; // reset ie9 and above
}
}