Skip to content
Snippets Groups Projects
Commit e9357405 authored by Allison Whilden's avatar Allison Whilden
Browse files

Merge branch 'add-button-styles-ux-guide' into 'master'

Document button secondary states

## What does this MR do?
Document the changes from #24145 and !7797.

It also updates the icons and color section in the basics page.

## Does this MR meet the acceptance criteria?

- [ ] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?
#24145

cc @awhildy

See merge request !7924
parents b61d0586 877c225c
No related branches found
No related tags found
No related merge requests found
Showing
with 36 additions and 35 deletions
Loading
Loading
@@ -35,26 +35,15 @@ This is the typeface used for code blocks. GitLab uses the OS default font.
## Icons
GitLab uses Font Awesome icons throughout our interface.
 
![Trash icon](img/icon-trash.png)
The trash icon is used for destructive actions that deletes information.
![Edit icon](img/icon-edit.png)
The pencil icon is used for editing content such as comments.
![Notification icon](img/icon-notification.png)
The bell icon is for notifications, such as Todos.
![Subscribe icon](img/icon-subscribe.png)
The eye icon is for subscribing to updates. For example, you can subscribe to a label and get updated on issues with that label.
![RSS icon](img/icon-rss.png)
The standard RSS icon is used for linking to RSS/atom feeds.
![Close icon](img/icon-close.png)
An 'x' is used for closing UI elements such as dropdowns.
![Add icon](img/icon-add.png)
A plus is used when creating new objects, such as issues, projects, etc.
| | |
| :-----------: | :---- |
| ![Trash icon](img/icon-trash.png) | The trash icon is used for destructive actions that deletes information. |
| ![Edit icon](img/icon-edit.png) | The pencil icon is used for editing content such as comments.|
| ![Notification icon](img/icon-notification.png) | The bell icon is for notifications, such as Todos. |
| ![Subscribe icon](img/icon-subscribe.png) | The eye icon is for subscribing to updates. For example, you can subscribe to a label and get updated on issues with that label. |
| ![RSS icon](img/icon-rss.png) | The standard RSS icon is used for linking to RSS/atom feeds. |
| ![Close icon](img/icon-close.png) | An 'x' is used for closing UI elements such as dropdowns. |
| ![Add icon](img/icon-add.png) | A plus is used when creating new objects, such as issues, projects, etc. |
 
> TODO: update this section, add more general guidance to icon usage and personality, etc.
 
Loading
Loading
@@ -62,20 +51,13 @@ A plus is used when creating new objects, such as issues, projects, etc.
 
## Color
 
![Blue](img/color-blue.png)
Blue is used to highlight primary active elements (such as current tab), as well as other organization and managing commands.
![Green](img/color-green.png)
Green is for actions that create new objects.
![Orange](img/color-orange.png)
Orange is used for warnings
![Red](img/color-red.png)
Red is reserved for delete and other destructive commands
![Grey](img/color-grey.png)
Grey, and white (depending on context) is used for netral, secondary elements
| | |
| :------: | :------- |
| ![Blue](img/color-blue.png) | Blue is used to highlight primary active elements (such as the current tab), as well as other organizational and managing commands.|
| ![Green](img/color-green.png) | Green is for actions that create new objects. |
| ![Orange](img/color-orange.png) | Orange is used for warnings |
| ![Red](img/color-red.png) | Red is reserved for delete and other destructive commands |
| ![Grey](img/color-grey.png) | Grey is used for neutral secondary elements. Depending on context, white is sometimes used instead. |
 
> TODO: Establish a perspective for color in terms of our personality and rationalize with Marketing usage.
 
Loading
Loading
Loading
Loading
@@ -75,10 +75,29 @@ Text should be in sentence case, where only the first word is capitalized. "Crea
> TODO: Rationalize this. Ensure that we still believe this.
 
### Colors
Follow the color guidance on the [basics](basics.md#color) page. The default color treatment is the white/grey button.
The default color treatment is the white/grey button. Follow the guidance on the [basics](basics.md#color) page to add meaningful color to a button.
### Secondary states
Primary buttons darken the color of their background and border for hover, focus and active states. An inner shadow is added to the active state to denote the button being pressed.
| Values | Info | Success | Warning | Danger |
| :------ | :------: | :------: | :------: | :------: |
| Background: `$color-light` <br> Border: `$border-color-light` | ![](img/button-info--resting.png) | ![](img/button-success--resting.png) | ![](img/button-warning--resting.png) | ![](img/button-danger--resting.png) |
| Background: `$color-normal` <br> Border: `$border-color-normal` | ![](img/button-info--hover.png) | ![](img/button-success--hover.png) | ![](img/button-warning--hover.png) | ![](img/button-danger--hover.png) |
| Background: `$color-dark` <br> Border: `$border-color-dark` | ![](img/button-info--active.png) | ![](img/button-success--active.png) | ![](img/button-warning--active.png) | ![](img/button-danger--active.png) |
Since secondary buttons only have a border on their resting state, their hover and focus states add a background color, which gets darkened on active.
| Values | Success Secondary | Close | Spam |
| :------ | :------: | :------: | :------: |
| Font: `$border-color-light` <br> Border: `$border-color-light` | ![](img/button-success-secondary--resting.png) | ![](img/button-close--resting.png) | ![](img/button-spam--resting.png) |
| Background: `$color-light` <br> Border: `$border-color-light` | ![](img/button-success-secondary--hover.png) | ![](img/button-close--hover.png) | ![](img/button-spam--hover.png) |
| Background: `$color-normal` <br> Border: `$border-color-normal` | ![](img/button-success-secondary--active.png) | ![](img/button-close--active.png) | ![](img/button-spam--active.png) |
 
---
 
## Dropdowns
 
Dropdowns are used to allow users to choose one (or many) options from a list of options. If this list of options is more 20, there should generally be a way to search through and filter the options (see the complex filter dropdowns below.)
Loading
Loading
doc/development/ux_guide/img/button-close--active.png

1.35 KiB

doc/development/ux_guide/img/button-close--hover.png

1015 B

doc/development/ux_guide/img/button-close--resting.png

1.24 KiB

doc/development/ux_guide/img/button-danger--active.png

1.42 KiB

doc/development/ux_guide/img/button-danger--hover.png

1.07 KiB

doc/development/ux_guide/img/button-danger--resting.png

1.34 KiB

doc/development/ux_guide/img/button-info--active.png

1.41 KiB

doc/development/ux_guide/img/button-info--hover.png

1.05 KiB

doc/development/ux_guide/img/button-info--resting.png

1.27 KiB

doc/development/ux_guide/img/button-spam--active.png

1.4 KiB

doc/development/ux_guide/img/button-spam--hover.png

1.08 KiB

doc/development/ux_guide/img/button-spam--resting.png

1.34 KiB

doc/development/ux_guide/img/button-success--active.png

1.47 KiB

doc/development/ux_guide/img/button-success--hover.png

1.12 KiB

doc/development/ux_guide/img/button-success--resting.png

1.41 KiB

doc/development/ux_guide/img/button-success-secondary--active.png

1.43 KiB

doc/development/ux_guide/img/button-success-secondary--hover.png

1.07 KiB

doc/development/ux_guide/img/button-success-secondary--resting.png

1.36 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment