Commit e9357405 authored by Allison Whilden's avatar Allison Whilden

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
......@@ -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.
......@@ -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.
......
......@@ -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.)
......
doc/development/ux_guide/img/icon-add.png

155 Bytes | W: | H:

doc/development/ux_guide/img/icon-add.png

317 Bytes | W: | H:

doc/development/ux_guide/img/icon-add.png
doc/development/ux_guide/img/icon-add.png
doc/development/ux_guide/img/icon-add.png
doc/development/ux_guide/img/icon-add.png
  • 2-up
  • Swipe
  • Onion skin
doc/development/ux_guide/img/icon-close.png

225 Bytes | W: | H:

doc/development/ux_guide/img/icon-close.png

501 Bytes | W: | H:

doc/development/ux_guide/img/icon-close.png
doc/development/ux_guide/img/icon-close.png
doc/development/ux_guide/img/icon-close.png
doc/development/ux_guide/img/icon-close.png
  • 2-up
  • Swipe
  • Onion skin
doc/development/ux_guide/img/icon-edit.png

231 Bytes | W: | H:

doc/development/ux_guide/img/icon-edit.png

546 Bytes | W: | H:

doc/development/ux_guide/img/icon-edit.png
doc/development/ux_guide/img/icon-edit.png
doc/development/ux_guide/img/icon-edit.png
doc/development/ux_guide/img/icon-edit.png
  • 2-up
  • Swipe
  • Onion skin
doc/development/ux_guide/img/icon-rss.png

307 Bytes | W: | H:

doc/development/ux_guide/img/icon-rss.png

834 Bytes | W: | H:

doc/development/ux_guide/img/icon-rss.png
doc/development/ux_guide/img/icon-rss.png
doc/development/ux_guide/img/icon-rss.png
doc/development/ux_guide/img/icon-rss.png
  • 2-up
  • Swipe
  • Onion skin
doc/development/ux_guide/img/icon-trash.png

380 Bytes | W: | H:

doc/development/ux_guide/img/icon-trash.png

398 Bytes | W: | H:

doc/development/ux_guide/img/icon-trash.png
doc/development/ux_guide/img/icon-trash.png
doc/development/ux_guide/img/icon-trash.png
doc/development/ux_guide/img/icon-trash.png
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment