Skip to content

Commit 7f25054

Browse files
authored
Add new theme variable for positive button focus state (#5217)
1 parent 6f1225d commit 7f25054

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

scss/_patterns_buttons.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
$button-disabled-border-color: $colors--theme--button-positive-default,
8181
$button-text-color: $colors--theme--button-positive-text
8282
);
83-
@include vf-focus($color-focus-positive);
83+
@include vf-focus($colors--theme--positive-focus);
8484
}
8585
}
8686

scss/_settings_colors.scss

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ $color-link-visited-dark: #a679d2 !default;
3939
$color-focus-dark: #9cf !default;
4040

4141
// Focus modifications to meet AA 3:1 contrast ratio against
42-
// button background for positive/negative buttons
42+
// button background for positive buttons
4343
$color-focus-positive: #003008 !default;
44-
$color-focus-negative: #3b0006 !default;
44+
$color-focus-positive-dark: #9cf !default;
4545

4646
// Button background color changes
4747
$input-background-opacity-amount: 0.04;
@@ -93,6 +93,7 @@ $states: (
9393
// --link-default - default link color
9494
// --link-visited - visited link color
9595
// --focus - focus highlight/outline color
96+
// --positive-focus - focus highlight/outline color for positive buttons
9697
//
9798
// Background colors:
9899
// --background - default background color
@@ -114,6 +115,7 @@ $colors--light-theme--text-inactive: rgba($color-x-dark, $inactive-text-opacity-
114115
$colors--light-theme--link-default: $color-link !default;
115116
$colors--light-theme--link-visited: $color-link-visited !default;
116117
$colors--light-theme--focus: $color-focus !default;
118+
$colors--light-theme--positive-focus: $color-focus-positive !default;
117119

118120
$colors--light-theme--background-default: #fff !default;
119121
$colors--light-theme--background-alt: #f7f7f7 !default;
@@ -174,6 +176,7 @@ $colors--dark-theme--text-inactive: rgba($colors--dark-theme--text-default, $ina
174176
$colors--dark-theme--link-default: $color-link-dark !default;
175177
$colors--dark-theme--link-visited: $color-link-visited-dark !default;
176178
$colors--dark-theme--focus: $color-focus-dark !default;
179+
$colors--dark-theme--positive-focus: $color-focus-positive-dark !default;
177180

178181
$colors--dark-theme--background-default: #262626 !default;
179182
$colors--dark-theme--background-alt: #202020 !default;
@@ -241,6 +244,7 @@ $colors--theme--text-inactive: var(--vf-color-text-inactive);
241244
$colors--theme--link-default: var(--vf-color-link-default);
242245
$colors--theme--link-visited: var(--vf-color-link-visited);
243246
$colors--theme--focus: var(--vf-color-focus);
247+
$colors--theme--positive-focus: var(--vf-color-positive-focus);
244248

245249
$colors--theme--background-default: var(--vf-color-background-default);
246250
$colors--theme--background-alt: var(--vf-color-background-alt);
@@ -296,6 +300,7 @@ $colors--theme--button-negative-text: var(--vf-color-button-negative-text);
296300
--vf-color-link-default: #{$colors--light-theme--link-default};
297301
--vf-color-link-visited: #{$colors--light-theme--link-visited};
298302
--vf-color-focus: #{$colors--light-theme--focus};
303+
--vf-color-positive-focus: #{$colors--light-theme--positive-focus};
299304

300305
--vf-color-background-default: #{$colors--light-theme--background-default};
301306
--vf-color-background-alt: #{$colors--light-theme--background-alt};
@@ -351,6 +356,7 @@ $colors--theme--button-negative-text: var(--vf-color-button-negative-text);
351356
--vf-color-link-default: #{$colors--dark-theme--link-default};
352357
--vf-color-link-visited: #{$colors--dark-theme--link-visited};
353358
--vf-color-focus: #{$colors--dark-theme--focus};
359+
--vf-color-positive-focus: #{$colors--dark-theme--positive-focus};
354360

355361
--vf-color-background-default: #{$colors--dark-theme--background-default};
356362
--vf-color-background-alt: #{$colors--dark-theme--background-alt};

0 commit comments

Comments
 (0)