Cyfrin / solidity-by-example.github.io

Solidity By Example
https://solidity-by-example.org/
MIT License
605 stars 191 forks source link

contrast is too low for code keywords... #179

Closed kylebakerio closed 3 years ago

kylebakerio commented 3 years ago

dark mode doesn't fix this for me, it's just a CSS issue.

in Foundation.css, here:

.hljs-code,
.hljs-number,
.hljs-literal,
.hljs-keyword,
.hljs-selector-tag {
  color: #099;
}

Changing#099 to #0758fc increases the contrast from 3 (insufficient) to 4.74 (passing) according to devtools.

will dig in and see if I can do a quick pull request.

kylebakerio commented 3 years ago

checked. Looks like it's a lib imported in src/components/Html.tsx. I am not familiar enough with this code context to just throw in a quick fix for this to do a CSS override in this context, unfortunately, but I hope someone else can.

kylebakerio commented 3 years ago

For now I've downloaded the stylebot chrome extension and added in this rule:

.hljs-code, .hljs-keyword, .hljs-literal, .hljs-number, .hljs-selector-tag {
    color: #0758fc;
}

works for now.

kylebakerio commented 3 years ago

I've made some improvements to the readability of the comments as well--currently, these are the override styles I'm applying:

.hljs-code, .hljs-keyword, .hljs-literal, .hljs-number, .hljs-selector-tag {
    color: #0758fc;
}

pre {
  background: #f5f5f5;
}

.hljs-comment, .hljs-quote {
    color: #5f5f55;
}
t4sk commented 3 years ago

@kylebakerio Thanks