-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document how to add an attribute to template <body> #1071
Conversation
You can preview this change here: Built with commit 8b4f26c https://deploy-preview-1071--govuk-design-system-preview.netlify.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of minor suggestions from me.
@@ -117,6 +117,11 @@ Variables can be set with: | |||
<td class="govuk-table__cell">Add a class to the <code><body></code> element.</td> | |||
</tr> | |||
|
|||
<tr class="govuk-table__row"> | |||
<td class="govuk-table__cell">bodyAttributes</td> | |||
<td class="govuk-table__cell">Add an attribute to the <code><body></code> element.</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of changes suggested, because:
- "an attribute" didn't seem accurate because you can add more than one
- I think it's worth clarifying how to add each attribute, because
bodyAttribute
uses key-value pairs rather than a single value.
<td class="govuk-table__cell">Add an attribute to the <code><body></code> element.</td> | |
<td class="govuk-table__cell">Add attributes to the <code><body></code> element. Add each attribute and its value as a key value pair in the `bodyAttributes` object.</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've committed the tweaks from discussion and 2i - all good with me now :)
Thanks @m-green 👍 Just need to wait for alphagov/govuk-frontend#1623 to be released and then this can be merged. |
Blocked until alphagov/govuk-frontend#1623 is released