feat: add slight delay in color mode transitions#407
feat: add slight delay in color mode transitions#407orimdominic wants to merge 6 commits intoadityatelange:masterfrom orimdominic:feat/color-mode-transition-delay
Conversation
|
I think it looks great, but there's one thing I don't like; the transition fires when the page is first loaded, so the page fades in instead of just appearing as it normally does. Also, I think the transition should be applied to |
|
@kdkasad Thanks |
assets/css/common/post-single.css
Outdated
| @@ -267,6 +267,7 @@ | |||
| background: var(--code-bg); | |||
| border-radius: var(--radius); | |||
| padding: .4em | |||
There was a problem hiding this comment.
Missing semicolon. This messes up the padding of TOC elements.
There was a problem hiding this comment.
I thought as much. This was what came to mind
Thanks.
I'm on the page load issue at the moment |
|
How do I deploy to test these changes so that I can see what you see before I push new commits? |
It's because of a missing semicolon. See my previous comment |
I just run |
That is what I do, but I don't see text. |
Ah. I have the Here are the commands to set that up: $ cd $WORKDIR # for me, $WORKDIR is ~/code/papermod
$ mkdir exampleSite
$ git clone https://github.com/adityatelange/hugo-PaperMod
$ cd hugo-PaperMod
$ git worktree add ../exampleSite exampleSite
$ cd ../exampleSite/themes
$ rm -rf hugo-PaperMod
$ ln -s ../../hugo-PaperMod hugo-PaperModAfter that, you'll have the following directory structure: Then run |
Awesome! |
|
@kdkasad Update Sorry for the delay. I'm working on some other projects. |
No problem taking your time; there's no need to rush. As for why the delay happens on page load, it's because the stylesheet originally loads the page in the light theme, and the page's JavaScript instantly switches it to the dark theme when it's been selected. I think the only way to fix this is to set the |
|
@kdkasad Thanks |
kdkasad
left a comment
There was a problem hiding this comment.
The color switch on page load seems to be solved, but one transition was removed which shouldn't have been.
assets/css/common/post-entry.css
Outdated
| background: var(--entry); | ||
| border-radius: var(--radius); | ||
| transition: transform .1s; | ||
| transition: background-color 350ms, border 350ms; |
There was a problem hiding this comment.
This should be changed to the following, otherwise the second rule will override the first, effectively canceling it.
transition: transform .1s, background-color 350ms, border 350ms;There was a problem hiding this comment.
Apologies.
I'm working on a serious bug on another project currently.
I half-mindedly added that so I could go back to the project.
Fixing it soon
kdkasad
left a comment
There was a problem hiding this comment.
Looks good!
Sorry for all the comments and requests for tiny changes; only maintainers have the ability to add commits to a pull request, so commenting is the only way for me to make changes, no matter how trivial.
|
@kdkasad This feature is 50% my work and 50% your work. |
|
@kdkasad This PR has not been merged. |
I'm not sure. @adityatelange is the maintainer, so it's up to him to merge PRs. However I suspect that the conflict may be one reason he hasn't merged it. I'd recommend rebasing on the latest commit if you can. |
… into feat/color-mode-transition-delay
|
Kudos, SonarCloud Quality Gate passed!
|
|
@adityatelange Could you please give this a review? Thanks. |
I am so sorry to keep you waiting. |
|
@adityatelange PS: You just taught me a practical lesson in Don't give users a feature they cannot configure to their taste |
IMO that is not easy to override and keep CSS styling with Hugo without using Hugo extended tricks. |
|
Alright. Thanks! |
Add slight delay in color mode transitions
Here is a sample deployed