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

Add display none override class #1586

Merged
merged 2 commits into from
Sep 23, 2019
Merged

Conversation

NickColley
Copy link
Contributor

@NickColley NickColley commented Sep 23, 2019

Sometimes users need to hide elements without wanting to use inline styles.

The [hidden] attribute is a good way to do this but needs patching with custom code and will not behave as expected in Internet Explorer 8.

This pull requests adds the new override class .govuk-!-display-none to help users who do not want to use [hidden].

Why not govuk-hidden?

We already have classes for display:

  • .govuk-!-display-inline
  • .govuk-!-display-inline-block
  • .govuk-!-display-block

So while govuk-hidden is consistent with govuk-visually-hidden, adding a new override feels more appropriate in this case.

Resolves #1060

Sometimes users need to hide elements without wanting to use inline styles.

The [hidden] attribute is a good way to do this but needs patching with custom code and will not behave as expected in Internet Explorer 8.
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-1586 September 23, 2019 13:12 Inactive
Copy link
Member

@36degrees 36degrees left a comment

Choose a reason for hiding this comment

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

🙈

@NickColley NickColley merged commit acb191e into master Sep 23, 2019
Design System Sprint Board automation moved this from Needs review to Done Sep 23, 2019
@NickColley NickColley deleted the add-display-none-override branch September 23, 2019 13:56
@36degrees 36degrees mentioned this pull request Oct 7, 2019
@NickColley NickColley mentioned this pull request Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Add .govuk-hidden { display: none }
3 participants