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

[wip] demo day/night with radios #273

Closed
wants to merge 2 commits into from

Conversation

bollwyvl
Copy link
Collaborator

@bollwyvl bollwyvl commented Oct 21, 2020

Hey, folks! Glad to see the theme variable stuff got in. It looks like it still fights with bootstrap a fair amount, but otherwise cool stuff!

As suggested elsewhere, wrapping all themeable content in a wrapper div unlocks the hackish, but usable, CSS-only, flicker-free day/night switch, powered by the ~ selector.

This PR does a very minimal port of some of those techniques, up to where it's at least half-way readable, but has a lot of rough edges in the implementation.

  • I still really recommend doing a CSS variable prefix, e.g. --pst-
  • doing the JS part to write to localStorage right in the DOM, outside webpack... got no time for MBs to load
    • this can be cleaner, though, and should scale to other modes, and/or ones with more than two values
  • defining the CSS variables probably needs an overhaul vs what i've done
    • the selector implementation probably shouldn't leak out
  • currently doesn't handle code syntax highlighting Would night mode *only* in code cells be useful? #204
    • this is a whole, separate ball of wax, but having some answer is probably important enough to block any serious consideration of this at this point

closes #458

@bollwyvl
Copy link
Collaborator Author

hah, well, not going to fight with the linter right now, but here's a screenshot of my bad theme colors:
Screenshot from 2020-10-21 16-05-57

@choldgraf
Copy link
Collaborator

Hey all - I created an issue to track this one so that we don't lose track of it, as I think it is quite important! (#458). @bollwyvl what would you like to do with this PR? Steward it to completion? Re-start now that some of the underlying HTML/CSS has changed?

By the way - you had a few nice suggestions in there as well that might be out of scope for this PR (e.g. CSS prefixes). Do you think some of them deserve their own issues?

(ps: I super appreciate the work that you had put into these PRs in the past and present!)

@12rambau
Copy link
Collaborator

Should it be considered solved by #540 ?
I used this PR as a starting point but I wasn't able to start from it as it's now to far away from master.

@bollwyvl bollwyvl closed this Apr 18, 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.

Dark mode toggle
3 participants