Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

Commit

Permalink
VOTE-1899: implement new language selector style (#890)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlloydbixal authored Aug 14, 2023
1 parent 3c2b823 commit a2d2567
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
25 changes: 24 additions & 1 deletion assets/styles/component/language-switcher.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@
display: flex;
justify-content: flex-end;
padding: 0.5rem 1rem 0.5rem 0;
.usa-button {
a {
color: #fff;
}
}
}

.usa-language__submenu {
padding: 20px;
width: auto;
border-radius: 3px;
white-space: nowrap;
@media (max-width: 768px) {
overflow: auto;
height: 80vh;
}
@media (min-width: 768px) {
columns: 2 auto;
}
}
.usa-language__submenu-item {
padding: 8px;
border: unset;
}

.switcher-desktop {
Expand All @@ -23,8 +46,8 @@ li.usa-language__submenu-item[data-lang="lang-nv"] {

.usa-language__primary-item:last-of-type .usa-language__submenu {
[dir="rtl"] & {
position: absolute;
right: unset;
left: 0;
padding-right: 0;
}
}
2 changes: 1 addition & 1 deletion layouts/partials/language-switcher.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{{ range .AllTranslations }}
<li class="usa-language__submenu-item" data-lang="lang-{{ .Language.Lang | replaceRE "-[a-z]+" "" }}">
<a href="{{ .Permalink | relURL }}" title="{{ .Permalink | relURL }}"><span lang="{{ .Language.Lang | replaceRE "-[a-z]+" "" }}"
xml:lang="{{ .Language.Lang | replaceRE "-[a-z]+" "" }}"><strong>{{ .Language.LanguageName }} {{ if not (eq .Site.Params.english_languageName "") }}({{ .Site.Params.english_languageName }}){{ end }}</strong></span></a>
xml:lang="{{ .Language.Lang | replaceRE "-[a-z]+" "" }}"><strong>{{ .Language.LanguageName }}</strong> {{ if not (eq .Site.Params.english_languageName "") }}({{ .Site.Params.english_languageName }}){{ end }}</span></a>
</li>
{{ end }}
</ul>
Expand Down

0 comments on commit a2d2567

Please sign in to comment.