Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions common/changes/dropdown-slider-HCfixes_2017-05-04-07-01.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "High contrast fixes for dropdown and slider",
"type": "patch"
}
],
"email": "manishda@microsoft.com"
}
7 changes: 7 additions & 0 deletions packages/office-ui-fabric-react/src/common/_i18n.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ $DropDown-item-height: 36px;
border-color: $ms-color-contrastWhiteSelected;
color: $ms-color-white;
}

@include highContrastAdjust();
}

.root {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -276,7 +279,7 @@ $DropDown-item-height: 36px;
background-color: $dividerColor;
}

.optionText{
.optionText {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -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;
}
Expand Down