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

color value was in quotes, was bad syntax. tested by making it #3f3 b… #1094

Merged
merged 3 commits into from
May 6, 2020

Conversation

rleir
Copy link
Contributor

@rleir rleir commented Apr 30, 2020

…right lime green temporarily.

Description of proposed changes

What is the goal of this pull request? What does this pull request change?
Fix invalid CSS detected by a linter. My goal is mainly to clean all the minor lint warnings so the linter becomes useful again.

Related issue(s)

Fixes #1081
Related to #

Testing

What steps should be taken to test the changes you've proposed?
I tested by setting the color value to 3f3 bright lime green temporarily. It only affects the entropy scale lines and the text 'This work is made possible by the open...'. It would probably have historically colored most of the text in the UI. When it was not working someone corrected the color by creating 'darkgrey' or similar.

If you added or changed behavior in the codebase, did you update the tests, or do you need help with this?
No change to the tests but I can do if you would like me to.

Thank you for contributing to Nextstrain!

Copy link
Member

@jameshadfield jameshadfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rleir -- the removal of quotation marks is good, but the hex value should either be #333 or #333333 (both are valid CSS as far as I'm aware), not #010101 as introduced in this PR

@rleir
Copy link
Contributor Author

rleir commented May 1, 2020

Hi James, @jameshadfield
This color value controls text color in few places on the display as noted: the scale lines and some text towards the bottom of the page. The 010101 value was chosen so there would be no change to what is displayed, so we would pass the integration tests. It is also marginally better for contrast, though the difference is hard to detect visually. Which would you like, 333 or 010101? Or we could remove the line completely from the CSS and pass all tests, with no visual difference. I will change it to #333 as requested, and we will have to update the integration test. I will do it tomorrow unless told otherwise.

The original design intent seems to be to control text color centrally for the whole app. If we had time on our hands we could remove other text color settings throughout the app, and control all text color from this one line.
thanks -- Rick

Copy link
Member

@jameshadfield jameshadfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit more complex than first suspected I believe. You are absolutely correct that "#333" is invalid and thus ignored. However the fallback color differs across the app, depending on the element in question's hierarchy. For instance, the footer text falls back to "rgb(136, 136, 136)" (grey) not #010101. I think the best solution is just to remove color entirely from the global CSS here which matches the current app behavior.

@jameshadfield
Copy link
Member

(The Integration tests most probably don't cover the footer text yet)

@rleir
Copy link
Contributor Author

rleir commented May 5, 2020

Agreed, let's remove it. I will make the change in the PR when I get a moment.

@rleir
Copy link
Contributor Author

rleir commented May 6, 2020

Hi James @jameshadfield To pass the integration test, your options are color: #010101 or remove this attribute completely here as has been done. Now moving on to more important issues (suggestions please?)
Thanks
Rick

Copy link
Member

@jameshadfield jameshadfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rleir for your work here and elsewhere. I'll update the list of open issues etc (https://github.com/orgs/nextstrain/projects/5) tonight

@jameshadfield jameshadfield merged commit 5679742 into nextstrain:master May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

invalid css (minor)
2 participants