Skip to content

Commit

Permalink
Améliorations visuelles du breadcrumb dropdown (#731)
Browse files Browse the repository at this point in the history
* Improve margins between breadcrumb dropdown items
* Increase min width of breadcrumb dropdown
* Fix position of last breadcumb item dropdown
  • Loading branch information
alinekeller authored Jun 13, 2024
1 parent 9a6b9c6 commit 99f72d6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
</div>
</li>
<li class="breadcrumb-item">
<a class="bread-link" href="#">School of Architecture, Civil and Environmental Engineering</a>
<a class="bread-link" href="#">ENAC</a>
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-controls="dropdown-menu-2">
{% include '@atoms/icon/icon.twig' with { icon: 'arrow-down-circle', icon_classes:'feather' } %}
<span class="sr-only">Display same level pages – School of Architecture, Civil and Environmental Engineering</span>
<span class="sr-only">Display same level pages – ENAC</span>
</button>
<ul class="dropdown-menu" id="dropdown-menu-2">
<li class="dropdown-item current-menu-item-parent"><a href="#">School of Architecture, Civil and Environmental Engineering</a></li>
<li class="dropdown-item current-menu-item-parent"><a href="#">School of Architecture, Civil and Environmental Engineering (ENAC)</a></li>
<li class="dropdown-item"><a href="#">School of Computer and Communication Sciences</a></li>
<li class="dropdown-item"><a href="#">School of Basic Sciences</a></li>
<li class="dropdown-item"><a href="#">School of Engineering</a></li>
Expand Down
9 changes: 8 additions & 1 deletion assets/components/molecules/breadcrumb/breadcrumb.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
}

li:last-child {
padding-right: 5rem;
margin-right: 5rem;
}
}
}
Expand Down Expand Up @@ -211,6 +211,8 @@
}

.breadcrumb .dropdown-menu {
min-width: 11.5rem;

&.show {
// dropdown position depends on the <li>, not the button
top: 1.65rem !important;
Expand All @@ -227,11 +229,16 @@
.breadcrumb .dropdown-item {
padding: 0.125em 0.625rem;
font-size: 0.83rem;
line-height: 1.3em;

a {
display: block;
}

& + .dropdown-item {
margin-top: 0.5rem;
}

&.current-menu-item,
&.current-menu-item-parent {
font-weight: bold;
Expand Down

0 comments on commit 99f72d6

Please sign in to comment.