Skip to content

Commit 288c000

Browse files
committed
Add inverse styles
1 parent 3e4314f commit 288c000

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

packages/govuk-frontend/src/govuk/components/language-switcher/_mixin.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,16 @@
3232
@include base.govuk-link-common;
3333
@include base.govuk-link-style-default;
3434
}
35+
36+
.govuk-language-switcher--inverse {
37+
color: base.govuk-colour("white");
38+
39+
.govuk-language-switcher__link {
40+
@include base.govuk-link-style-inverse;
41+
}
42+
43+
.govuk-language-switcher__list-item {
44+
border-right-color: base.govuk-colour("white");
45+
}
46+
}
3547
}

packages/govuk-frontend/src/govuk/components/language-switcher/language-switcher.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,20 @@ examples:
8585
- text: 中文
8686
lang: zh
8787
href: '#/zh'
88+
- name: inverse
89+
screenshot: true
90+
description: Language switcher that appears on dark backgrounds
91+
pageTemplateOptions:
92+
bodyClasses: app-template__body--inverse
93+
options:
94+
classes: govuk-language-switcher--inverse
95+
items:
96+
- text: English
97+
lang: en
98+
current: true
99+
- text: Cymraeg
100+
lang: cy
101+
href: '#/cy'
88102
- name: with translated navigation label
89103
description: When the current page is not in English, translate the `ariaLabel` into the language of the current page.
90104
options:

0 commit comments

Comments
 (0)