Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve color contrast of the fail/pass icon #358

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
4,676 changes: 4,676 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/CCAcontroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ class CCAController {
const crr = Number(cr.toFixed(rounding)).toLocaleString(i18n.lang)
// toLocalString removes trailing zero and use the correct decimal separator, based on the app select lang.

let text = template
let text = template;
for (const item of [
['%f.hex%', foregroundColorString],
['%b.hex%', backgroundColorString],
Expand Down
2 changes: 1 addition & 1 deletion src/views/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h2 id="header-translations">Translations</h2>
<li>Русский: <a href="https://github.com/AHOHNMYC" class="external-link">AHOHNMYC</a></li>
<li>日本語: <a href="https://github.com/motchie" class="external-link">Toru Motchie MOCHIDA</a></li>
<li>
한국어: <a href="https://github.com/miname" class="external-link">HungJae Lee</a>
한국어: <a href="https://github.com/miname" class="external-link">HungJae Lee</a> <a href="https://github.com/ungjinpark" class="external-link">Ungjin Park</a>
</li>
</ul>
<h2 id="header-exLinks">External links</h2>
Expand Down
21 changes: 21 additions & 0 deletions src/views/css/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@ html, body{
--fg-border-primary:#ccc;
--fg-border-secondary:#aaa;
--fg-link:#4865FF;

/* pass, fail icon */
--fg-pass-color:#04874B;
--fg-fail-color:#D22026;

--bg-code:#ccc;
--fg-control-border-primary: #8f8f8f;

--icon-switch:url("../icons/switch-black.svg");
--icon-sliders:url("../icons/sliders-black.svg");
--icon-picker:url("../icons/picker-black.svg");
Expand All @@ -31,6 +37,7 @@ html, body{
--icon-picker-pressed:url("../icons/picker-white.svg");
--icon-help-pressed:url("../icons/help-white.svg");
--scheme-type:light;
--canvas-text:CanvasText;
}

@media ( prefers-color-scheme : dark ) {
Expand All @@ -48,6 +55,11 @@ html, body{
--fg-border-secondary:#5a5a5a;
--fg-control-border-primary: #6f6f6f;
--fg-link:#58A5FF;

/* pass, fail icon */
--fg-pass-color:#06AF4B;
--fg-fail-color:#FF6150;

--icon-switch:url("../icons/switch-white.svg");
--icon-sliders:url("../icons/sliders-white.svg");
--icon-picker:url("../icons/picker-white.svg");
Expand All @@ -73,6 +85,10 @@ html.force-light {
--fg-border-primary:#bbb;
--fg-border-secondary:#aaa;
--fg-link:#4865FF;

--fg-pass-color:#04874B;
--fg-fail-color:#D22026;

--fg-control-border-primary: #8f8f8f;
--icon-switch:url("../icons/switch-black.svg");
--icon-sliders:url("../icons/sliders-black.svg");
Expand All @@ -98,6 +114,11 @@ html.force-dark {
--fg-border-secondary:#5a5a5a;
--fg-control-border-primary: #6f6f6f;
--fg-link:#58A5FF;

/* pass, fail icon */
--fg-pass-color:#06AF4B;
--fg-fail-color:#FF6150;

--icon-switch:url("../icons/switch-white.svg");
--icon-sliders:url("../icons/sliders-white.svg");
--icon-picker:url("../icons/picker-white.svg");
Expand Down
7 changes: 7 additions & 0 deletions src/views/css/icomoon/Read Me.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Open *demo.html* to see a list of all the glyphs in your font along with their codes/ligatures.

To use the generated font in desktop programs, you can install the TTF font. In order to copy the character associated with each icon, refer to the text box at the bottom right corner of each glyph in demo.html. The character inside this text box may be invisible; but it can still be copied. See this guide for more info: https://icomoon.io/docs/#local-fonts

You won't need any of the files located under the *demo-files* directory when including the generated font in your own projects.

You can import *selection.json* back to the IcoMoon app using the *Import Icons* button (or via Main Menu → Manage Projects) to retrieve your icon selection.
152 changes: 152 additions & 0 deletions src/views/css/icomoon/demo-files/demo.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
body {
padding: 0;
margin: 0;
font-family: sans-serif;
font-size: 1em;
line-height: 1.5;
color: #555;
background: #fff;
}
h1 {
font-size: 1.5em;
font-weight: normal;
}
small {
font-size: .66666667em;
}
a {
color: #e74c3c;
text-decoration: none;
}
a:hover, a:focus {
box-shadow: 0 1px #e74c3c;
}
.bshadow0, input {
box-shadow: inset 0 -2px #e7e7e7;
}
input:hover {
box-shadow: inset 0 -2px #ccc;
}
input, fieldset {
font-family: sans-serif;
font-size: 1em;
margin: 0;
padding: 0;
border: 0;
}
input {
color: inherit;
line-height: 1.5;
height: 1.5em;
padding: .25em 0;
}
input:focus {
outline: none;
box-shadow: inset 0 -2px #449fdb;
}
.glyph {
font-size: 16px;
width: 15em;
padding-bottom: 1em;
margin-right: 4em;
margin-bottom: 1em;
float: left;
overflow: hidden;
}
.liga {
width: 80%;
width: calc(100% - 2.5em);
}
.talign-right {
text-align: right;
}
.talign-center {
text-align: center;
}
.bgc1 {
background: #f1f1f1;
}
.fgc1 {
color: #999;
}
.fgc0 {
color: #000;
}
p {
margin-top: 1em;
margin-bottom: 1em;
}
.mvm {
margin-top: .75em;
margin-bottom: .75em;
}
.mtn {
margin-top: 0;
}
.mtl, .mal {
margin-top: 1.5em;
}
.mbl, .mal {
margin-bottom: 1.5em;
}
.mal, .mhl {
margin-left: 1.5em;
margin-right: 1.5em;
}
.mhmm {
margin-left: 1em;
margin-right: 1em;
}
.mls {
margin-left: .25em;
}
.ptl {
padding-top: 1.5em;
}
.pbs, .pvs {
padding-bottom: .25em;
}
.pvs, .pts {
padding-top: .25em;
}
.unit {
float: left;
}
.unitRight {
float: right;
}
.size1of2 {
width: 50%;
}
.size1of1 {
width: 100%;
}
.clearfix:before, .clearfix:after {
content: " ";
display: table;
}
.clearfix:after {
clear: both;
}
.hidden-true {
display: none;
}
.textbox0 {
width: 3em;
background: #f1f1f1;
padding: .25em .5em;
line-height: 1.5;
height: 1.5em;
}
#testDrive {
display: block;
padding-top: 24px;
line-height: 1.5;
}
.fs0 {
font-size: 16px;
}
.fs1 {
font-size: 32px;
}

30 changes: 30 additions & 0 deletions src/views/css/icomoon/demo-files/demo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
if (!('boxShadow' in document.body.style)) {
document.body.setAttribute('class', 'noBoxShadow');
}

document.body.addEventListener("click", function(e) {
var target = e.target;
if (target.tagName === "INPUT" &&
target.getAttribute('class').indexOf('liga') === -1) {
target.select();
}
});

(function() {
var fontSize = document.getElementById('fontSize'),
testDrive = document.getElementById('testDrive'),
testText = document.getElementById('testText');
function updateTest() {
testDrive.innerHTML = testText.value || String.fromCharCode(160);
if (window.icomoonLiga) {
window.icomoonLiga(testDrive);
}
}
function updateSize() {
testDrive.style.fontSize = fontSize.value + 'px';
}
fontSize.addEventListener('change', updateSize, false);
testText.addEventListener('input', updateTest, false);
testText.addEventListener('change', updateTest, false);
updateSize();
}());
Loading