diff --git a/common/changes/dropdown-slider-HCfixes_2017-05-04-07-01.json b/common/changes/dropdown-slider-HCfixes_2017-05-04-07-01.json new file mode 100644 index 0000000000000..74acdfe8e6c40 --- /dev/null +++ b/common/changes/dropdown-slider-HCfixes_2017-05-04-07-01.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "office-ui-fabric-react", + "comment": "High contrast fixes for dropdown and slider", + "type": "patch" + } + ], + "email": "manishda@microsoft.com" +} \ No newline at end of file diff --git a/packages/office-ui-fabric-react/src/common/_i18n.scss b/packages/office-ui-fabric-react/src/common/_i18n.scss index c700358e4b1a9..e7c5230f933bd 100644 --- a/packages/office-ui-fabric-react/src/common/_i18n.scss +++ b/packages/office-ui-fabric-react/src/common/_i18n.scss @@ -285,4 +285,11 @@ transition-property: left; } } +} + +// Disables high contrast color adjusts for Edge/IE11 +@mixin highContrastAdjust { + @media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: black-on-white) { + -ms-high-contrast-adjust: none; + } } \ No newline at end of file diff --git a/packages/office-ui-fabric-react/src/components/Dropdown/Dropdown.scss b/packages/office-ui-fabric-react/src/components/Dropdown/Dropdown.scss index 898b47d42fd98..610e76d74be1d 100644 --- a/packages/office-ui-fabric-react/src/components/Dropdown/Dropdown.scss +++ b/packages/office-ui-fabric-react/src/components/Dropdown/Dropdown.scss @@ -29,6 +29,8 @@ $DropDown-item-height: 36px; border-color: $ms-color-contrastWhiteSelected; color: $ms-color-white; } + + @include highContrastAdjust(); } .root { @@ -135,10 +137,11 @@ $DropDown-item-height: 36px; color: $ms-color-neutralDark; font-size: $ms-icon-size-s; position: absolute; - top: 0px; + top: 1px; // border @include right(12px); pointer-events: none; - line-height: $DropDown-height; + height: $DropDown-height; + line-height: $DropDown-height - 2px; // height minus the border } // Style the new, replacement component @@ -276,7 +279,7 @@ $DropDown-item-height: 36px; background-color: $dividerColor; } -.optionText{ +.optionText { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; diff --git a/packages/office-ui-fabric-react/src/components/Slider/Slider.scss b/packages/office-ui-fabric-react/src/components/Slider/Slider.scss index ad9967420580f..42a41842ba0f4 100644 --- a/packages/office-ui-fabric-react/src/components/Slider/Slider.scss +++ b/packages/office-ui-fabric-react/src/components/Slider/Slider.scss @@ -10,22 +10,39 @@ } .line { + display: flex; position: relative; width: 100%; } .line span { height: 4px; - @include float(left); border-radius: 4px; + box-sizing: border-box; } .activeSection { background: $ms-color-neutralSecondary; + + @media screen and (-ms-high-contrast: active) { + background-color: $ms-color-white; + } + + @media screen and (-ms-high-contrast: black-on-white) { + background-color: $ms-color-black; + } } .inactiveSection { background: $ms-color-neutralTertiaryAlt; + + @media screen and (-ms-high-contrast: active) { + border: 1px solid $ms-color-white; + } + + @media screen and (-ms-high-contrast: black-on-white) { + border: 1px solid $ms-color-black; + } } .showTransitions { @@ -87,15 +104,39 @@ .thumb { border: 2px solid $ms-color-themePrimary; + + @media screen and (-ms-high-contrast: active) { + border-color: $ms-color-contrastBlackSelected; + } + + @media screen and (-ms-high-contrast: black-on-white) { + border-color: $ms-color-contrastWhiteSelected; + } } + .activeSection { background-color: $ms-color-themePrimary; + + @media screen and (-ms-high-contrast: active) { + background-color: $ms-color-contrastBlackSelected; + } + + @media screen and (-ms-high-contrast: black-on-white) { + background-color: $ms-color-contrastWhiteSelected; + } } .inactiveSection { background-color: $ms-color-themeLight; - } + @media screen and (-ms-high-contrast: active) { + border-color: $ms-color-contrastBlackSelected; + } + + @media screen and (-ms-high-contrast: black-on-white) { + border-color: $ms-color-contrastWhiteSelected; + } + } } .slideBox:active { @@ -111,7 +152,29 @@ .rootIsDisabled { .thumb { border-color: $ms-color-neutralTertiaryAlt; + + @media screen and (-ms-high-contrast: active) { + border-color: $ms-color-contrastBlackDisabled; + } + + @media screen and (-ms-high-contrast: black-on-white) { + border-color: $ms-color-contrastWhiteDisabled; + } } + + .activeSection, + .inactiveSection { + @media screen and (-ms-high-contrast: active) { + background-color: $ms-color-contrastBlackDisabled; + border-color: $ms-color-contrastBlackDisabled; + } + + @media screen and (-ms-high-contrast: black-on-white) { + background-color: $ms-color-contrastWhiteDisabled; + border-color: $ms-color-contrastWhiteDisabled; + } + } + .activeSection { background: $ms-color-neutralTertiaryAlt; }