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

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

Draft
wants to merge 78 commits into
base: master
Choose a base branch
from
Draft

Conversation

guywillis
Copy link
Contributor

@guywillis guywillis commented Jan 25, 2024

Fixes: #469

New

Breaking

  • Removed button icon variables (e.g. @button-icon-color) in favour of new specific button type variables. To prevent a breaking change, these could be re-added and set to inherit a new variable for backwards compatibility (if desired). @ui-color or @item-ui-color would be appropriate replacements.
  • Replaced .notify-btn-icon mixin with .ui-btn-ctrl. Both mixins target the same generic notify selector, .notify__btn-icon.
  • Removed generic .btn-icon and .btn-text color styles (background-color and color).

Note: @kirsty-hames and myself have decided to make this a draft PR in the first instance so we can gather feedback on the change to buttons before we progress with phase 2 of the buttons update. We're really keen for comments and thoughts on how we've grouped the buttons together.

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 29 commits March 22, 2024 12:23
- outline and plain styles added to existing mixins still tbc
- TODO and query comments added
- border width and color vars added
- outline and plain styles added to existing mixins
- border width and color vars added
...used for Hotgraphic controls first/last item
...mixins inherit from their state color var instead
…ming

...changed to 'ui-btn-ctrl-color' for consistency with other color variable naming and consistency with .ui-btn-ctrl;
…ming

...changed to 'ui-btn-ctrl-color' for consistency with other color variable naming and consistency with .ui-btn-ctrl;
- temp button style vars added - naming tbc
- drawer item locked state added
- missing item border-width var added
- @menu-item-btn-style var name fix
- missing btn state mixins added
- notify btn style var fix
- comments added
- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

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