Skip to content

Commit d854e69

Browse files
committed
fix: mobile top-right menu UX
1 parent 3b51b0c commit d854e69

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

decidim-core/app/helpers/decidim/menu_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def mobile_breadcrumb_root_menu
4747
@mobile_breadcrumb_root_menu ||= ::Decidim::BreadcrumbRootMenuPresenter.new(
4848
:mobile_menu,
4949
self,
50-
container_options: { class: "menu-bar__dropdown-menu" }
50+
container_options: { class: "menu-bar__main-dropdown__top-menu" }
5151
)
5252
end
5353

decidim-core/app/packs/stylesheets/decidim/_header.scss

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,35 @@ header {
402402
}
403403
}
404404

405+
&__top {
406+
@apply w-full px-4;
407+
408+
&-menu {
409+
@apply w-full md:w-1/2 mt-0 grid md:grid-cols-2 gap-x-6 text-secondary;
410+
411+
> * {
412+
@apply py-3 md:py-3.5 border-b last:border-0 border-gray-3;
413+
414+
/* since the grid has 2 columns, remove the border for these last 2 columns */
415+
&:nth-last-child(-n + 2) {
416+
@apply md:border-0;
417+
}
418+
}
419+
420+
a {
421+
@apply flex items-center justify-start gap-1 font-semibold text-lg text-secondary;
422+
423+
span {
424+
@apply min-w-0 truncate;
425+
}
426+
427+
svg {
428+
@apply flex-none fill-current;
429+
}
430+
}
431+
}
432+
}
433+
405434
&__bottom {
406435
@apply hidden md:flex;
407436
}

0 commit comments

Comments
 (0)