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

Darkmode for docs and webconfig #8043

Merged
merged 8 commits into from
Jun 5, 2021
Merged

Darkmode for docs and webconfig #8043

merged 8 commits into from
Jun 5, 2021

Conversation

faho
Copy link
Member

@faho faho commented Jun 2, 2021

Description

This uses the prefers-color-scheme media query to choose between a dark and a light colorscheme for both the docs and fish_config. It's pure css, no script or anything.

To see the changes, you'll have to set your dark mode preference or open up the devtools and force-enable it there. Firefox on linux should "just work" if you have a dark system colorscheme, chromium needs to be started as chromium --force-dark-mode.

Some screenshots:

fish_config

Screenshot 2021-06-02 at 18-32-20 fish shell configuration
Screenshot 2021-06-02 at 18-32-31 fish shell configuration
Screenshot 2021-06-02 at 18-42-22 fish shell configuration
Screenshot 2021-06-02 at 18-32-47 fish shell configuration

The docs

Screenshot 2021-06-02 at 18-33-35 The fish language — fish-shell 3 2 2-356-gad3873079 documentation
Screenshot 2021-06-02 at 18-33-49 Interactive use — fish-shell 3 2 2-356-gad3873079 documentation
Screenshot 2021-06-02 at 18-34-05 The fish language — fish-shell 3 2 2-356-gad3873079 documentation

TODOs:

  • [N/A] Changes to fish usage are reflected in user documentation/manpages.
  • [N/A] Tests have been added for regressions fixed
  • User-visible changes noted in CHANGELOG.rst

faho added 6 commits June 2, 2021 17:33
Emphasizes that they belong together
This makes changing it harder and is unnecessary
This uses the prefers-color-scheme media query to pick between dark and light mode,
so the user automatically gets the colorscheme they prefer.
@faho faho added enhancement docs An issue/PR that touches or should touch the docs labels Jun 2, 2021
@faho faho added this to the fish 3.3.0 milestone Jun 2, 2021
@IlanCosman
Copy link
Contributor

I think I like what Dark Reader does a bit more:

Screenshot (1)
Screenshot (2)

The really deep blue background feels rather oppressive, and I prefer a more gray-black than bluish-black. I think that's also more in line with what most text editors use.

@faho
Copy link
Member Author

faho commented Jun 2, 2021

One thing I would like to know is how well it works with older sphinx versions - I think there's been a semi-recent change to footnotes?

@faho
Copy link
Member Author

faho commented Jun 2, 2021

@IlanCosman How about something more like this
Screenshot 2021-06-02 at 18-56-06 The fish language — fish-shell 3 2 2-356-gad3873079 documentation

I would prefer to keep the blue tint because we also have one in the light version, and it has a bit of a nautical theme.

Make a bit less ultra-dark blue
@IlanCosman
Copy link
Contributor

@faho Much nicer! And I agree with the nautical vibe. I'd say make the background a bit lighter and more blue, and it would be good to go 😄

@faho faho merged commit 7a5e192 into fish-shell:master Jun 5, 2021
faho added a commit to faho/fish-site that referenced this pull request Jun 6, 2021
The colors are roughly the same as in
fish-shell/fish-shell#8043.

One fly in the ointment is that the distro logos don't look good on a
dark background, so we add a cheesy white background to them.
faho added a commit to faho/fish-site that referenced this pull request Jun 9, 2021
The colors are roughly the same as in
fish-shell/fish-shell#8043.

One fly in the ointment is that the distro logos don't look good on a
dark background, so we add a cheesy white background to those that need it.
faho added a commit to fish-shell/fish-site that referenced this pull request Jun 9, 2021
The colors are roughly the same as in
fish-shell/fish-shell#8043.

One fly in the ointment is that the distro logos don't look good on a
dark background, so we add a cheesy white background to those that need it.
@faho faho deleted the batman-mode branch June 23, 2021 08:39
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
docs An issue/PR that touches or should touch the docs enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants