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

🎨 Color Modes #1131

Merged
merged 376 commits into from
Mar 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
376 commits
Select commit Hold shift + click to select a range
69d0242
add stylelint for header text color
Oct 15, 2020
6a2d378
npm install @primer/primitives@0.0.0-412212a
Oct 15, 2020
b414aea
npm instal @primer/primitives@0.0.0-3d5a7cb
Oct 15, 2020
1d259fb
remove stylelint line
Oct 15, 2020
db919ff
npm install @primer/primitives@0.0.0-d93cf7b
Oct 15, 2020
3d63ade
fix linter
Oct 15, 2020
a68f5cc
fix linter
Oct 15, 2020
ccca4d5
fix linter
Oct 15, 2020
3cc5069
npm install @primer/primitives@0.0.0-54c46a7
Oct 15, 2020
07fd1da
npm install @primer/primitives@0.0.0-a5f105b
Oct 15, 2020
e246716
update variable for social count
Oct 15, 2020
2ddcdbc
npm install @primer/primitives@0.0.0-91649c4
Oct 15, 2020
b8a4df5
Update autocomplete.scss
simurai Oct 16, 2020
7020fb0
Update avatar.scss
simurai Oct 16, 2020
b32e4f5
Update button.scss
simurai Oct 16, 2020
7609ed4
Update box.scss
simurai Oct 16, 2020
263f840
npm install @primer/primitives@0.0.0-6096eb4
simurai Oct 16, 2020
90eb064
npm install @primer/primitives@0.0.0-a59e532
Oct 16, 2020
8057118
fix linter
Oct 16, 2020
61e175d
npm install @primer/primitives@0.0.0-593708c
Oct 16, 2020
9dbe7f9
npm install @primer/primitives@0.0.0-4ef22c9
Oct 16, 2020
08c5da9
npm install @primer/primitives@0.0.0-10e7afa
Oct 16, 2020
1f7f08a
npm install @primer/primitives@0.0.0-10e7afa
Oct 16, 2020
c90ff75
fix linter
Oct 16, 2020
b2f1726
npm install @primer/primitives@0.0.0-3dafc1d
Oct 16, 2020
9291c34
Prefix utilities with color-
simurai Oct 19, 2020
bd52907
Add functional labels
simurai Oct 19, 2020
e22b757
npm install @primer/primitives@0.0.0-402d12a
Oct 19, 2020
01fd816
fix text color on dark mode for subnav and filter list
Oct 19, 2020
6d8e492
make disabled state input bg dark mode
Oct 19, 2020
c23bf4f
fix linter
Oct 19, 2020
f9c76a6
dropdown text color dark mode
Oct 19, 2020
5ecfb37
npm install @primer/primitives@0.0.0-abb740a
simurai Oct 20, 2020
0283bae
Update Counter
simurai Oct 20, 2020
6ca6678
Update State
simurai Oct 20, 2020
1c4e71b
npm install @primer/primitives@0.0.0-8efdc39
simurai Oct 20, 2020
3cf2ad8
update underline-nav and flash colors
Oct 20, 2020
567085e
update underlinenav counter text color
Oct 20, 2020
9459592
npm install @primer/primitives@0.0.0-45687a0
Oct 20, 2020
c5c9081
update underline-nav underline box shadow color
Oct 20, 2020
b32accf
Update autocomplete
simurai Oct 21, 2020
672c058
Update dropdown.scss
simurai Oct 21, 2020
0bdd5b8
Update select-menu.scss
simurai Oct 21, 2020
26a5523
Update branch-name.scss
simurai Oct 21, 2020
4b51635
Update breadcrumb.scss
simurai Oct 21, 2020
b7701ea
Update blankslate.scss
simurai Oct 21, 2020
d42a677
Update navigation
simurai Oct 21, 2020
82126ce
Add transition to tabnav
simurai Oct 21, 2020
f365362
Update pagination.scss
simurai Oct 21, 2020
c48cfdf
npm install @primer/primitives@0.0.0-a6d51cc
simurai Oct 21, 2020
65b168b
Lint
simurai Oct 21, 2020
326b191
Remove unused rule
simurai Oct 21, 2020
b90a667
update form colors
Oct 21, 2020
fdd9051
Update form-control
simurai Oct 22, 2020
8c9b356
Update form validation
simurai Oct 22, 2020
3773ee1
Update links
simurai Oct 22, 2020
6e5d77b
Update MIGRATING.md
simurai Oct 22, 2020
7f7556c
npm install @primer/primitives@0.0.0-c7548e4
simurai Oct 22, 2020
bcb89ef
Fix focus variables
simurai Oct 22, 2020
93b2eab
npm install @primer/primitives@0.0.0-d42611e
Oct 22, 2020
a7c192e
Update Primer Primitives, use new color mode mixins
BinaryMuse Oct 22, 2020
19c9d7e
:shirt: Fix lint errors
BinaryMuse Oct 22, 2020
34b65ae
resolve conflicts
Oct 22, 2020
66db006
npm install @primer/primitives@0.0.0-ab2da57
Oct 22, 2020
e04f6d2
npm install @primer/primitives@0.0.0-1cd410b
Oct 22, 2020
7a37503
lint fix
Oct 22, 2020
76762cb
update condensed timeline badge icon color
Oct 22, 2020
9325c99
update timeline line color
Oct 22, 2020
aecbc2c
update diffstat block colors + npm install @primer/primitives@0.0.0-7…
Oct 22, 2020
ad82b6d
update diffstat block colors
Oct 22, 2020
a030797
npm install @primer/primitives@0.0.0-347f74a
Oct 22, 2020
b89cac2
fix diffstat
Oct 22, 2020
b03b52b
Update color mode mixin to support 'auto'
BinaryMuse Oct 23, 2020
c3c0776
Remove data-color-mode selector on :root
BinaryMuse Oct 23, 2020
2372b00
Update outline + danger button
simurai Oct 23, 2020
21a6298
npm install @primer/primitives@0.0.0-3df3a30
simurai Oct 23, 2020
33cd1be
npm install @primer/primitives@0.0.0-a94bc22
Oct 23, 2020
db87377
npm install @primer/primitives@0.0.0-cde6eea
Oct 23, 2020
91f4a31
Update index.md
simurai Oct 24, 2020
edae9c3
WIP: Update buttons
simurai Oct 24, 2020
12e4983
Update button.scss
simurai Oct 24, 2020
051724a
Update primary button
simurai Oct 24, 2020
162b0b2
Update buttons.md
simurai Oct 26, 2020
08f5801
Fix close-button
simurai Oct 26, 2020
f303320
npm install @primer/primitives@0.0.0-f663df0
simurai Oct 26, 2020
cb88290
Lint
simurai Oct 26, 2020
1a722f7
Use --color-border-secondary for Box-row dividers
simurai Oct 26, 2020
901868d
npm install @primer/primitives@0.0.0-f663df0
simurai Oct 26, 2020
fedb8bd
npm install @primer/primitives@0.0.0-9ef25e1
Oct 26, 2020
0e1b225
update merge box warning icon bg
Oct 26, 2020
168cdcc
npm install @primer/primitives@0.0.0-2f8f2f6
Oct 26, 2020
6d730b6
npm install @primer/primitives@0.0.0-995139d
Oct 26, 2020
9f81295
npm install @primer/primitives@0.0.0-da21f4f
Oct 26, 2020
a75f293
Add mixin for defining CSS variables with color mode coverage
BinaryMuse Oct 26, 2020
79844b9
Rename diff to diffstat
simurai Oct 27, 2020
c318edb
npm install @primer/primitives@0.0.0-c996b75
Oct 27, 2020
bf52585
update diffstat colors to user correct functional name
Oct 27, 2020
dfa316c
npm install @primer/primitives@0.0.0-60615e1
Oct 27, 2020
0396b9b
Merge branch 'mkt/color-modes-whee' of https://github.com/primer/css …
simurai Oct 28, 2020
378ccd8
update filter dropdown button text color
Oct 28, 2020
8093736
add success state ofr timeline item
Oct 28, 2020
2a0a09c
linter
Oct 28, 2020
fe10c22
linter
Oct 28, 2020
d20f865
Add color-text-white
simurai Oct 29, 2020
7dfc062
npm install @primer/primitives@0.0.0-a2fe7c0
simurai Oct 29, 2020
a92fa83
npm install @primer/primitives@0.0.0-0981f9b
Oct 29, 2020
b7eef5a
Changed autocomplete variables
auareyou Oct 29, 2020
d648179
npm install @primer/primitives@0.0.0-9310bf0
Oct 29, 2020
225b2c1
Generalize styles for overlay components
auareyou Oct 29, 2020
d1f3e78
npm install @primer/primitives@0.0.0-724076c
Oct 29, 2020
3a16720
Update suggester.scss
simurai Oct 30, 2020
515177f
Update select-menu.scss
simurai Oct 30, 2020
a498fb6
npm install @primer/primitives@0.0.0-9846881
Oct 30, 2020
a58ee74
npm install @primer/primitives@0.0.0-2893f68
Oct 30, 2020
daf706d
npm install @primer/primitives@0.0.0-9d55cc8
Oct 30, 2020
ce69a37
update menu selected state bg
Oct 30, 2020
d78d83a
fix linter, update underlinenav dark hover text
Oct 30, 2020
e1dfa6f
update hr color
Oct 30, 2020
40ef190
Merge branch 'mkt/color-modes-whee' into au-tocomplete-var
simurai Nov 2, 2020
3ea4d28
Use bg-overlay for Popovers
simurai Nov 2, 2020
84209ba
Merge pull request #1188 from primer/au-tocomplete-var
simurai Nov 2, 2020
ca18ab7
Update utilites
simurai Nov 2, 2020
2c089ff
Thanks linter
simurai Nov 2, 2020
714c3a5
npm install @primer/primitives@0.0.0-ae82158
Nov 2, 2020
f35b9f0
npm install @primer/primitives@0.0.0-e267bd0
Nov 2, 2020
29f69aa
npm install @primer/primitives@0.0.0-fd6a5b3
Nov 3, 2020
20567ce
npm install @primer/primitives@0.0.0-52c43a6
Nov 3, 2020
e0bb3e6
npm install @primer/primitives@0.0.0-2020103212639
Nov 3, 2020
48d7ce5
npm install @primer/primitives@0.0.0-2020104194450
Nov 4, 2020
59a8516
Make .flash-full + .flash-banner have an opaque background
simurai Nov 5, 2020
204f639
Style Toasts in dark mode
simurai Nov 5, 2020
248e95a
Lint
simurai Nov 5, 2020
c54a2dd
update subhead border bottom to border secondary
Nov 5, 2020
20d54c5
update hr border color
Nov 5, 2020
d764f40
npm install @primer/primitives@0.0.0-2020106142529
simurai Nov 6, 2020
7a66f04
update yellow label styling to warning
Nov 9, 2020
2ec76c8
Bump primer/primitives
colebemis Nov 10, 2020
74b0a6e
npm install @primer/primitives@0.0.0-2020101041712
simurai Nov 10, 2020
901aca4
npm install @primer/primitives@0.0.0-20201010101520
simurai Nov 10, 2020
afea54d
Bump @primer/primitives
colebemis Nov 10, 2020
92786cc
Bump @primer/primitives
colebemis Nov 10, 2020
7eb3d52
npm install @primer/primitives@0.0.0-2020101182750
simurai Nov 11, 2020
eee7558
Fix right AvatarStack
simurai Nov 13, 2020
543302e
npm install @primer/primitives@0.0.0-2020101751025
simurai Nov 17, 2020
0a59f53
Merge branch 'master' into mkt/color-modes-whee
Nov 17, 2020
32990d3
npm install @primer/primitives@0.0.0-20201017191617
Nov 17, 2020
dbb8dc5
Replace --color-tabnav-selected-bg with --color-bg-canvas
simurai Nov 18, 2020
c5b66fb
Remove background for .write-content
simurai Nov 18, 2020
1e9ffb0
npm install @primer/primitives@0.0.0-20201018132748
simurai Nov 18, 2020
524fe69
npm install @primer/primitives@0.0.0-2020101817349
Nov 18, 2020
ab17094
npm install @primer/primitives@0.0.0-20201018232849
Nov 18, 2020
83a6a81
Remove 16.0.0
simurai Nov 19, 2020
eaa0450
Update labels
simurai Nov 19, 2020
299b8d8
npm install @primer/primitives@0.0.0-20201019154814
Nov 19, 2020
5c39e22
fix subnav and filter list component selected bg colors
Nov 19, 2020
c781839
Replace tooltip colors
simurai Nov 23, 2020
b2b5a01
Merge branch 'mkt/color-modes-whee' of https://github.com/primer/css …
simurai Nov 23, 2020
431d9a0
npm install @primer/primitives@0.0.0-20201019125449
simurai Nov 23, 2020
b679eea
update underline nav primary counter color
Nov 23, 2020
da2c4ee
linter
Nov 23, 2020
96246c7
fix nested class
Nov 23, 2020
b828ffe
Update form select icon
colebemis Nov 24, 2020
a0ccb27
Use double quotes to fix linting error
colebemis Nov 24, 2020
f623e6a
npm install @primer/primitives@0.0.0-2020102582626
simurai Nov 25, 2020
f4c2f7f
npm install @primer/primitives@0.0.0-20201025134534
simurai Nov 25, 2020
494b873
npm install @primer/primitives@0.0.0-20201027151852
simurai Nov 27, 2020
c5cfc9c
Fix transparent avatars
simurai Nov 30, 2020
d27e142
npm install @primer/primitives@0.0.0-20201030112336
simurai Nov 30, 2020
bdc300d
npm install @primer/primitives@0.0.0-202011112927
simurai Dec 1, 2020
bcf157d
npm install @primer/primitives@0.0.0-2020111201651
Dec 1, 2020
b1e6255
Revert "npm install @primer/primitives@0.0.0-2020111201651"
Dec 1, 2020
9ecb135
npm install @primer/primitives@0.0.0-2020111201651
simurai Dec 2, 2020
4ed1d12
Enable color-scheme for auto mode
simurai Dec 4, 2020
09bf4d4
npm install @primer/primitives@0.0.0-2020114182653
Dec 4, 2020
4cb151a
Revert "npm install @primer/primitives@0.0.0-2020114182653"
BinaryMuse Dec 4, 2020
267474d
npm i @primer/primitives@0.0.0-2020114185427
BinaryMuse Dec 4, 2020
7d7aa0d
update button group to work for embedded btn
Dec 4, 2020
7800b41
lol nvm
Dec 4, 2020
4c7d66e
npm install @primer/primitives@0.0.0-2020114231048
Dec 4, 2020
136bb9f
update label darker to use gray-1
Dec 9, 2020
04e48c9
linter
Dec 9, 2020
93368c2
remove bg color from disabled invisible button
Dec 9, 2020
eefaa9f
rounded corners on box-footer
Dec 11, 2020
936e561
Enable dark mode colors
BinaryMuse Dec 14, 2020
98268ae
Experiments with dimmed
BinaryMuse Dec 14, 2020
a1a019b
Update primitives
BinaryMuse Dec 14, 2020
eae67f5
Revert to old color-mode mixin
BinaryMuse Dec 14, 2020
f0f0941
npm install @primer/primitives@0.0.0-20201115165312
Dec 15, 2020
dc67077
Merge branch 'mkt/dimmed' into mkt/color-modes-whee
BinaryMuse Dec 15, 2020
2385394
btn danger icons + npm install @primer/primitives@0.0.0-20201115191143
Dec 15, 2020
7f4651b
linter
Dec 15, 2020
458a2c5
Support any theme in any color mode, even auto
BinaryMuse Dec 15, 2020
0889e4b
Fix opposite-color-mode usage
BinaryMuse Dec 15, 2020
3e14f37
Make themes work correctly in opposite mode
BinaryMuse Dec 15, 2020
29169b4
Simplify color mode theme definition
BinaryMuse Dec 15, 2020
b3d1fb5
npm install @primer/primitives@0.0.0-20201116185422
Dec 16, 2020
d3fe0b7
npm install @primer/primitives@0.0.0-2020111716213
Dec 17, 2020
3ece05e
npm install @primer/primitives@0.0.0-2020112264028
simurai Dec 22, 2020
4964815
npm install @primer/primitives@0.0.0-2020112281549
simurai Dec 23, 2020
fd61f77
npm install @primer/primitives@canary
simurai Jan 6, 2021
0765a97
Move `border-bottom-color` transition into `:hover`
koddsson Jan 18, 2021
24b6cb8
Merge branch 'master' into mkt/color-modes-whee
simurai Jan 19, 2021
b59edf5
Merge branch 'master' into mkt/color-modes-whee
simurai Jan 19, 2021
e618b1e
npm install @primer/primitives@0.0.0-202101962411
simurai Jan 19, 2021
99ffa56
Change transition for navigation items
koddsson Jan 19, 2021
7de8ebf
Merge branch 'mkt/color-modes-whee' into fix-underline-border-flash
koddsson Jan 19, 2021
71988b5
Make border style transparent
koddsson Jan 19, 2021
b9b041c
Merge pull request #1217 from primer/fix-underline-border-flash
simurai Jan 19, 2021
8ff9a1d
make disabled text for inputs easier to see
Jan 19, 2021
6a1daf3
npm install @primer/primitives@0.0.0-20211361528
simurai Feb 3, 2021
6d5ef60
Replace rgba colors for marketing styles
simurai Feb 3, 2021
d48ebbb
Fix docs
simurai Feb 3, 2021
53e31bf
Update dark dimmed theme
BinaryMuse Feb 3, 2021
4da8818
Fix dark dimmed import path
BinaryMuse Feb 3, 2021
e6d203b
Use --color-icon-tertiary when disabled
simurai Feb 5, 2021
c8f900f
Add lint ignore for icon color
BinaryMuse Feb 5, 2021
5813a09
npm install @primer/primitives@0.0.0-20211127596
simurai Feb 12, 2021
cd5cdf0
npm install @primer/primitives@0.0.0-2021112113328
simurai Feb 12, 2021
9ec838a
Use primitives variables for marketing buttons
simurai Feb 12, 2021
e213635
Add marketing functional variables
simurai Feb 12, 2021
20b1130
Lint
simurai Feb 12, 2021
9309c57
Add shadow colors
simurai Feb 24, 2021
e3d82fb
Remove dark dropdown
simurai Feb 26, 2021
ebdc346
npm install @primer/primitives@0.0.0-202121599
simurai Mar 1, 2021
b417b49
Updating the mixins that register the color modes
jonrohan Mar 3, 2021
60966e5
lint update
jonrohan Mar 3, 2021
06f28bc
more lint
jonrohan Mar 3, 2021
351d5e8
npm install @primer/primitives@0.0.0-20212382031
simurai Mar 3, 2021
4862832
Use node 14.15.2 version
simurai Mar 3, 2021
afcbe60
Merge pull request #1231 from primer/mixin_updates
jonrohan Mar 3, 2021
434a935
Use --color-text-white for input-dark
simurai Mar 4, 2021
b3bc735
Comment out some presentational variables and utilities
simurai Mar 4, 2021
799d9b3
Remove presentational utilities/variables
simurai Mar 4, 2021
89d022b
Merge pull request #1233 from primer/color_modes/deprecate
simurai Mar 4, 2021
376e0d4
Put back some utilities for view_components
jonrohan Mar 4, 2021
09bea8d
lint fixes
jonrohan Mar 4, 2021
7e7b125
Merge pull request #1234 from primer/put_back_some_utilities
jonrohan Mar 4, 2021
50c2f03
Remove all deprecated colors
simurai Mar 5, 2021
e09aa8a
Keep .text-inherit
simurai Mar 5, 2021
b621594
Add warning about using latest version
simurai Mar 8, 2021
990b1f7
Remove labels
simurai Mar 8, 2021
fe6c4ef
Remove .box-shadow
simurai Mar 8, 2021
f1da379
Remove presentational .State classes
simurai Mar 8, 2021
65bb96f
Remove presentational .Counter classes
simurai Mar 8, 2021
08de943
Remove .input-dark
simurai Mar 8, 2021
474f27f
Merge pull request #1235 from primer/color_modes/remove-deprecated-co…
jonrohan Mar 8, 2021
bee4af7
Merge branch 'mkt/color-modes-whee' of https://github.com/primer/css …
simurai Mar 9, 2021
6e36291
Merge branch 'master' into mkt/color-modes-whee
simurai Mar 9, 2021
2772952
npm install
simurai Mar 9, 2021
f325e12
Merge branch 'release-16.0.0' into mkt/color-modes-whee
simurai Mar 10, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14.15.2
212 changes: 111 additions & 101 deletions docs/content/components/buttons.md

