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

Unify button styles #2905

Closed
20 of 24 tasks
kristinashu opened this issue Mar 27, 2019 · 2 comments
Closed
20 of 24 tasks

Unify button styles #2905

kristinashu opened this issue Mar 27, 2019 · 2 comments
Assignees
Labels

Comments

@kristinashu
Copy link

kristinashu commented Mar 27, 2019

Based on @sabrinang @natalieworth's amazing work in MozillaFoundation/Design#317

  • Design has been finalized
  • Link to original design ticket
  • Link to related ticket [n/a]
  • Link to Redpen [screen caps below]
  • Design changes been merged into the master Sketch file [see Style Guide file]
  • Desktop and mobile mockups are included
  • Assets are included [n/a]
  • Hover state for elements are designed
  • Other states for elements are designed (e.g., error state for form) [n/a]

Button Clean up and Proposed Changes

Button class names

  • .btn-normal to .button-primary (.btn-primary)
  • .btn-ghost to .button-secondary (.btn-secondary)
  • .btn-pop to .button-pop (keep the name)

Button Labels

  • text-transform: remove uppercase (we can't enforce sentence case in code and there will be exceptions like capitalizing names etc.)
  • letter-spacing: 0px (remove)

Button Styles

  • Button Primary Updates:
    color: $white
    background: $blue
    hover background: $dark-blue

  • Button Secondary Updates:
    color: $black
    background: none (transparent)
    border: 2px solid $black
    hover background: $black
    hover color: $white

  • Button Pop Updates:
    background: none (can this be transparent with the shadow?)
    hover: instead of it popping out, it presses in (example)

Dark Theme Button Styles

  • Button Primary Dark Theme Updates:
    color: $white
    background: $blue
    hover background: $light-blue
    hover color: $black

  • Button Secondary Dark Theme Updates:
    color: $white
    background: none (transparent)
    border: 2px solid $white
    hover background: $white
    hover color: $black

  • Button Pop Dark Theme Updates:
    background: none (can this be transparent with the shadow?)
    border: 2px solid $white
    hover: instead of it popping out, it presses in (example)

Button Arrangement

  • Alignment: all left-aligned (exceptions support navigation or UI like .button-pop)

  • Spacing: margin/padding unchanged and only primary button is full-width on mobile

  • Order: if there are multiple buttons order by importance left to right

  • Multiple buttons: always have them on separate lines with margin-bottom 8px spacing
    image

Buttons are also documented in UI components in wagtail: https://foundation.mozilla.org/en/docs/brand/design/ui-components/

@mmmavis
Copy link
Collaborator

mmmavis commented Apr 1, 2019

Note:

  1. after chatted with @sabrinang we have decided to keep the button class name prefix btn- (instead of button-) to align with Twitter Bootstrap's naming convention.

  2. PR will not address things mentioned in "Button Arrangement" as they are more best practices for designers and content writers to follow.

@mmmavis
Copy link
Collaborator

mmmavis commented Apr 2, 2019

Done! Follow-up ticket filed here: #2936

@mmmavis mmmavis closed this as completed Apr 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants