mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 21:19:37 +08:00
32 lines
954 B
Plaintext
32 lines
954 B
Plaintext
// Compatibility for browsers.
|
|
|
|
// rotate for ie8 and blow
|
|
.ie-rotate(@rotation) {
|
|
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation);
|
|
}
|
|
|
|
// support rotate for all browsers
|
|
.cross-rotate(@degrees) {
|
|
.rotate(@degrees);
|
|
/* IE6-IE8 */
|
|
@radians: ~`parseInt("@{degrees}") * Math.PI * 2 / 360`;
|
|
@costheta: ~`Math.cos("@{radians}")`;
|
|
@sintheta: ~`Math.sin("@{radians}")`;
|
|
@negsintheta: ~`"@{sintheta}" * -1`;
|
|
filter: ~"progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=@{costheta}, M12=@{negsintheta}, M21=@{sintheta}, M22=@{costheta})";
|
|
zoom: 1;
|
|
}
|
|
|
|
// for iconfont font size
|
|
// fix chrome 12px bug, support ie
|
|
.iconfont-size-under-12px(@iconfontSize) {
|
|
display: inline-block;
|
|
@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
|
|
}
|
|
}
|