Large diffs are not rendered by default.

26 changes: 0 additions & 26 deletions docs/content/components/dropdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,29 +200,3 @@ Align the direction of dropdown menus and their arrows with modifier classes.
</details>
</div>
```

### Dark

```html live
<div class="bg-gray-dark p-3 mt-n3 ml-n3 mr-n3 mb-n3" style="min-height: 240px;">
<details class="dropdown details-reset details-overlay d-inline-block">
<summary class="btn" aria-haspopup="true">
Dropdown
<div class="dropdown-caret"></div>
</summary>

<div class="dropdown-menu dropdown-menu-se dropdown-menu-dark">
<div class="dropdown-header">
Dropdown header
</div>
<ul>
<li><a class="dropdown-item" href="#url">Dropdown item</a></li>
<li><a class="dropdown-item" href="#url">Dropdown item</a></li>
<li class="dropdown-divider" role="none"></li>
<li><a class="dropdown-item" href="#url">Dropdown item</a></li>
<li><a class="dropdown-item" href="#url">Dropdown item</a></li>
</ul>
</div>
</details>
</div>
```
80 changes: 41 additions & 39 deletions docs/content/components/labels.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,38 +23,32 @@ The base `Label` style does not apply a background color and only uses the defau

### Label contrast

Use `Label--gray` to create a label with a lighter text color. This label is neutral in color and can be used in contexts where all you need to communicate is metadata, or where you want a label to feel less prominent compared with labels with stronger colors.
Use `Label--primary` to create a label with a stronger border. This label is also neutral in color, however, since its border is stronger it can stand out more compared to the default `Label`.

Use `Label--gray-darker` to create a label with a dark-gray color and border. This label is also neutral in color, however, since its color is darker it can stand out more compared to `Label--gray`.
Use `Label--secondary` to create a label with a subtler text color. This label is neutral in color and can be used in contexts where all you need to communicate is metadata, or where you want a label to feel less prominent compared with labels with stronger colors.

```html live
<span class="Label">Default</span>
<span class="Label Label--gray ml-1">Gray</span>
<span class="Label Label--gray-darker ml-1">Dark gray</span>
<span class="Label Label--primary ml-1">Primary</span>
<span class="Label Label--secondary ml-1">Secondary</span>
```

### Colored labels

Labels come in a few different themes. Use a theme that helps communicate the content of the label, and ensure it's used consistently. A typical use of the themes are:
Labels come in a few different functional classes. Use to communicate the content of the label, and ensure it's used consistently.

- `Label--yellow` -> Pending/highlight
- `Label--orange` -> Warning
- `Label--red` -> Error
- `Label--green` -> Success
- `Label--blue` -> Info
- `Label--info`
- `Label--success`
- `Label--warning`
- `Label--danger`

```html live
<span class="Label mr-1 Label--yellow">Pending</span>
<span class="Label mr-1 Label--orange">Warning</span>
<span class="Label mr-1 Label--red">Error</span>
<span class="Label mr-1 Label--green">Success</span>
<span class="Label mr-1 Label--blue">Info</span>
<span class="Label mr-1 Label--purple">PRO</span>
<span class="Label mr-1 Label--pink">Sponsor</span>
<span class="Label mr-1 Label--info">Info</span>
<span class="Label mr-1 Label--success">Success</span>
<span class="Label mr-1 Label--warning">Warning</span>
<span class="Label mr-1 Label--danger">Danger</span>
```

Note: Avoid using `Label--orange` next to `Label--red` since most people will find it hard to tell the difference.

### Label sizes

If space allows, add the `Label--large` modidfier to add a bit more padding to lables.
Expand Down Expand Up @@ -97,32 +91,34 @@ If an issue label needs to be bigger, add the `.IssueLabel--big` modifier.

## States

Use state labels to inform users of an items status. States are large labels with bolded text. The default state has a gray background.

```html live title="State"
<span class="State">Default</span>
```
Use state labels to inform users of an items status. States are large labels with bolded text. The default state has a gray background. States come in a few variations that apply different colors. Use the state that best communicates the status or function.

### State themes

States come in a few variations that apply different colors. Use the state that best communicates the status or function.
- `State`
- `State State--draft`
- `State State--open`
- `State State--merged`
- `State State--closed`

```html live
<span class="State State--green mr-2">
<span class="State State--draft mr-2">Draft</span>

