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 govuk-focusable, govuk-focusable-fill mixins, introduce govuk-focus-text mixin. #1361

Merged
merged 9 commits into from
May 22, 2019

Conversation

NickColley
Copy link
Contributor

@NickColley NickColley commented May 20, 2019

This implements option 2 from the mixins proposal: https://gist.github.com/nickcolley/791d084ff263786acb433ed0bd13c381

  • Renames focusable file to focused
  • Removes govuk-focusable and govuk-focusable-fill
  • Adds govuk-focused-text

Since the new focus styles are harder to abstract we're removing the mixins apart from the focus that is applied to text, for example links.

Closes #1344 (see for more details)

We've renamed the focus mixin since it's now only used,
with the `:focus` selector rather than having it baked in.

https://gist.github.com/nickcolley/791d084ff263786acb433ed0bd13c381
This is going to be removed so inline the needed CSS declarations.
For many use cases this can replaced with

`&:focus { @include govuk-focused-text; }`
We are removing this mixin as it's no longer useful.

Many of the focus states now include edge cases or logic that'd require more focused mixins or parameters passed to the current mixins.

We're removing this mixin but may introduce more explicit mixins in the future for things like inputs.
We are removing this mixin as it's no longer useful.

Many of the focus states now include edge cases or logic that'd require more focused mixins or parameters passed to the current mixins.

We're removing this mixin but may introduce more explicit mixins in the future for things like inputs.
This is consistent with the mixin name changes
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-1361 May 20, 2019 13:28 Inactive
@NickColley NickColley added this to the v3.0.0 milestone May 20, 2019
@NickColley NickColley changed the title Rework focus mixins Remove govuk-focusable, govuk-focusable-fill mixins, introduce govuk-focus-text mixin. May 20, 2019
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-1361 May 20, 2019 13:46 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-1361 May 20, 2019 14:02 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-1361 May 20, 2019 14:04 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-1361 May 20, 2019 14:06 Inactive
CHANGELOG.md Outdated Show resolved Hide resolved
src/helpers/_focused.scss Show resolved Hide resolved
@NickColley
Copy link
Contributor Author

@aliuk2012 updated based on your feedback thank you :)

Copy link
Contributor

@aliuk2012 aliuk2012 left a comment

Choose a reason for hiding this comment

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

👍 Awesome work @NickColley

Copy link
Contributor

@aliuk2012 aliuk2012 left a comment

Choose a reason for hiding this comment

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

👍 Awesome work @NickColley

@NickColley NickColley merged commit acda8ce into v3 May 22, 2019
@NickColley NickColley deleted the rework-focus-mixins branch May 22, 2019 17:21
@NickColley NickColley modified the milestones: v3.0.0, New accessible focus states Jul 10, 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.

3 participants