Skip to content

Commit

Permalink
Merge pull request #337 from alphagov/update-body-classes-for-govuk-f…
Browse files Browse the repository at this point in the history
…rontend-v5

Update body classes for govuk frontend v5
  • Loading branch information
MartinJJones committed Jun 28, 2024
2 parents 8f7f15c + b23086c commit bb1edff
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Unreleased

* Update body classes for govuk-frontend-v5

# 18.6.0

* Remove the part of the body from the error message for SourceWrapperNotFoundError and do some cleanup
Expand Down
2 changes: 1 addition & 1 deletion lib/slimmer/test_templates/header_footer_only.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<title>Test Template</title>
</head>
<body>
<script>document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');</script>
<script>document.body.className += ' js-enabled' + ('noModule' in HTMLScriptElement.prototype ? ' govuk-frontend-supported' : '');</script>

<header id="global-header">
<div class="header-wrapper"></div>
Expand Down
2 changes: 1 addition & 1 deletion lib/slimmer/test_templates/wrapper.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<title>Test Template</title>
</head>
<body>
<script>document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');</script>
<script>document.body.className += ' js-enabled' + ('noModule' in HTMLScriptElement.prototype ? ' govuk-frontend-supported' : '');</script>

<header id="global-header">
<div class="header-wrapper"></div>
Expand Down

0 comments on commit bb1edff

Please sign in to comment.