<span class="State State--open mr-2">
<!-- <%= octicon "git-pull-request" %> -->
<svg class="octicon octicon-git-pull-request" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" class="css-5lyks0"> <path fill-rule="evenodd" clip-rule="evenodd" d="M7.17674 3.07322L9.57318 0.676753C9.73068 0.51926 9.99996 0.630802 9.99996 0.853529V5.64642C9.99996 5.86915 9.73068 5.98069 9.57319 5.8232L7.17674 3.42677C7.07911 3.32914 7.07911 3.17085 7.17674 3.07322ZM3.75 2.5C3.33579 2.5 3 2.83579 3 3.25C3 3.66421 3.33579 4 3.75 4C4.16421 4 4.5 3.66421 4.5 3.25C4.5 2.83579 4.16421 2.5 3.75 2.5ZM1.5 3.25C1.5 2.00736 2.50736 1 3.75 1C4.99264 1 6 2.00736 6 3.25C6 4.22966 5.37389 5.06309 4.5 5.37197V10.628C5.37389 10.9369 6 11.7703 6 12.75C6 13.9926 4.99264 15 3.75 15C2.50736 15 1.5 13.9926 1.5 12.75C1.5 11.7703 2.12611 10.9369 3 10.628V5.37197C2.12611 5.06309 1.5 4.22966 1.5 3.25ZM11 2.5H10V4H11C11.5523 4 12 4.44772 12 5V10.628C11.1261 10.9369 10.5 11.7703 10.5 12.75C10.5 13.9926 11.5074 15 12.75 15C13.9926 15 15 13.9926 15 12.75C15 11.7703 14.3739 10.9369 13.5 10.628V5C13.5 3.61929 12.3807 2.5 11 2.5ZM12 12.75C12 12.3358 12.3358 12 12.75 12C13.1642 12 13.5 12.3358 13.5 12.75C13.5 13.1642 13.1642 13.5 12.75 13.5C12.3358 13.5 12 13.1642 12 12.75ZM3.75 12C3.33579 12 3 12.3358 3 12.75C3 13.1642 3.33579 13.5 3.75 13.5C4.16421 13.5 4.5 13.1642 4.5 12.75C4.5 12.3358 4.16421 12 3.75 12Z"></path></svg>
Open
</span>
<span class="State State--red mr-2">
<!-- <%= octicon "git-pull-request" %> -->
<svg class="octicon octicon-git-pull-request" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" class="css-5lyks0"> <path fill-rule="evenodd" clip-rule="evenodd" d="M7.17674 3.07322L9.57318 0.676753C9.73068 0.51926 9.99996 0.630802 9.99996 0.853529V5.64642C9.99996 5.86915 9.73068 5.98069 9.57319 5.8232L7.17674 3.42677C7.07911 3.32914 7.07911 3.17085 7.17674 3.07322ZM3.75 2.5C3.33579 2.5 3 2.83579 3 3.25C3 3.66421 3.33579 4 3.75 4C4.16421 4 4.5 3.66421 4.5 3.25C4.5 2.83579 4.16421 2.5 3.75 2.5ZM1.5 3.25C1.5 2.00736 2.50736 1 3.75 1C4.99264 1 6 2.00736 6 3.25C6 4.22966 5.37389 5.06309 4.5 5.37197V10.628C5.37389 10.9369 6 11.7703 6 12.75C6 13.9926 4.99264 15 3.75 15C2.50736 15 1.5 13.9926 1.5 12.75C1.5 11.7703 2.12611 10.9369 3 10.628V5.37197C2.12611 5.06309 1.5 4.22966 1.5 3.25ZM11 2.5H10V4H11C11.5523 4 12 4.44772 12 5V10.628C11.1261 10.9369 10.5 11.7703 10.5 12.75C10.5 13.9926 11.5074 15 12.75 15C13.9926 15 15 13.9926 15 12.75C15 11.7703 14.3739 10.9369 13.5 10.628V5C13.5 3.61929 12.3807 2.5 11 2.5ZM12 12.75C12 12.3358 12.3358 12 12.75 12C13.1642 12 13.5 12.3358 13.5 12.75C13.5 13.1642 13.1642 13.5 12.75 13.5C12.3358 13.5 12 13.1642 12 12.75ZM3.75 12C3.33579 12 3 12.3358 3 12.75C3 13.1642 3.33579 13.5 3.75 13.5C4.16421 13.5 4.5 13.1642 4.5 12.75C4.5 12.3358 4.16421 12 3.75 12Z"></path></svg>
Closed
</span>
<span class="State State--purple mr-2">

