Skip to content

Commit

Permalink
Adjust borders/shadows for Button component (#733)
Browse files Browse the repository at this point in the history
* adjust border/shadows

* Create nice-penguins-doubt.md

* github-actions[bot] Regenerated snapshots

* Update nice-penguins-doubt.md

* adjust outline button hover border

* github-actions[bot] Regenerated snapshots

---------

Co-authored-by: langermank <langermank@users.noreply.github.com>
  • Loading branch information
langermank and langermank authored Sep 19, 2023
1 parent 5ebfafe commit f431e7e
Show file tree
Hide file tree
Showing 41 changed files with 61 additions and 40 deletions.
7 changes: 7 additions & 0 deletions .changeset/nice-penguins-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@primer/primitives": patch
---

- Remove the default button inset shadow (its basically invisible)
- Switch danger button to use the same border strategy as primary for hover/active

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions docs/storybook/stories/Demos/PatternOverrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@
color: var(--button-invisible-fgColor-rest) !important;
}

.Button button[id='danger']:hover:not(:disabled) {
background-color: var(--button-danger-bgColor-hover) !important;
color: var(--button-danger-fgColor-hover) !important;
border-color: var(--button-danger-borderColor-hover) !important;
}

.Button button[id='default']:not(:hover) [data-component='ButtonCounter'] {
background-color: var(--buttonCounter-default-bgColor-rest) !important;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,11 @@
$type: 'color',
alpha: 1,
},
active: {
$value: '{base.color.green.2}',
$type: 'color',
alpha: 1,
},
disabled: {
$value: '{base.color.green.2}',
$type: 'color',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,6 @@
},
},
},
borderColor: {
hover: {
$value: '{base.color.orange.6}',
$type: 'color',
},
},
},
},
diffBlob: {
Expand Down
26 changes: 20 additions & 6 deletions src/tokens/functional/color/dark/patterns-dark.json5
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@
},
},
hover: {
$value: '{borderColor.default}',
$value: '{button.default.borderColor.rest}',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand All @@ -882,7 +882,7 @@
},
},
active: {
$value: '{borderColor.default}',
$value: '{button.default.borderColor.rest}',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand Down Expand Up @@ -1037,6 +1037,18 @@
},
},
},
active: {
$value: '{button.primary.borderColor.rest}',
$type: 'color',
$extensions: {
'org.primer.figma': {
collection: 'mode',
mode: 'dark',
group: 'component',
scopes: ['borderColor'],
},
},
},
disabled: {
$value: '{button.primary.bgColor.disabled}',
$type: 'color',
Expand Down Expand Up @@ -1283,7 +1295,7 @@
},
borderColor: {
hover: {
$value: '{borderColor.muted}',
$value: '{base.color.gray.0}',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand All @@ -1293,9 +1305,10 @@
scopes: ['borderColor'],
},
},
alpha: 0.1,
},
selected: {
$value: '{borderColor.muted}',
$value: '{button.outline.borderColor.hover}',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand Down Expand Up @@ -1454,7 +1467,7 @@
},
},
hover: {
$value: '{base.color.red.6}',
$value: '{base.color.gray.0}',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand All @@ -1464,9 +1477,10 @@
scopes: ['borderColor'],
},
},
alpha: 0.1,
},
active: {
$value: '{button.danger.bgColor.active}',
$value: '{button.danger.borderColor.hover}',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,11 @@
$type: 'color',
alpha: 1,
},
active: {
$value: '{base.color.green.7}',
$type: 'color',
alpha: 1,
},
},
},
invisible: {
Expand Down
22 changes: 18 additions & 4 deletions src/tokens/functional/color/light/patterns-light.json5
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,18 @@
},
},
},
active: {
$value: '{button.primary.borderColor.rest}',
$type: 'color',
$extensions: {
'org.primer.figma': {
collection: 'mode',
mode: 'light',
group: 'component',
scopes: ['borderColor'],
},
},
},
disabled: {
$value: '{button.primary.bgColor.disabled}',
$type: 'color',
Expand Down Expand Up @@ -1278,7 +1290,7 @@
},
borderColor: {
hover: {
$value: '{borderColor.default}',
$value: '{base.color.black}',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand All @@ -1288,9 +1300,10 @@
scopes: ['borderColor'],
},
},
alpha: 0.15,
},
active: {
$value: '{borderColor.default}',
$value: '{button.outline.borderColor.hover}',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand Down Expand Up @@ -1449,7 +1462,7 @@
},
},
hover: {
$value: '{borderColor.default}',
$value: '{base.color.black}',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand All @@ -1459,9 +1472,10 @@
scopes: ['borderColor'],
},
},
alpha: 0.15,
},
active: {
$value: '{borderColor.default}',
$value: '{button.danger.borderColor.hover}',
$type: 'color',
$extensions: {
'org.primer.figma': {
Expand Down
12 changes: 0 additions & 12 deletions src/tokens/functional/shadow/dark.json5
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,6 @@
],
$type: 'shadow',
},
inset: {
$value: {
color: '{base.color.transparent}',
alpha: 0,
offsetX: '0px',
offsetY: '0px',
blur: '0px',
spread: '0px',
inset: false,
},
$type: 'shadow',
},
},
},
primary: {
Expand Down
12 changes: 0 additions & 12 deletions src/tokens/functional/shadow/light.json5
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,6 @@
],
$type: 'shadow',
},
inset: {
$value: {
color: '{base.color.white}',
alpha: 0.25,
offsetX: '0px',
offsetY: '1px',
blur: '0px',
spread: '0px',
inset: true,
},
$type: 'shadow',
},
},
},
primary: {
Expand Down

0 comments on commit f431e7e

Please sign in to comment.