Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Workaround for bug #4567 (Dialog text renders poorly on Windows): Fix…
Browse files Browse the repository at this point in the history
… the

worst offenders similar to #4554, making the font weight heavier and
tweaking the text color to match Mac more closely.
  • Loading branch information
peterflynn committed Aug 27, 2013
1 parent 6ce3c6d commit 07bbab7
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions src/styles/brackets_patterns_override.less
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,16 @@
}
}

// Work around #4554: SourceSans is much fainter on Win than Mac, especially small text with "light" font-weight.
// We fix some of the most egregious cases by using a heavier font-weight only on Win (and because that's usually
// overkill, we also make the color paler to dial it back down a bit).
.less-faint-on-win() {
body.platform-win & {
font-weight: normal;
color: #2e2e2e;
}
}

.modal-body ul {
/* Bootstrap's type.less defines a heavy margin-bottom on ul/ol that we don't want in dialogs
since they have heavy padding instead. */
Expand Down Expand Up @@ -457,6 +467,7 @@
line-height: 20px;
margin-bottom: 20px;
font-weight: @font-weight-light;
.less-faint-on-win();
}

.dialog-message li {
Expand All @@ -469,8 +480,12 @@
}

.dialog-filename {
font-weight: normal;
word-wrap: break-word;

font-weight: normal;
body.platform-win & { // maintain contrast next to ".less-faint-on-win()" workaround
font-weight: @font-weight-semibold;
}
}

/* Any Dialog text in this style is automatically turned into a link that opens in the browser. Use data-href for the link's target. */
Expand Down Expand Up @@ -664,26 +679,22 @@
width: 220px;
}
.ext-name {
color: #000;
display: block;
color: #000;
font-size: 15px;
font-weight: @font-weight-light;
.less-faint-on-win();
.user-select(text);
cursor: text;
}
.ext-desc {
color: #000;
font-weight: @font-weight-light;
.less-faint-on-win();
width: auto;
.user-select(text);
cursor: text;
}
.platform-win & { // work around #4554
.ext-name, .ext-desc {
font-weight: normal;
color: #2e2e2e;
}
}
.muted {
color: #888;
}
Expand Down Expand Up @@ -756,6 +767,7 @@
.dialog-message {
font-size: 14px;
line-height: 17px;
.less-faint-on-win();

// Enable text selection
cursor: auto;
Expand Down

0 comments on commit 07bbab7

Please sign in to comment.