<span class="State State--merged mr-2">
<!-- <%= octicon "git-merge" %> -->
<svg class="octicon octicon-git-merge" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" class="css-5lyks0"> <path fill-rule="evenodd" clip-rule="evenodd" d="M5 3.254V3.25V3.255C4.99934 3.45369 4.91985 3.64401 4.779 3.78415C4.63815 3.9243 4.44745 4.00283 4.24875 4.0025C4.05006 4.00217 3.85961 3.923 3.71923 3.78239C3.57885 3.64177 3.5 3.45119 3.5 3.2525C3.5 3.0538 3.57885 2.86323 3.71923 2.72261C3.85961 2.58199 4.05006 2.50283 4.24875 2.5025C4.44745 2.50217 4.63815 2.5807 4.779 2.72084C4.91985 2.86099 4.99934 3.0513 5 3.25V3.254ZM5.45 5.154C5.88079 4.8824 6.2067 4.47269 6.37445 3.99186C6.54221 3.51102 6.54188 2.9875 6.37353 2.50687C6.20517 2.02624 5.87875 1.61694 5.44762 1.34588C5.01649 1.07483 4.50616 0.95804 4.00005 1.01462C3.49394 1.0712 3.022 1.2978 2.66137 1.65737C2.30074 2.01695 2.07276 2.48822 2.0147 2.99416C1.95664 3.5001 2.07193 4.01077 2.34173 4.4427C2.61152 4.87462 3.01987 5.20224 3.5 5.372V10.628C2.99931 10.8049 2.57729 11.1532 2.30855 11.6112C2.0398 12.0692 1.94163 12.6075 2.03139 13.1309C2.12114 13.6542 2.39305 14.1291 2.79904 14.4713C3.20503 14.8136 3.71897 15.0014 4.25 15.0014C4.78103 15.0014 5.29496 14.8136 5.70095 14.4713C6.10695 14.1291 6.37885 13.6542 6.46861 13.1309C6.55837 12.6075 6.4602 12.0692 6.19145 11.6112C5.9227 11.1532 5.50069 10.8049 5 10.628V7.123C5.53827 7.71503 6.19447 8.18788 6.92641 8.51114C7.65836 8.8344 8.44985 9.00093 9.25 9H10.628C10.8049 9.50069 11.1532 9.9227 11.6112 10.1915C12.0692 10.4602 12.6075 10.5584 13.1309 10.4686C13.6542 10.3789 14.1291 10.1069 14.4713 9.70096C14.8136 9.29496 15.0014 8.78103 15.0014 8.25C15.0014 7.71897 14.8136 7.20503 14.4713 6.79904C14.1291 6.39305 13.6542 6.12114 13.1309 6.03139C12.6075 5.94163 12.0692 6.0398 11.6112 6.30855C11.1532 6.57729 10.8049 6.99931 10.628 7.5H9.25C8.4613 7.50006 7.68813 7.28066 7.01702 6.86634C6.34592 6.45202 5.80334 5.85912 5.45 5.154ZM12.75 9C12.9489 9 13.1397 8.92098 13.2803 8.78033C13.421 8.63968 13.5 8.44891 13.5 8.25C13.5 8.05109 13.421 7.86032 13.2803 7.71967C13.1397 7.57902 12.9489 7.5 12.75 7.5C12.5511 7.5 12.3603 7.57902 12.2197 7.71967C12.079 7.86032 12 8.05109 12 8.25C12 8.44891 12.079 8.63968 12.2197 8.78033C12.3603 8.92098 12.5511 9 12.75 9ZM4.25 13.5C4.44891 13.5 4.63968 13.421 4.78033 13.2803C4.92098 13.1397 5 12.9489 5 12.75C5 12.5511 4.92098 12.3603 4.78033 12.2197C4.63968 12.079 4.44891 12 4.25 12C4.05109 12 3.86032 12.079 3.71967 12.2197C3.57902 12.3603 3.5 12.5511 3.5 12.75C3.5 12.9489 3.57902 13.1397 3.71967 13.2803C3.86032 13.421 4.05109 13.5 4.25 13.5Z"></path></svg>
Merged
</span>

