Skip to content

Commit 1bbf051

Browse files
Prefer .nhsuk-frontend-supported to .js-enabled
We must avoid adding styles for Internet Explorer 11 (and other older browsers) where support for `<script type="module">` is not available
1 parent 6f82f73 commit 1bbf051

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

backstop.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ module.exports = {
8080
engine_scripts: 'tests/backstop/engine_scripts',
8181
html_report: 'tests/backstop/html_report'
8282
},
83-
readySelector: 'body.js-enabled',
83+
readySelector: 'body.nhsuk-frontend-supported',
8484
report: ['browser'],
8585
scenarios: [
8686
{

docs/contributing/coding-standards.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Bad:
145145
```scss
146146
.nhsuk-checkboxes__conditional {
147147
// ...
148-
.js-enabled &--hidden {
148+
.nhsuk-frontend-supported &--hidden {
149149
// ...
150150
}
151151
// ...
@@ -159,7 +159,7 @@ Good:
159159
// ...
160160
}
161161

162-
.js-enabled .nhsuk-checkboxes__conditional--hidden {
162+
.nhsuk-frontend-supported .nhsuk-checkboxes__conditional--hidden {
163163
// ...
164164
}
165165
```

packages/components/checkboxes/_checkboxes.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,6 @@ $conditional-padding-left: $conditional-border-padding + $nhsuk-checkboxes-label
146146
}
147147
}
148148

149-
.js-enabled .nhsuk-checkboxes__conditional--hidden {
149+
.nhsuk-frontend-supported .nhsuk-checkboxes__conditional--hidden {
150150
display: none;
151151
}

packages/components/header/_header.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@
481481
justify-content: space-between;
482482
}
483483

484-
.js-enabled & {
484+
.nhsuk-frontend-supported & {
485485
flex-wrap: nowrap;
486486
overflow: hidden;
487487
}

packages/components/radios/_radios.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,6 @@ $conditional-padding-left: $conditional-border-padding + $nhsuk-radios-label-pad
169169
}
170170
}
171171

172-
.js-enabled .nhsuk-radios__conditional--hidden {
172+
.nhsuk-frontend-supported .nhsuk-radios__conditional--hidden {
173173
display: none;
174174
}

packages/components/tabs/_tabs.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
@include nhsuk-responsive-margin(8, "bottom");
3939
}
4040

41-
// JavaScript enabled
42-
.js-enabled {
41+
// ES module JavaScript supported
42+
.nhsuk-frontend-supported {
4343
@include govuk-media-query($from: tablet) {
4444
.nhsuk-tabs__list {
4545
border-bottom: 1px solid $nhsuk-border-color;

0 commit comments

Comments
 (0)