Skip to content

Parameterized menu link color transition time.#72

Open
pmilosev wants to merge 1 commit intocncf:mainfrom
pmilosev:menu-color-transition
Open

Parameterized menu link color transition time.#72
pmilosev wants to merge 1 commit intocncf:mainfrom
pmilosev:menu-color-transition

Conversation

@pmilosev
Copy link
Copy Markdown

@pmilosev pmilosev commented Jan 6, 2026

The transition between --menu-link-color and --menu-link-color-hover was 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.

Signed-off-by: Pece Miloshev <pece@milosev.info>
@netlify
Copy link
Copy Markdown

netlify Bot commented Jan 6, 2026

Deploy Preview for dot-org-hugo-theme-demo ready!

Name Link
🔨 Latest commit f0081dd
🔍 Latest deploy log https://app.netlify.com/projects/dot-org-hugo-theme-demo/deploys/695d94604dccd70008b3ea01
😎 Deploy Preview https://deploy-preview-72--dot-org-hugo-theme-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

1 participant