Skip to content

Commit

Permalink
Use control CSS var with fallback for form component border-color (#…
Browse files Browse the repository at this point in the history
…3654)

* use css var with fallback

* Create lazy-eyes-bow.md

* syntax

* test(vrt): update snapshots

---------

Co-authored-by: langermank <langermank@users.noreply.github.com>
  • Loading branch information
langermank and langermank authored Aug 22, 2023
1 parent 27f3ff9 commit 556d826
Show file tree
Hide file tree
Showing 42 changed files with 78 additions and 71 deletions.
7 changes: 7 additions & 0 deletions .changeset/lazy-eyes-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@primer/react": patch
---

Use `control` CSS var with fallback for form component border-color

<!-- Changed components: _none_ -->
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.
Binary file added blob-report/report-1.zip
Binary file not shown.
Binary file added blob-report/report-2.zip
Binary file not shown.
Binary file added blob-report/report-3.zip
Binary file not shown.
Binary file added blob-report/report-4.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions src/__tests__/__snapshots__/Autocomplete.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports[`snapshots renders a custom empty state message 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -167,7 +167,7 @@ exports[`snapshots renders a loading state 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -361,7 +361,7 @@ exports[`snapshots renders a menu that contains an item to add to the menu 1`] =
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -1318,7 +1318,7 @@ exports[`snapshots renders a multiselect input 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -2185,7 +2185,7 @@ exports[`snapshots renders a multiselect input with selected menu items 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -3063,7 +3063,7 @@ exports[`snapshots renders a single select input 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -4071,7 +4071,7 @@ exports[`snapshots renders with an input value 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down
68 changes: 34 additions & 34 deletions src/__tests__/__snapshots__/TextInput.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exports[`TextInput renders 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -125,7 +125,7 @@ exports[`TextInput renders block 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -251,7 +251,7 @@ exports[`TextInput renders consistently 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -368,7 +368,7 @@ exports[`TextInput renders contrast 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -487,7 +487,7 @@ exports[`TextInput renders error 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -612,7 +612,7 @@ exports[`TextInput renders large 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -737,7 +737,7 @@ exports[`TextInput renders leadingVisual 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -882,7 +882,7 @@ exports[`TextInput renders leadingVisual 2`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -1027,7 +1027,7 @@ exports[`TextInput renders leadingVisual 3`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -1153,7 +1153,7 @@ exports[`TextInput renders leadingVisual 4`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -1279,7 +1279,7 @@ exports[`TextInput renders monospace 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -1398,7 +1398,7 @@ exports[`TextInput renders placeholder 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -1517,7 +1517,7 @@ exports[`TextInput renders small 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -1885,7 +1885,7 @@ exports[`TextInput renders trailingAction icon button 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -2534,7 +2534,7 @@ exports[`TextInput renders trailingAction text button 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -2937,7 +2937,7 @@ exports[`TextInput renders trailingAction text button with a tooltip 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -3324,7 +3324,7 @@ exports[`TextInput renders trailingVisual 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -3469,7 +3469,7 @@ exports[`TextInput renders trailingVisual 2`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -3614,7 +3614,7 @@ exports[`TextInput renders trailingVisual 3`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -3740,7 +3740,7 @@ exports[`TextInput renders trailingVisual 4`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -3866,7 +3866,7 @@ exports[`TextInput renders warning 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -4006,7 +4006,7 @@ exports[`TextInput renders with a loading indicator 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -4178,7 +4178,7 @@ exports[`TextInput renders with a loading indicator 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -4382,7 +4382,7 @@ exports[`TextInput renders with a loading indicator 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -4563,7 +4563,7 @@ exports[`TextInput renders with a loading indicator 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -4813,7 +4813,7 @@ exports[`TextInput renders with a loading indicator 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -5063,7 +5063,7 @@ exports[`TextInput renders with a loading indicator 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -5307,7 +5307,7 @@ exports[`TextInput renders with a loading indicator 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -5519,7 +5519,7 @@ exports[`TextInput renders with a loading indicator 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -5763,7 +5763,7 @@ exports[`TextInput renders with a loading indicator 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -5984,7 +5984,7 @@ exports[`TextInput renders with a loading indicator 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -6283,7 +6283,7 @@ exports[`TextInput renders with a loading indicator 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -6573,7 +6573,7 @@ exports[`TextInput renders with a loading indicator 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down Expand Up @@ -6836,7 +6836,7 @@ exports[`TextInput should render a password input 1`] = `
color: #1F2328;
vertical-align: middle;
background-color: #ffffff;
border: 1px solid #d0d7de;
border: 1px solid var(--control-borderColor-rest,#d0d7de);
border-radius: 6px;
outline: none;
box-shadow: inset 0 1px 0 rgba(208,215,222,0.2);
Expand Down
Loading

0 comments on commit 556d826

Please sign in to comment.