From b53c2808b8c869d04d05ef4ee64bfad6f9ba7189 Mon Sep 17 00:00:00 2001 From: YIZHUANG Date: Fri, 5 Apr 2019 11:03:07 +0300 Subject: [PATCH] Added support for IE11 --- lib/CarouselItems.js | 4 ++-- lib/CarouselItems.js.map | 2 +- lib/styles.css | 9 +++++++++ src/CarouselItems.tsx | 4 ++-- src/assets/styles.css | 9 +++++++++ 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/lib/CarouselItems.js b/lib/CarouselItems.js index f798276b..e9b43344 100644 --- a/lib/CarouselItems.js +++ b/lib/CarouselItems.js @@ -16,7 +16,7 @@ var CarouselItems = function (_a) { ? itemWidth - paritialVisibilityGutter : itemWidth) + "px" : "auto" - }, className: itemClass }, child)); }); + }, className: "react-multi-carousel-item " + itemClass }, child)); }); } return React.Children.toArray(children).map(function (child, index) { return (React.createElement("li", { key: index, "data-index": index, "aria-hidden": utils_1.getIfSlideIsVisbile(index, state) ? "false" : "true", style: { flex: shouldRenderOnSSR ? "1 0 " + flexBisis + "%" : "auto", @@ -26,7 +26,7 @@ var CarouselItems = function (_a) { ? itemWidth - paritialVisibilityGutter : itemWidth) + "px" : "auto" - }, className: itemClass }, child)); }); + }, className: "react-multi-carousel-item " + itemClass }, child)); }); }; exports.default = CarouselItems; //# sourceMappingURL=CarouselItems.js.map \ No newline at end of file diff --git a/lib/CarouselItems.js.map b/lib/CarouselItems.js.map index 1510aada..9a40e713 100644 --- a/lib/CarouselItems.js.map +++ b/lib/CarouselItems.js.map @@ -1 +1 @@ -{"version":3,"file":"CarouselItems.js","sourceRoot":"","sources":["../src/CarouselItems.tsx"],"names":[],"mappings":";;AAAA,6BAA+B;AAG/B,iCAQiB;AAOjB,IAAM,aAAa,GAAG,UAAC,EAAmC;QAAjC,gBAAK,EAAE,gBAAK;IAC3B,IAAA,2BAAS,EAAE,qBAAM,CAAW;IAC5B,IAAA,yBAAQ,EAAE,yBAAQ,EAAE,2BAAS,EAAE,qCAAc,CAAW;IAC1D,IAAA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4BACE,GAAG,EAAE,KAAK,gBACE,KAAK,iBACJ,2BAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EACjE,KAAK,EAAE;YACL,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,SAAO,SAAS,MAAG,CAAC,CAAC,CAAC,MAAM;YACtD,QAAQ,EAAE,UAAU;YACpB,KAAK,EAAE,cAAc;gBACnB,CAAC,CAAC,CACE,cAAc,IAAI,wBAAwB;oBACxC,CAAC,CAAC,SAAS,GAAG,wBAAwB;oBACtC,CAAC,CAAC,SAAS,QACX;gBACN,CAAC,CAAC,MAAM;SACX,EACD,SAAS,EAAE,+BAA6B,SAAW,IAElD,KAAK,CACH,CACN,EApB6D,CAoB7D,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,kBAAe,aAAa,CAAC"} \ No newline at end of file diff --git a/lib/styles.css b/lib/styles.css index cf6a05c2..5e866539 100644 --- a/lib/styles.css +++ b/lib/styles.css @@ -96,3 +96,12 @@ .react-multi-carousel-dot--active button { background: #080808; } + +@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { + .react-multi-carousel-item { + flex-shrink: 0 !important; + } + .react-multi-carousel-track { + overflow: visible !important; + } +} diff --git a/src/CarouselItems.tsx b/src/CarouselItems.tsx index 2669e165..baeaaa76 100644 --- a/src/CarouselItems.tsx +++ b/src/CarouselItems.tsx @@ -42,7 +42,7 @@ const CarouselItems = ({ props, state }:CarouselItemsProps):any => { }px` : "auto" }} - className={itemClass} + className={`react-multi-carousel-item ${itemClass}`} > {child} @@ -64,7 +64,7 @@ const CarouselItems = ({ props, state }:CarouselItemsProps):any => { }px` : "auto" }} - className={itemClass} + className={`react-multi-carousel-item ${itemClass}`} > {child} diff --git a/src/assets/styles.css b/src/assets/styles.css index cf6a05c2..5e866539 100644 --- a/src/assets/styles.css +++ b/src/assets/styles.css @@ -96,3 +96,12 @@ .react-multi-carousel-dot--active button { background: #080808; } + +@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { + .react-multi-carousel-item { + flex-shrink: 0 !important; + } + .react-multi-carousel-track { + overflow: visible !important; + } +}