<span class="State State--closed mr-2" title="Status: closed">
<!-- <%= octicon "git-pull-request" %> -->
<svg class="octicon octicon-git-pull-request" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" class="css-5lyks0"> <path fill-rule="evenodd" clip-rule="evenodd" d="M7.17674 3.07322L9.57318 0.676753C9.73068 0.51926 9.99996 0.630802 9.99996 0.853529V5.64642C9.99996 5.86915 9.73068 5.98069 9.57319 5.8232L7.17674 3.42677C7.07911 3.32914 7.07911 3.17085 7.17674 3.07322ZM3.75 2.5C3.33579 2.5 3 2.83579 3 3.25C3 3.66421 3.33579 4 3.75 4C4.16421 4 4.5 3.66421 4.5 3.25C4.5 2.83579 4.16421 2.5 3.75 2.5ZM1.5 3.25C1.5 2.00736 2.50736 1 3.75 1C4.99264 1 6 2.00736 6 3.25C6 4.22966 5.37389 5.06309 4.5 5.37197V10.628C5.37389 10.9369 6 11.7703 6 12.75C6 13.9926 4.99264 15 3.75 15C2.50736 15 1.5 13.9926 1.5 12.75C1.5 11.7703 2.12611 10.9369 3 10.628V5.37197C2.12611 5.06309 1.5 4.22966 1.5 3.25ZM11 2.5H10V4H11C11.5523 4 12 4.44772 12 5V10.628C11.1261 10.9369 10.5 11.7703 10.5 12.75C10.5 13.9926 11.5074 15 12.75 15C13.9926 15 15 13.9926 15 12.75C15 11.7703 14.3739 10.9369 13.5 10.628V5C13.5 3.61929 12.3807 2.5 11 2.5ZM12 12.75C12 12.3358 12.3358 12 12.75 12C13.1642 12 13.5 12.3358 13.5 12.75C13.5 13.1642 13.1642 13.5 12.75 13.5C12.3358 13.5 12 13.1642 12 12.75ZM3.75 12C3.33579 12 3 12.3358 3 12.75C3 13.1642 3.33579 13.5 3.75 13.5C4.16421 13.5 4.5 13.1642 4.5 12.75C4.5 12.3358 4.16421 12 3.75 12Z"></path></svg>
Closed
</span>
```

### Small states
Expand All @@ -131,12 +127,12 @@ Use `State--small` for a state label with reduced padding a smaller font size. T

```html live
<span class="State State--small mr-2">Default</span>
<span class="State State--small State--green mr-2">
<span class="State State--small State--open mr-2">
<!-- <%= octicon "issue-opened" %> -->
<svg class="octicon octicon-issue-opened" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg>
Open
</span>
<span class="State State--small State--red mr-2">
<span class="State State--small State--closed mr-2">
<!-- <%= octicon "issue-closed" %> -->
<svg class="octicon octicon-issue-closed" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7 10h2v2H7v-2zm2-6H7v5h2V4zm1.5 1.5l-1 1L12 9l4-4.5-1-1L12 7l-1.5-1.5zM8 13.7A5.71 5.71 0 0 1 2.3 8c0-3.14 2.56-5.7 5.7-5.7 1.83 0 3.45.88 4.5 2.2l.92-.92A6.947 6.947 0 0 0 8 1C4.14 1 1 4.14 1 8s3.14 7 7 7 7-3.14 7-7l-1.52 1.52c-.66 2.41-2.86 4.19-5.48 4.19v-.01z"></path></svg>
Closed
Expand All @@ -145,12 +141,18 @@ Use `State--small` for a state label with reduced padding a smaller font size. T

