Skip to content
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

Remove display:block on hint component #2437

Merged
merged 1 commit into from
Nov 23, 2021
Merged

Conversation

vanitabarrett
Copy link
Contributor

@vanitabarrett vanitabarrett commented Nov 19, 2021

Closes #1856

What

Remove the display: block on the hint component

Why

In v3.8.0 we added the ability for block level elements to be rendered inside hints by switching from using a span to a div.

However, we kept the display: block styling (which would now be redundant as this is the default for divs). This meant we weren't forcing users to update their HTML and we could avoid a breaking change.

We now want to tidy up that redundant CSS as part of v4.0.0.

Note: this work is related to #2083. I think we can probably safely make this change first, without making a decision on #2083. I've added a checklist item to that card to make sure we check the Changelog for this change still makes sense alongside whatever we decide in #2083.

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2437 November 19, 2021 16:50 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2437 November 19, 2021 16:51 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2437 November 19, 2021 16:57 Inactive
@vanitabarrett vanitabarrett marked this pull request as ready for review November 19, 2021 16:57
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@EoinShaughnessy EoinShaughnessy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Content looks great! Made a few suggestions.

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2437 November 22, 2021 14:32 Inactive
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@EoinShaughnessy EoinShaughnessy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry! I'd overlooked one code mention (line 107) that needs backticks. Content looks perfect otherwise.

In v3.8.0 we added the ability for block level elements to be
rendered inside hints by switching from using a `span` to a `div`.

However, we kept the `display: block` styling (which would now be
redundant as this is the default for divs). This meant we weren't
forcing users to update their HTML and we could avoid a breaking change.

We now want to tidy up that redundant CSS as part of v4.0.0.
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2437 November 23, 2021 11:32 Inactive
@vanitabarrett vanitabarrett merged commit 001e756 into main Nov 23, 2021
@vanitabarrett vanitabarrett deleted the hint-remove-block-style branch November 23, 2021 11:35
@vanitabarrett vanitabarrett mentioned this pull request Dec 15, 2021
peteryates added a commit to x-govuk/govuk-form-builder that referenced this pull request Dec 18, 2021
Previously this library would render hints that were passed in as
arguments (strings) within spans and those passed in via procs (usually
HTML) inside divs, giving developers more flexibility in how things are
displayed.

In version 4.0.0 of the design system has moved towards just supporting
divs and this change reflects that decision.

alphagov/govuk-frontend#2437
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove display:block hint style as we're switching from span to div
4 participants