Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style des liens actifs du upper menu : ajout de la possibilité de choisir entre site et page active #828

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions assets/sass/_theme/configuration/components.sass
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ $header-upper-menu-border-bottom-width: $header-border-bottom-width !default
$header-upper-menu-padding-y: $header-nav-padding-y !default
$header-upper-menu-padding-y-desktop: $header-upper-menu-padding-y !default
$header-upper-menu-mobile-height: pxToRem(50) !default
$header-upper-menu-active-style-for-sites: false !default // set to 'true' to target non external website instead of active page
$header-dropdown-title-summary-font-family: $lead-hero-font-family !default
$header-dropdown-title-summary-font-size: $body-size !default
$header-dropdown-title-summary-font-size-desktop: $lead-hero-size-desktop !default
Expand Down
7 changes: 6 additions & 1 deletion assets/sass/_theme/design-system/header.sass
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,12 @@ header#document-header
padding: $header-upper-menu-padding-y 0
@include media-breakpoint-down(desktop)
line-height: $header-upper-menu-mobile-height
&.active

// apply active style to active page (default) or active site
$upper-menu-active-selector: '.active'
@if $header-upper-menu-active-style-for-sites
$upper-menu-active-selector: ':not([href*="https://"], [href*="http://"])'
Comment on lines +115 to +117
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pourquoi c'est l'un ou l'autre ? ça peut pas être les deux ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ça risque de prêter à confusion, non ?

&#{$upper-menu-active-selector}
box-shadow: inset 0 -4px 0 0 var(--color-border)
@include media-breakpoint-down(desktop)
&.has-upper-menu
Expand Down
Loading