## Counters

Use the `Counter` component to add a count to navigational elements and buttons. Counters come in 3 variations: the default `Counter` with a light gray background, the `Counter--gray-light` with a lighter text color, and `Counter--gray` with a dark-gray background and inverse white text. When a counter is empty, its visibility will be hidden.
Use the `Counter` component to add a count to navigational elements and buttons. Counters come in 3 variations:

1. the default `Counter`,
2. the `Counter--primary` with a stronger background color
3. and `Counter--secondary` with a more subtler text color.

Note: When a counter is empty, its visibility will be hidden.

```html live
<span class="Counter mr-1">1</span>
<span class="Counter mr-1 Counter--gray-light">23</span>
<span class="Counter mr-1 Counter--gray">456</span>
<span class="Counter mr-1 Counter--primary">23</span>
<span class="Counter mr-1 Counter--secondary">456</span>
```

Use the `Counter` in navigation to indicate the number of items without the user having to click through or count the items, such as open issues in a GitHub repo. See more options in [navigation](./navigation).
Expand Down
48 changes: 48 additions & 0 deletions docs/content/components/links.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: Links
path: components/links
status: New
source: 'https://github.com/primer/css/tree/master/src/links'
bundle: links
---

By default `<a>` elements already use the right link color and apply an underline on hover.

