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

New: Adapt buttons overhaul (fixes #469) #490

Open
wants to merge 87 commits into
base: master
Choose a base branch
from
Open

New: Adapt buttons overhaul (fixes #469) #490

wants to merge 87 commits into from

Conversation

guywillis
Copy link
Contributor

@guywillis guywillis commented Jan 25, 2024

Fixes: #469

New

Note

The following has been implemented to prevent any breaking changes:

  • Deprecated color variables left in for legacy support only (with comments). All new color variables inherit from existing color variables for backwards compatibilty.
  • Deprecated .notify-btn-icon mixin left in for legacy support only (with comments). New .ui-btn-ctrl provided as fallback for backwards compatibilty.
  • New color mixins applied to deprecated .btn-text and .btn-icon selectors for legacy support only (with comments).

To Do

Summary

kirsty-hames and others added 30 commits January 11, 2024 16:23
- focus state inherits from hover (as per existing component focus styles)
- existing @visited vars are only used by components so grouped with content item
- focus state inherits from hover (as per existing focus styles)
- locked state inherits from disabled (as per existing locked styles)
- Replace @btn-ui-color vars with @ui-color vars. Nav, Notify and Drawer btns inherit from their view colours. This sets an extra level of vars to define global ui colors or edit these separately as per existing Vanilla.
- rename _buttonStates.less file to _state-mixins.less.
- ui-btn-controls vars added
- shared Notify and Drawer btn styles combined into single ui-btn--controls mixin. Replacing .notify-btn-icon mixin.
- set menu item btn vars to inherit from item ui
- item ui locked state added
- set .narrative__strapline-icon to inherit from narrative__strapline-btn to reduce additional state declaration styles
… controls and strapline

- Narrative strapline icon background color set to transparent to prevent icon background obscuring the btn focus outline
- border-radius added
- default drawer item vars represent current drawer styles
- margin gives option to display items in a 'button style'
- when margin is set, apply border to whole of button (not just bottom)
- drawer item selected state expanded to support aria-current="true" (used by languagepicker which should inherit selected, not disabled styling.
guywillis and others added 14 commits June 21, 2024 15:23
- share border-width variable between drawer and notify UI button controls
- remove reference to 'color' from border width variables
- change reference from 'icon' to 'btn' for nav ui border-width variable for consistency with other nav btn spacing variables
- move border-width variables into spacing less
- set menu item to inherit its own border-radius variable
…acy support only - prevent breaking change

- @nav-icon-locked and @nav-icon-disabled color vars added
transparent buttons could be problematic accessibility wise
- align focus and selected styles with 'master'
- remove 'outline' box-shadow in favour of border. Border is used to visually distinguish/separate each item whilst box-shadow is stylistic only
...file doesn't include states or mixins
@kirsty-hames kirsty-hames marked this pull request as ready for review December 18, 2024 16:16
@kirsty-hames kirsty-hames changed the title Breaking: Adapt buttons overhaul (fixes #469) New: Adapt buttons overhaul (fixes #469) Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs Reviewing
Development

Successfully merging this pull request may close these issues.

Adapt Buttons - Vanilla issue Replace hardcoded icon button border-radius with variable
3 participants