Skip to content

Commit

Permalink
Improved button states for light HC (#276)
Browse files Browse the repository at this point in the history
* Improved button states for light HC

Adjusted default, hover, selected, focused and disabled states for all buttons.

I might need to give it a second pass after testing live version. Also counters haven’t been updated yet.

* Update light hc borders

This change was lost when resolving a merge conflict

* Create purple-clocks-move.md

* Removed focusBg for outline and danger buttons

This changes was proposed here #276 (review)

Co-authored-by: simurai <simurai@github.com>
  • Loading branch information
Juliusschaeper and simurai authored Nov 23, 2021
1 parent f071312 commit f2d41ec
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/purple-clocks-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/primitives": patch
---

Improved button states for light HC
40 changes: 38 additions & 2 deletions data/colors/themes/light_high_contrast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ const exceptions = {
subtle: get('scale.gray.1')
},
border: {
default: get('scale.gray.9'),
default: get('scale.gray.8'),
muted: get('scale.gray.4'),
subtle: alpha(get('scale.black'), 0.9)
subtle: alpha(get('scale.black'), 0.8)
},
neutral: {
subtle: get('scale.gray.1')
Expand Down Expand Up @@ -153,6 +153,42 @@ const exceptions = {
sponsors: {
muted: get('scale.pink.3')
},
btn: {
bg: get('scale.gray.1'),
border: get('border.subtle'),
HoverBg: get('scale.gray.2'),
activeBg: get('scale.gray.3'),
selectedBg: get('scale.gray.3'),
focusBg: get('scale.gray.2'),
primary: {
bg: get('success.emphasis'),
border: get('scale.green.7'),
hoverBg: get('scale.green.6'),
hoverBorder: get('scale.green.7'),
focusBg: get('scale.green.7'),
focusBorder: get('scale.green.7')
},
outline: {
text: get('scale.blue.6'),
hoverBg: get('accent.emphasis'),
hoverBorder: get('scale.blue.7'),
selectedBg: get('scale.blue.7'),
selectedBorder: get('scale.blue.7'),
focusBorder: get('scale.blue.7'),
disabledText: alpha(get('scale.blue.5'), 0.5),
disabledBg: get('scale.gray.1')
},
danger: {
text: get('scale.red.6'),
hoverBg: get('danger.emphasis'),
hoverBorder: get('scale.red.7'),
selectedBg: get('scale.red.7'),
selectedBorder: get('scale.red.7'),
focusBorder: get('scale.red.7'),
disabledBg: get('scale.gray.1'),
icon: get('scale.red.6')
}
},
diffBlob: {
addition: {
fg: get('fg.onEmphasis'),
Expand Down

1 comment on commit f2d41ec

@vercel
Copy link

@vercel vercel bot commented on f2d41ec Nov 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.