```html live
Some text with a default <a href="#url">link</a>
```

If you need to make other elements behave like a link and perhaps use JS to trigger navigating to another page, use the `.Link` class.

```html live
Some text with a <span class="Link">span that behaves like a link</span>
```

If you like to override the default link styles you can do so with the following link utilities. **Bear in mind that link styles are easier for more people to see and interact with when the changes in styles do not rely on color alone.**

Use `.Link--primary` to turn the link color to blue only on hover.

```html live
<p class="color-text-secondary">Some text with a <a class="Link--primary" href="#url">Link--primary</a></p>
```

Use `.Link--secondary` for a more subtle link color that turns blue on hover.

```html live
Some text with a <a class="Link--secondary" href="#url">Link--secondary</a>
```

Use `.Link--muted` also removes the underline on hover. Tip: You can also use the `.no-underline` utility to do the same for `.Link--primary`.

```html live
<p>Some text with a <a class="Link--secondary no-underline" href="#url">Link--muted</a></p>
<p>Some text with a <a class="Link--primary no-underline" href="#url">Link--primary no-underline</a></p>
```

Use `.Link--onHover` to make any text color used with links to turn blue on hover. This is useful when you want only part of a link to turn blue on hover.

```html live
<a class="color-text-secondary no-underline" href="#url">
A link with a partial <span class="Link--onHover">Link--onHover</span>
</a>
```
17 changes: 9 additions & 8 deletions docs/content/components/marketing-buttons.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ bundle: marketing-buttons

