GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||
GeezerVison is showing github.com — gh-137634: Modernizing `calendar.HTMLCalendar` for HTML Output by Wulian233 · Pull Request #137635 · python/cpython Conversation
|
|
What problem does this solve? This PR changes the default theme to dark and hardcodes some colors -- what is the reason? Could not you just use a custom stylesheet? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
We provide basic dark mode support for the HTML generated by module. In 3.14 and 3.15 we've already added this feature for In this case, the loading order ensures that Regarding The hardcoded colors could potentially be changed, but this would make the code longer :root { --background-color-dark: #121212; --text-color-dark: #e0e0e0; --border-color-dark: #444; } @media (prefers-color-scheme: dark) { body { background-color: var(--background-color-dark); color: var(--text-color-dark); } table.year, table.month, td, th { border-color: var(--border-color-dark); } } |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I do not think we should hardcode any colors. This will simply lead to problems in the future when custom stylesheets becomes dependent on these values and they will be changed again. This also makes the HTML code longer. If you need calendar in dark mode, just create a custom stylesheet. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thank you for the suggestion. I will add them this weekend. Also, do you think it should support dark mode? 👀 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I think dark mode would be useful, but can it be done without hardcoding colours? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
should light mode take precedent here? Would it be better to switch to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Searching GitHub:
I don't notice any flash, but it's with a local |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.