-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Convert all non-RGBA colors to RGBA colors #11447
Convert all non-RGBA colors to RGBA colors #11447
Conversation
/botio-linux preview |
311e2ca
to
160a858
Compare
/botio-linux preview |
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.
Sorry, but I've spotted at least one more conversion error here :-P
Please note that I've not checked all values, but I rather just picked a couple at random with the devtools until I stumbled onto a broken one.
Just of of curiosity, how did you convert these values (since unless it's fully scripted, the risk of mistakes makes me a bit wary of these types of changes)?
160a858
to
b9b91bc
Compare
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/ea04c595d195ba9/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/ea04c595d195ba9/output.txt Total script time: 1.73 mins Published |
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.
Sorry, but I have just a few small comments after going through these patches line-by-line.
Furthermore, these patches seem to be missing https://github.com/mozilla/pdf.js/blob/master/test/annotation_layer_builder_overrides.css and please also check https://github.com/mozilla/pdf.js/blob/master/test/text_layer_test.css (although that one seems OK).
This is not only useful to have one format for consistency, but also to be able to quickly search for colors for e.g., finding duplicates or when tweaking the CSS for custom deployments.
b9b91bc
to
e3c0181
Compare
I have also checked the other CSS files. The first one required some changes which are combined in the "three-digit HEX" commit and the last one didn't require changes. |
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/98fd35d6d4343a4/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/98fd35d6d4343a4/output.txt Total script time: 1.73 mins Published |
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/41645b9ce919803/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://54.215.176.217:8877/abef469748c3107/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/41645b9ce919803/output.txt Total script time: 18.86 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.215.176.217:8877/abef469748c3107/output.txt Total script time: 25.62 mins
|
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.
Looks good to me now; thanks for bringing some much needed consistency to this part of the code-base.
Also, sorry about the back-and-forth here during review!
Thank you for the thorough review! |
In our usage instructions for the viewer we state the following:
Users have indicated that this is currently quite hard because we use no less than seven different ways to specify colors in CSS, namely RGB, RGBA, HSL, HSLA, three-digit HEX, six-digit HEX and named, leading to 83 unique color specifications.
This commit series simplifies our color specifications across the entire code base, but in particular in
web/viewer.css
, to specify all colors in RGBA instead. The choice for RGBA is because RGB is well-known for web development and because we need to be able to express opacity (alpha channel) in the color specification. Doing so brings down the number of unique color specifications to 70. This should be acceptable now because quite a few of the unique color specifications are actually opacity variations on the same color, and given that all colors are now in the same format, using find/replace is now possible, making the re-skinning task a lot easier.Fixes #11372.