Marketing buttons come in different colors and sizes, and are also available in a blue outlined version.

## Colors and outlined
## Colors, outlined and transparent

Marketing buttons can be solid blue, outlined blue, solid green, or transparent.

The solid blue and solid green buttons have more visual emphasis than the blue outlined button, therefore they should be used sparingly and only for call to actions that need emphasis.

```html live
<button class="btn-mktg mr-2" type="button">Learn more</button>
<button class="btn-mktg btn-outline-mktg mr-2" type="button">Learn more</button>
<button class="btn-mktg btn-primary-mktg mr-2" type="button">Sign up</button>
<div class="bg-gray-dark">
<button class="btn-mktg btn-transparent m-2" type="button">Learn more</button>
<button class="btn-mktg mr-3" type="button">Learn more</button>
<button class="btn-mktg btn-primary-mktg mr-3" type="button">Sign up</button>
<button class="btn-mktg btn-outline-mktg mr-3" type="button">Learn more</button>
<div class="mt-3 p-3" style="background-color: var(--color-scale-gray-9);">
<button class="btn-mktg btn-transparent" type="button">Learn more</button>
</div>
```

Expand All @@ -29,9 +29,10 @@ Available in two sizes, marketing buttons have a default size and a large size.

```html live
<button class="btn-mktg mr-2" type="button">Learn more</button>
<button class="btn-mktg btn-outline-mktg mr-2" type="button">Learn more</button>
<button class="btn-mktg btn-primary-mktg mr-2" type="button">Sign up</button>
<button class="btn-mktg btn-outline-mktg mr-2" type="button">Learn more</button>
<hr>
<button class="btn-mktg btn-large-mktg mr-2" type="button">Learn more</button>
<button class="btn-mktg btn-outline-mktg btn-large-mktg mr-2" type="button">Learn more</button>
<button class="btn-mktg btn-primary-mktg btn-large-mktg mr-2" type="button">Sign up</button>
<button class="btn-mktg btn-outline-mktg btn-large-mktg mr-2" type="button">Learn more</button>
```
2 changes: 1 addition & 1 deletion docs/content/components/timeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The `TimelineItem` component is used to display items on a vertical timeline, co

## TimelineItem-badge

The default TimelineItem-badge color is dark text on a light grey background.
The default TimelineItem-badge color is dark text on a light gray background.

```html live
<!-- Default TimelineItem Badge -->
Expand Down
6 changes: 6 additions & 0 deletions docs/content/getting-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,9 @@ You won't need to install any node modules or Sass compilers for a static site;
```html
<link href="https://unpkg.com/@primer/css/dist/primer.css" rel="stylesheet" />
```

**Warning**: Only use the "latest" version for short lived experiments. To be safe it's recommended to use the [latest version](https://github.com/primer/css/releases/latest) spelled out (for example `@15.2.0`). This ensures that the constant changes to Primer CSS won't break anything.

```html
<link rel="stylesheet" href="https://unpkg.com/@primer/css@15.2.0/dist/primer.css" />
```