You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read the console error message carefully (if applicable)
Description
Blog section, left sidebar menu. On hover it highlights items, when clicked (blog page opened), highlight disappears.
Highlight still works in 2.0.0-beta.0 version, but all later versions - no.
We use latest docusaurus version: 2.0.0-beta.6. Using default preset-classic theme and double blog sections.
Tried adding second blog section there. But failed. Copying my docusaurus configuration did not help. Sandbox configuration complained.)
Downgraded my used version to 2.0.0-beta.0, left sidebar highlight started working. Upgraded to 2.0.0-beta.6 - styles adjusted and active item highlight does not work.
Expected behavior
When clicking on blog item, it should remain active.
Actual behavior
Sidebar items highlight only on hover.
If I run docusaurus in local environment, highlight works. When I build and serve - highlight does not work. docusaurus site blog shows everything correctly.
I see problem in CSS declaration. Primary (highlighted) color is override with color-base. Order is important. Or active class value should include !important, then later declaration will not override.
Active item link has two classes: item-link and item-link-active. Both styles are merged. And both declare color. Later overrides first declaration.
See screenshot with active item selected:
https://docusaurus.io/blog/ in final css file first is declared sidebarItemLink, then sidebarItemLinkActive. The same order is when I run local development version. When I build, css classes are renamed and swapped places.
I did not install separate blog plugin, just reusing built-in from @docusaurus/preset-classic.
The text was updated successfully, but these errors were encountered:
zmogas
added
bug
An error in the Docusaurus core causing instability or issues with its execution
status: needs triage
This issue has not been triaged by maintainers
labels
Sep 13, 2021
🐛 Bug Report
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
Blog section, left sidebar menu. On hover it highlights items, when clicked (blog page opened), highlight disappears.
Highlight still works in 2.0.0-beta.0 version, but all later versions - no.
We use latest docusaurus version: 2.0.0-beta.6. Using default preset-classic theme and double blog sections.
Have you read the Contributing Guidelines on issues?
Yes.
Steps to reproduce
(Use https://new.docusaurus.io to create a CodeSandbox reproducible demo of the bug.
Tried adding second blog section there. But failed. Copying my docusaurus configuration did not help. Sandbox configuration complained.)
Downgraded my used version to 2.0.0-beta.0, left sidebar highlight started working. Upgraded to 2.0.0-beta.6 - styles adjusted and active item highlight does not work.
Expected behavior
When clicking on blog item, it should remain active.
Actual behavior
Sidebar items highlight only on hover.
If I run docusaurus in local environment, highlight works. When I build and serve - highlight does not work. docusaurus site blog shows everything correctly.
I see problem in CSS declaration. Primary (highlighted) color is override with color-base. Order is important. Or active class value should include
!important
, then later declaration will not override.Active item link has two classes: item-link and item-link-active. Both styles are merged. And both declare color. Later overrides first declaration.
See screenshot with active item selected:
https://docusaurus.io/blog/ in final css file first is declared sidebarItemLink, then sidebarItemLinkActive. The same order is when I run local development version. When I build, css classes are renamed and swapped places.
Your environment
One blog is configured via presets:
another blog is configured via plugins:
I did not install separate blog plugin, just reusing built-in from @docusaurus/preset-classic.
The text was updated successfully, but these errors were encountered: