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

docs: More legible font colour in dark mode #577

Merged
merged 2 commits into from
Oct 19, 2022

Conversation

cdrage
Copy link
Contributor

@cdrage cdrage commented Oct 11, 2022

Website: More legible font colour in dark mode

What does this PR do?

  • Updates the website with "gray-300" font colour in dark mode, as the
    previous colour was not very legible to read.

Screenshot/screencast of this PR

See below difference:
Screen Shot 2022-10-11 at 1 21 49 PM

vs

Screen Shot 2022-10-11 at 1 18 35 PM

What issues does this PR fix or reference?

N/A (let me know if I need to open an issue)! It's a quickfix for the
website.

How to test this PR?

yarn run docusaurus start

@cdrage cdrage force-pushed the make-font-more-readable branch 2 times, most recently from 362c8df to 46245b2 Compare October 11, 2022 17:22
Copy link
Collaborator

@slemeur slemeur left a comment

Choose a reason for hiding this comment

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

Good catch and nice improvements.


<div className="flex flex-col items-center">
<div className="text-left my-4">
<p className="-ml-5">Current Podman Desktop plug-ins: Podman, Docker, Lima and CRC/OpenShift Local.</p>
<p className="-ml-5 text-base">Current Podman Desktop plug-ins: Podman, Docker, Lima and CRC/OpenShift Local.</p>
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe, instead of defining a new class, it should be the "default" color for dark theme which should be changed?

Copy link
Contributor Author

@cdrage cdrage Oct 12, 2022

Choose a reason for hiding this comment

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

I believe this is actually missing the class! Most <p> have text-base as the class.

@@ -117,7 +117,7 @@ function Hero() {
<h1 className="title-font sm:text-4xl text-3xl lg:text-6xl mb-4 font-medium text-gray-900 dark:text-white">
Containers and Kubernetes for application developers
</h1>
<p className="text-base text-gray-700 dark:text-gray-500 md:text-lg">
<p className="text-base text-gray-700 md:text-lg">
Copy link
Collaborator

Choose a reason for hiding this comment

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

text-gray-700 is supposed to be giving the color to the paragraph.
Here, by overriding the class, you are defining the color in another place and it's not following the "tailwind" practices.

I think it would be easier to switch the color of the paragraph to text-gray-100 or something like that.
You can check the colors provided out of the box by tailwind here: https://tailwindcss.com/docs/text-color

Copy link
Contributor Author

@cdrage cdrage left a comment

Choose a reason for hiding this comment

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

I've gone ahead and updated the PR! I didn't actually need the dark: class.

Looks like the custom css will accurate fix all the issues with the legibility.

Still learning tailwindcss, so hopefully this looks good!


<div className="flex flex-col items-center">
<div className="text-left my-4">
<p className="-ml-5">Current Podman Desktop plug-ins: Podman, Docker, Lima and CRC/OpenShift Local.</p>
<p className="-ml-5 text-base">Current Podman Desktop plug-ins: Podman, Docker, Lima and CRC/OpenShift Local.</p>
Copy link
Contributor Author

@cdrage cdrage Oct 12, 2022

Choose a reason for hiding this comment

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

I believe this is actually missing the class! Most <p> have text-base as the class.

@cdrage
Copy link
Contributor Author

cdrage commented Oct 12, 2022

Linter still failing, going to update this PR 👍

@cdrage cdrage changed the title Website: More legible font colour in dark mode docs: More legible font colour in dark mode Oct 12, 2022
@cdrage cdrage force-pushed the make-font-more-readable branch 2 times, most recently from 0de8655 to 720772a Compare October 12, 2022 19:27
website/src/css/custom.css Outdated Show resolved Hide resolved
@cdrage cdrage force-pushed the make-font-more-readable branch 2 times, most recently from bccbea4 to fcfb0f5 Compare October 13, 2022 14:14
@cdrage
Copy link
Contributor Author

cdrage commented Oct 13, 2022

Updated!

I've:

  • Made it more "tailwindcss"-like, not using a custom.css file
  • Fixed some of the classes that had font set incorrectly or didn't need it (font colour set by the section)

Copy link
Collaborator

@benoitf benoitf left a comment

Choose a reason for hiding this comment

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

reported few minor fixes

thanks 👍

@cdrage cdrage force-pushed the make-font-more-readable branch 2 times, most recently from 04a670f to 5c8e987 Compare October 13, 2022 19:30
### What does this PR do?

* Updates the website with "gray-300" font colour in dark mode, as the
  previous colour was not very legible to read.

### Screenshot/screencast of this PR

<!-- Please include a screenshot or a screencast explaining what is doing this PR -->

See below difference:

### What issues does this PR fix or reference?

<!-- Please include any related issue from Podman Desktop repository (or from another issue tracker).
-->

N/A (let me know if I need to open an issue)! It's a quickfix for the
website.

### How to test this PR?

`yarn run docusaurus start`

<!-- Please explain steps to reproduce -->

Signed-off-by: Charlie Drage <charlie@charliedrage.com>

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
Signed-off-by: Charlie Drage <charlie@charliedrage.com>
@benoitf
Copy link
Collaborator

benoitf commented Oct 17, 2022

@slemeur is it ok for you, now ?

@slemeur
Copy link
Collaborator

slemeur commented Oct 19, 2022

LGTM 👍

@cdrage cdrage merged commit 213460f into containers:main Oct 19, 2022
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.

None yet

3 participants