Skip to content

Commit

Permalink
Update ContentDialog for high contrast
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Comella committed Jun 26, 2015
1 parent 1015aea commit e9cf1c6
Showing 1 changed file with 51 additions and 17 deletions.
68 changes: 51 additions & 17 deletions src/less/colors-contentdialog.less
@@ -1,24 +1,58 @@
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License.txt in the project root for license information.

.Colors(@theme) {
.colorDefinitions(@theme);

.win-contentdialog-dialog {
background-color: @chromeMediumMid;
#win-contentdialog {
.variableDefs(@theme) when not (@theme = highcontrast) {
.colorDefinitions(@theme);

@textColor: @baseHigh;
@dialogBackgroundColor: @chromeMediumMid;

// Overlay background color is expressed with an opacity rather than as a
// background color with an alpha value because this is probably what
// developers expect for the styling story.
// Consequently, the overlay background color is altHigh with an opacity
// rather than altMid.
@overlayBackgroundColor: @altHigh;
@overlayOpacity: 0.6;
}

.win-contentdialog-title {
color: @baseHigh;

.variableDefs(highcontrast) {
.colorDefinitions(@theme);

@textColor: WindowText;
@dialogBackgroundColor: Window;

@overlayBackgroundColor: Window;
@overlayOpacity: 0.6;
}

.win-contentdialog-content {
color: @baseHigh;

.stylesForTheme(@theme) {
#win-contentdialog > .variableDefs(@theme);

.win-contentdialog-dialog {
background-color: @dialogBackgroundColor;
}

.win-contentdialog-title {
color: @textColor;
}

.win-contentdialog-content {
color: @textColor;
}


.win-contentdialog-backgroundoverlay {
background-color: @overlayBackgroundColor;
opacity: @overlayOpacity;
}
}
}

// This is @altMid but developers probably expect this to have an opacity
// rather than a background color with an alpha value.
.win-contentdialog-backgroundoverlay {
background-color: @altHigh;
opacity: 0.6;
}
.Colors(@theme) {
#win-contentdialog > .stylesForTheme(@theme);
}

.HighContrast() {
#win-contentdialog > .stylesForTheme(highcontrast);
}

0 comments on commit e9cf1c6

Please sign in to comment.