Skip to content

New approach for menu (fix #576)

Nicolas Frandeboeuf requested to merge nicofrand/kresus:fix-menu into master

The current menu has a fixed width (320px) and its children have the same fixed width so that when the menu width is decreased, the children are not shrinked (visually not cool). However, when the menu has a scrollbar (on desktop mainly, since the scrollbar is quite large), the children are cropped because the scrollbar appears on top of it.

This is a new approach for the menu which allows the nav children to have a calculated width (space available = parent width minus scrollbars) instead of fixed width (= to parent width, so that the content isn't shrinked when closing the menu), fixes #576 (closed).

The menu still has a fixed width but its children now have the available width. The width of the menu itself is not decreased anymore. The width-decrease is now applied on a pseudo element before the menu, which is not visible (set on the left of the screen).

Would need new tests on mobile etc.

Edited by Nicolas Frandeboeuf

Merge request reports