1+ $app-dark-mode-blue : #348de0 ;
2+ $app-dark-mode-background : #1C1C1C ;
3+ $app-dark-mode-background-secondary : tint ($app-dark-mode-background , 10% );
4+ $app-dark-mode-white : #E8E8E8 ;
5+ $app-dark-mode-text-colour : $app-dark-mode-white ;
6+ $app-dark-mode-text-colour-secondary : shade ($app-dark-mode-text-colour , 30% );
7+
8+ // Links
9+ $app-dark-mode-link-color : $app-dark-mode-blue ;
10+ $app-dark-mode-link-hover-color : tint ($color_nhsuk-dark-pink , 50% );
11+ $app-dark-mode-link-active-color : shade ($app-dark-mode-link-color , 20% );
12+ $app-dark-mode-link-visited-color : tint ($color_nhsuk-purple , 50% );
13+
14+ // Paul's colours
15+ $app-dark-mode-link-color : #348de0 ;
16+ $app-dark-mode-link-hover-color : #ffeb3b ;
17+ $app-dark-mode-link-active-color : #000 ;
18+ $app-dark-mode-link-visited-color : #89b ;
19+
20+
21+ @mixin app-dark-mode-focused-text {
22+ background-color : $nhsuk-focus-color ;
23+ box-shadow :
24+ 0 -2px $nhsuk-focus-color ,
25+ 0 $nhsuk-focus-width $nhsuk-focus-text-color ;
26+ color : $nhsuk-focus-text-color ;
27+ // When colours are overridden, for example when users have a dark mode,
28+ // backgrounds and box-shadows disappear, so we need to ensure there's a
29+ // transparent outline which will be set to a visible colour.
30+ outline : $nhsuk-focus-width solid transparent ;
31+ // When link is focussed, hide the default underline since the
32+ // box shadow adds the "underline"
33+ text-decoration : none ;
34+ }
35+
36+ @mixin app-dark-mode-link-style-default {
37+ color : $app-dark-mode-blue ;
38+
39+ & :visited {
40+ color : $app-dark-mode-link-visited-color ;
41+ }
42+
43+ & :hover {
44+ color : $app-dark-mode-link-hover-color ;
45+ text-decoration : none ;
46+ }
47+
48+ & :focus {
49+ @include nhsuk-focused-text ();
50+
51+ & :hover {
52+ text-decoration : none ;
53+ }
54+
55+ & :visited {
56+ color : $nhsuk-focus-text-color ;
57+ }
58+
59+ .nhsuk-icon {
60+ fill : $nhsuk-focus-text-color ;
61+ }
62+ }
63+
64+ & :active {
65+ color : $app-dark-mode-link-active-color ;
66+ }
67+ }
68+
69+ .app-dark-mode {
70+
71+ background : $app-dark-mode-background ;
72+ color : $app-dark-mode-text-colour ;
73+
74+ // Text colour
75+ .nhsuk-fieldset__legend {
76+ color : $app-dark-mode-text-colour ;
77+ }
78+
79+ // Secondary text colour
80+ .nhsuk-hint ,
81+ .app-text-grey ,
82+ .nhsuk-caption-l ,
83+ .nhsuk-caption-m ,
84+ .nhsuk-caption-s ,
85+ .app-suppress-link-styles * {
86+ color : $app-dark-mode-text-colour-secondary ;
87+ }
88+
89+ // Links and link type things
90+ a , .app-secondary-navigation__link {
91+ @include app-dark-mode-link-style-default ;
92+
93+ & :focus {
94+ @include app-dark-mode-focused-text ;
95+ }
96+ }
97+
98+ .app-secondary-navigation__link :link {
99+ color : $app-dark-mode-link-color ;
100+ & :focus {
101+ @include app-dark-mode-focused-text ;
102+ }
103+ }
104+
105+ .app-secondary-navigation__list-item--current {
106+ border-color : $app-dark-mode-white ;
107+ }
108+
109+ .app-secondary-navigation__list-item--current .app-secondary-navigation__link :link ,
110+ .app-secondary-navigation__list-item--current .app-secondary-navigation__link :visited {
111+ color : $app-dark-mode-text-colour ;
112+ & :focus {
113+ @include app-dark-mode-focused-text ;
114+ }
115+ }
116+
117+ .nhsuk-link--no-visited-state {
118+ color : $app-dark-mode-link-color ;
119+ & :focus {
120+ @include app-dark-mode-focused-text ;
121+ }
122+ }
123+
124+
125+
126+ .nhsuk-back-link {
127+ .nhsuk-icon__chevron-left {
128+ fill : $app-dark-mode-link-color ;
129+ }
130+ }
131+ .nhsuk-back-link__link {
132+
133+ & :visited {
134+ color : $app-dark-mode-link-color ;
135+ }
136+
137+ & :hover {
138+ color : $app-dark-mode-link-hover-color ;
139+ text-decoration : underline ;
140+
141+ .nhsuk-icon__chevron-left {
142+ fill : $app-dark-mode-link-hover-color ;
143+ }
144+ }
145+
146+ & :focus {
147+ .nhsuk-icon__chevron-left {
148+ fill : $nhsuk-focus-text-color ;
149+ }
150+ }
151+ }
152+
153+ .nhsuk-button {
154+ & :link , & :visited , & :active , & :hover {
155+ color : white ;
156+ }
157+ }
158+
159+ .nhsuk-header {
160+ a {
161+ color : $app-dark-mode-text-colour ;
162+
163+ & :visited {
164+ color : $app-dark-mode-text-colour ;
165+ }
166+ & :focus {
167+ @include app-dark-mode-focused-text ;
168+ }
169+
170+ }
171+ // background: $app-dark-mode-background-secondary;
172+ color : $app-dark-mode-text-colour ;
173+
174+ .nhsuk-header__account , .nhsuk-header__account-item {
175+ // background: $app-dark-mode-background;
176+ outline : 1px solid rgba (255 , 255 , 255 , 0.2 );
177+ }
178+ }
179+
180+ .app-count {
181+ background : $app-dark-mode-background-secondary ;
182+ color : $app-dark-mode-text-colour ;
183+ }
184+ // Component overrides
185+ .nhsuk-card {
186+ background : $app-dark-mode-background-secondary ;
187+ color : $app-dark-mode-text-colour ;
188+
189+ .nhsuk-card__heading--feature {
190+ // background: $app-dark-mode-blue;
191+ color : $app-dark-mode-text-colour ;
192+ }
193+ }
194+
195+ .nhsuk-footer , .nhsuk-footer-container {
196+ background : $app-dark-mode-background-secondary ;
197+ color : $app-dark-mode-text-colour ;
198+
199+ .nhsuk-footer__list-item-link , .nhsuk-footer__copyright {
200+ color : $app-dark-mode-text-colour-secondary ;
201+ }
202+ }
203+
204+ .nhsuk-radios {
205+ .nhsuk-radios__input + .nhsuk-radios__label ::before {
206+ border-color : $app-dark-mode-white ;
207+ background-color : $app-dark-mode-background-secondary ;
208+ }
209+ .nhsuk-radios__input + .nhsuk-radios__label ::after {
210+ background : $app-dark-mode-white ;
211+ border : 10px solid $app-dark-mode-white ;
212+ }
213+ }
214+
215+ .nhsuk-checkboxes {
216+ .nhsuk-checkboxes__input + .nhsuk-checkboxes__label ::before {
217+ // border-color: $app-dark-mode-white;
218+ // background-color: $app-dark-mode-background-secondary;
219+ background : $app-dark-mode-background-secondary ;
220+ border-color : $app-dark-mode-text-colour-secondary ;
221+ }
222+ .nhsuk-checkboxes__input + .nhsuk-checkboxes__label ::after {
223+ // background: $app-dark-mode-white;
224+ // border: 10px solid $app-dark-mode-white;
225+ }
226+ }
227+
228+ .nhsuk-checkboxes__conditional {
229+ border-left-color : $app-dark-mode-text-colour-secondary ;
230+ }
231+
232+ .app-notification-banner__content {
233+ color : $app-dark-mode-text-colour ;
234+ background : $app-dark-mode-background-secondary ;
235+ }
236+ }
237+
238+ html :has (.app-dark-mode ) {
239+ background-color : $app-dark-mode-background-secondary ;
240+ background : $app-dark-mode-background-secondary ;
241+ color : $app-dark-mode-text-colour ;
242+ }
0 commit comments