ant-design/components/style/mixins/compatibility.less
afc163 0ca6a1c24a css modularize (#1448)
* css modularize

* Add alert style

* Move more component style

* Move iconfont to common style

* Move layout style

* Move more component style

* Move all components

* Fix lots of mixin deps

* remove css-prefix from less

* fix a button icon style bug

* restructure

* fix index

* add dist

* fix jest

* fix some components style

* clean webpack config

* check more components style

* update tabs

* update scripts

* update scripts

* fix form style

* fix more style

* Fix select width

* Fix form and tabs style
2016-04-27 20:44:36 +08:00

60 lines
1.5 KiB
Plaintext

// Compatibility for browsers.
// rotate for ie8 and blow
.ie-rotate(@rotation) {
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation})";
}
// rotate for ie8 and blow
// degrees unit
.ie-rotate-via-degrees(@degrees) {
/* IE6-IE8 */
@radians: ~`parseInt("@{degrees}") * Math.PI * 2 / 360`;
@costheta: ~`Math.cos("@{radians}")`;
@sintheta: ~`Math.sin("@{radians}")`;
@negsintheta: ~`"@{sintheta}" * -1`;
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=@{costheta}, M12=@{negsintheta}, M21=@{sintheta}, M22=@{costheta})";
zoom: 1;
:root & {
filter: none;
}
}
// support rotate for all browsers
.cross-rotate(@degrees) {
.rotate(@degrees);
.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
&::-moz-placeholder {
color: @color;
opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526
}
// Internet Explorer 10+
&:-ms-input-placeholder {
color: @color;
}
// Safari and Chrome
&::-webkit-input-placeholder {
color: @color;
}
}