-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Make highlight-color lighter yellow #810
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should have reviewed instead of comment. I'll request more changes here, I don't think the current change is the best solution to this problem.
Thanks @agjohnson! I like your proposal. I will give it a try. |
Just for the records, I was able to |
How does this new color look when combined with the browser native highlight color using Ctrl-F/Cmd-F? |
@jessetan take a look at these screenshots FirefoxChromeI'm not sure if all the OS use the same colors for this, or if it even depends on some other color settings. |
There are CSS selectors to control the highlight color inside elements, it's something we could add here if we wanted. Do the proposed changes seem okay so far? Is it clear text is highlighted, or does it maybe look too much like a button now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -220,6 +220,9 @@ | |||
background: $highlight-color | |||
display: inline-block | |||
font-weight: bold | |||
font-style: italic | |||
color: #404040 | |||
border-bottom: 2px solid rgb(255, 190, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Colors are already defined as variables, #404040
should be a named color already. The yellow you have defined here is different than the yellow defined via Wyrm and should be used as a named color variable either way.
I'd also support using #404040
as the font color for #search-results
, so that the text in our search results is easier to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly, wyrm defines gray-dark
as #333333
and gray
as #555555
. So, they are not exactly the same as #404040
. What I should do?
I was thinking on adding as a variable with the highlight-
prefix, like:
// Sphinx highlight color
$highlight-background-color: rgba(255, 220, 0, 0.5)
$highlight-text-color: #404040
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from bower_components/wyrm/sass/wyrm_core/_wy_variables.sass
:
$black: #000 !default
$gray-darker: #222 !default
$gray-dark: #333 !default
$gray: #555 !default
$gray-light: #999 !default
$gray-lighter: #ccc !default
$white: #fff !default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd probably use $gray-dark
. The visual difference between #333333
and #404040
is pretty marginal.
@@ -59,7 +59,7 @@ $sidebar-border-color: $table-border-color | |||
$sidebar-title-background-color: $table-border-color | |||
|
|||
// Sphinx highlight color | |||
$highlight-color: $yellow | |||
$highlight-color: rgba(255, 220, 0, 0.5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a different shade of yellow than the defined yellow from Wyrm. It would be better to drop the alpha channel and instead use a tint of the defined yellow from Wyrm. rgb(248,225,135)
is a closer approximation of this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't follow you here.
I found Wyrm defining $yellow
as #F1C40F
which is rgb(241,196,15)
.
Where rgb(248,225,135)
comes from? Why it's better than my suggestion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rgb(248,225,135)
is a lighter tint of $yellow
. HSL is easier to understand than RGB here:
$yellow
==rgb(241, 196, 15)
==hsl(48.1, 89%, 50.2%)
- light yellow ==
hsl(48.1, 89%, 75%)
(we increasedl
(lightness) from 50% to 75%) ==rgb(248, 225, 135)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Niiiice! Thanks a lot of the explanation ;)
Are you referring to |
There are two outstanding changes here around color names/values. Marking WIP. |
I don't think I will come back to this PR again. @benjaoming feel free to re-open and update it if you consider it useful. |
Small change to make the highlight-color a little lighter.
I found that with this change it's easier to read what's highlighted, but still easily realized where is the highlighted text.
Before
After