chore: remove hacks for IE8-, close: #7447 (#7512)

This commit is contained in:
Benjy Cui 2017-09-08 13:08:46 +08:00 committed by 偏右
parent 8c0c6ecf6e
commit 070b2696ba
13 changed files with 5 additions and 67 deletions

View File

@ -96,7 +96,6 @@
transition: transform 0.2s ease;
}
&&-expand {
.ie-rotate(2);
&:before {
transform: rotate(180deg);
}

View File

@ -70,7 +70,7 @@
left: 0;
z-index: 1;
cursor: pointer;
.opacity(0);
opacity: 0;
top: 0;
bottom: 0;
right: 0;
@ -168,23 +168,6 @@
display: inline-block;
}
}
@ie8: \0screen;
// IE8 hack for https://github.com/ant-design/ant-design/issues/2148
@media @ie8 {
.@{checkbox-prefix-cls}-checked .@{checkbox-prefix-cls}-inner:before,
.@{checkbox-prefix-cls}-checked .@{checkbox-prefix-cls}-inner:after {
.iconfont-font("\e632");
font-weight: bold;
font-size: 8px;
border: 0;
color: #fff;
left: 2px;
top: 3px;
position: absolute;
}
}
}
@keyframes antCheckboxEffect {

View File

@ -250,7 +250,6 @@
position: absolute;
content: "\e61d";
right: 16px;
.ie-rotate(3);
transform: rotate(270deg) scale(0.75);
}
@ -270,7 +269,6 @@
&-open {
&.@{menu-prefix-cls}-submenu-inline > .@{menu-prefix-cls}-submenu-title:after {
.ie-rotate(1);
transform: rotate(180deg) scale(0.75);
}
}

View File

@ -209,7 +209,7 @@ span.@{radio-prefix-cls} + * {
.@{radio-prefix-cls}-inner,
input[type="checkbox"],
input[type="radio"] {
.opacity(0);
opacity: 0;
width: 0;
height: 0;
}

View File

@ -359,7 +359,6 @@
&-open {
.@{select-prefix-cls}-arrow {
.ie-rotate(2);
-ms-transform: rotate(180deg);
&:before {
transform: rotate(180deg);

View File

@ -48,7 +48,7 @@ export default class Spin extends React.Component<SpinProps, any> {
componentDidMount() {
if (!isCssAnimationSupported()) {
// Show text in IE8/9
// Show text in IE9
this.setState({
notCssAnimationSupported: true,
});

View File

@ -4,8 +4,6 @@
font-family: 'anticon';
src: url('@{icon-url}.eot'); /* IE9*/
src:
/* IE6-IE8 */
url('@{icon-url}.eot?#iefix') format('embedded-opentype'),
/* chrome、firefox */
url('@{icon-url}.woff') format('woff'),
/* chrome、firefox、opera、Safari, Android, iOS 4.2+*/

View File

@ -1,32 +1,5 @@
// 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);
}
// Placeholder text
.placeholder(@color: @input-placeholder-color) {
// Firefox

View File

@ -28,11 +28,10 @@
display: inline-block;
@font-scale: unit(@size / 12px);
font-size: @font-size-base;
// ie8-9
// IE9
font-size: ~"@{size} \9"; // lesshint duplicateProperty: false
transform: scale(@font-scale) rotate(@rotate);
.ie-rotate-via-degrees(@rotate);
:root & {
font-size: @font-size-base; // reset ie9 and above
font-size: @font-size-base; // reset IE9 and above
}
}

View File

@ -1,6 +1,5 @@
// Mixins
// --------------------------------------------------
@import "opacity";
@import "size";
@import "compatibility";
@import "clearfix";

View File

@ -1,8 +0,0 @@
// Opacity
.opacity(@opacity) {
opacity: @opacity;
// IE8 filter
@opacity-ie: (@opacity * 100);
filter: ~"alpha(opacity=@{opacity-ie})";
}

View File

@ -82,7 +82,6 @@
}
&.@{select-tree-prefix-cls}-switcher_close {
.antTreeSwitcherIcon();
.ie-rotate(3);
&:after {
transform: rotate(270deg) scale(0.59);
}

View File

@ -107,7 +107,6 @@
}
&.@{tree-prefix-cls}-switcher_close {
.antTreeSwitcherIcon();
.ie-rotate(3);
&:after {
transform: rotate(270deg) scale(0.59);
}