-
Notifications
You must be signed in to change notification settings - Fork 781
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Theme: Improve
.qunit-test.fail
and expected/actual diff colors
* Fix huge color contrast issue with the dark red background behind similarly dark colors, especially in `.counts`. * Remove white padding between test item edge and assert list assertion green/red shading. Instead, add some border-spacing to the assert item table. * Adjust various colors slightly to comply with WCAG guidelines. https://developer.mozilla.org/en-US/docs/Web/Accessibility/Understanding_WCAG/Perceivable/Color_contrast * Fix broken `.qunit-test.pass .test-expected { color: #999; }` override which was only applicable to passing "todo" tests as no other passing tests have failing assertions under them. This was meant to mute the colors of these failures to avoid distraction. However the CSS cascade has changed over time such that these styles no longer applied. This is likely masked by the fact that passing tests (including passing todos) are collapsed by default, so there's very little attention to these anyway. Restore these overrides, and extend them to the "diff" and "source" lines as well. Easy way to identify color usage: ``` $ git grep '#[0-9A-F][0-9A-F]*' src/core/qunit.css | sed 's/^.*\(#[0-9A-F]*\).*/\1/' | sort | uniq -c ``` Ref #1774. Closes #1803.
- Loading branch information
Showing
3 changed files
with
92 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>QUnit</title> | ||
<link rel="stylesheet" href="../src/core/qunit.css"> | ||
</head> | ||
<body> | ||
<div id="qunit"></div> | ||
<script src="../qunit/qunit.js"></script> | ||
<script> | ||
QUnit.config.collapse = false; | ||
QUnit.test('apple', function (assert) { | ||
assert.true(true, 'stem'); | ||
assert.true(true, 'skin'); | ||
}); | ||
QUnit.test('banana', function (assert) { | ||
assert.true(true, 'foo'); | ||
var sentence = 'This is actual.'; | ||
assert.equal(sentence, 'This is expected.', 'example sentence'); | ||
assert.true(true, 'bar'); | ||
assert.true(true, 'baz'); | ||
}); | ||
QUnit.test('sauerkraut', function (assert) { | ||
assert.true(true, 'acid rock'); | ||
assert.true(true, 'kraut rock'); | ||
}); | ||
QUnit.test.todo('Käsesuppe', function (assert) { | ||
assert.true(true, 'foo'); | ||
var sentence = 'This is actual.'; | ||
assert.equal(sentence, 'This is expected.', 'example sentence'); | ||
assert.true(true, 'bar'); | ||
assert.true(true, 'baz'); | ||
}); | ||
QUnit.test('dampfnudel', function (assert) { | ||
assert.true(true, 'stream'); | ||
assert.true(true, 'bun'); | ||
}); | ||
QUnit.test.skip('Kassler'); | ||
QUnit.test('pumpernickel', function (assert) { | ||
assert.true(true, 'stream'); | ||
assert.true(true, 'bun'); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters