Skip to content

Commit

Permalink
Revert "Issue#2010 CSS media query prefers-dark-mode" - see if build …
Browse files Browse the repository at this point in the history
…passes

This reverts commit 520ce71.
  • Loading branch information
bcowgill committed Mar 28, 2021
1 parent 63c9d26 commit f99b431
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 204 deletions.
43 changes: 0 additions & 43 deletions browser-color-scheme-demo.html

This file was deleted.

13 changes: 4 additions & 9 deletions lib/browser/progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,28 +99,23 @@ Progress.prototype.draw = function(ctx) {
var angle = Math.PI * 2 * (percent / 100);
ctx.clearRect(0, 0, size, size);

// outer circle dark for LIGHT SCHEME
// outer circle
ctx.strokeStyle = '#9f9f9f';
ctx.beginPath();
ctx.arc(x, y, rad, 0, angle, false);
ctx.stroke();

// inner circle light for DARK SCHEME
// inner circle
ctx.strokeStyle = '#eee';
ctx.beginPath();
ctx.arc(x, y, rad - 1, 0, angle, true);
ctx.stroke();

// text outline and fill for LIGHT/DARK SCHEME visibility
// text
var text = this._text || (percent | 0) + '%';
var w = ctx.measureText(text).width;
var xText = x - w / 2 + 1;
var yText = y + fontSize / 2 - 1;

ctx.strokeStyle = '#eee';
ctx.fillStyle = '#9f9f9f';
ctx.strokeText(text, xText, yText);
ctx.fillText(text, xText, yText);
ctx.fillText(text, x - w / 2 + 1, y + fontSize / 2 - 1);
} catch (ignore) {
// don't fail if we can't render progress
}
Expand Down
Loading

0 comments on commit f99b431

Please sign in to comment.