Skip to content

Commit

Permalink
🐛 fix(header, navigation): focus des nav-items mobile & ajustements […
Browse files Browse the repository at this point in the history
…DS-3216] (#609)

- L'outline de focus est maintenant entièrement visible sur les liens des sous menu en mobile
- Ajustement de l'alignement du bouton fermé en desktop
- Retrait du mega-menu__leader vide dans les examples
  • Loading branch information
keryanS authored Jun 19, 2023
1 parent 672d4a4 commit 1a06a37
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/component/header/style/module/_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

&__list {
max-width: calc(100% + #{space(4v)});
@include margin(0 -4v);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/component/navigation/example/sample/navigation.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const getMega = (active = false, leader = false) => {
type: 'mega-menu',
label: 'Entrée mega menu',
close: 'Fermer le menu',
leader: leader ? {
...(leader && {leader: {
title: 'Titre éditorialisé',
text: lorem(),
link: {
Expand All @@ -73,7 +73,7 @@ const getMega = (active = false, leader = false) => {
iconPlace:'right',
icon: 'arrow-right-line'
}
} : null,
}}),
categories: [
getCategory(),
getCategory(),
Expand Down
1 change: 0 additions & 1 deletion src/component/navigation/style/module/_default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
@include respond-from(lg) {
flex-direction: row;
flex-wrap: nowrap;
@include margin(0 -4v);

& > *:first-child:nth-last-child(2) ~ *,
& > *:first-child:nth-last-child(3) ~ *,
Expand Down
8 changes: 5 additions & 3 deletions src/component/navigation/style/module/_mega-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@

#{ns(mega-menu)} {
@include margin(0 -4v 1px);
@include padding(0 4v 0);

@include respond-from(lg) {
@include absolute(100%, 0, null, 0);
@include margin(0);
@include padding(0);

@include after('', block) {
@include padding-bottom(9v);
@include padding-bottom(6v);
}
}

Expand All @@ -22,6 +21,8 @@
}

> #{ns(container)} {
@include padding(2v 4v 0);
@include padding(0 6v, lg);
@include respond-from(lg) {
@include before('', block) {
@include padding-top(4v);
Expand All @@ -33,6 +34,7 @@
display: none;
@include respond-from(lg) {
display: flex;
@include margin-right(0);
}
}

Expand All @@ -47,7 +49,7 @@
&__leader {
@include enable-underline;
@include padding-x(4v);
@include padding-top(4v);
@include padding-top(2v);
@include padding-top(0, lg);
@include padding-x(0, lg);
@include set-text-margin(0 0 2v);
Expand Down
4 changes: 2 additions & 2 deletions src/component/sidemenu/style/module/_list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
font-weight: font-weight('bold');

#{ns(sidemenu__list)} {
@include margin(0 2v 6v);
@include margin(0 4v, md);
@include margin(0 2v 4v);
@include margin(0 4v 4v, md);
font-weight: font-weight();

#{ns(sidemenu__link)},
Expand Down

0 comments on commit 1a06a37

Please sign in to comment.