Parameterized menu link color transition time.#72
Open
Conversation
Signed-off-by: Pece Miloshev <pece@milosev.info>
✅ Deploy Preview for dot-org-hugo-theme-demo ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The transition between
--menu-link-colorand--menu-link-color-hoverwas hard-coded to 0.5s.This is quite obnoxious and was difficult to change as a theme user.
I replaced the hard-coded time with a variable for easier adjustment.
In doing so I also used this variable in couple of more places, rather than just the menu links.
E.g. language selector, search icon filter, etc.
In my opinion best would be to remove all these explicit transition timings.
The implementation is very inconsistent and one can notice bugs immediately if any more extreme values are set.
For example, there is a transition defined in the language selector for the selected language (the one showing on the header), but not for the other languages in the drop down.
So while main menu items, submenus, the search, selected language, etc. are all having this animated transition, the languages in the language-selector menu are just regular links that have no transition defined.
The hamburger button is its own story.
I digress.
There is variable now left to the original value of 0.5s, and everyone can set this timing as they desire.