|
47 | 47 | &:focus {
|
48 | 48 | --slds-c-button-color-border: var(--slds-c-button-color-border-hover);
|
49 | 49 | --slds-c-button-color-background: var(--slds-c-button-color-background-hover);
|
50 |
| - --slds-c-button-text-color: var(--slds-c-button-text-color-hover, var(--sds-c-button-text-color-hover, #{$brand-accessible-active})); |
| 50 | + color: var(--slds-c-button-text-color-hover, var(--sds-c-button-text-color-hover, #{$brand-accessible-active})); |
51 | 51 | }
|
52 | 52 |
|
53 | 53 | &:focus {
|
@@ -113,10 +113,48 @@ a.slds-button {
|
113 | 113 | }
|
114 | 114 | }
|
115 | 115 |
|
| 116 | +// NOTE: You may notice that these link-specific Button styles are *not* using CSS Custom Property reassignment. This is due to the fact that the global `a:hover` text styles are leaking into the component (which is expected, as `property: value;` declarations override reassignment by design). This shouldn't be necessary in the vast majority of components, but due to the global inheritance at play here this is our best option. |
| 117 | +a.slds-button_brand:hover, |
| 118 | +a.slds-button--brand:hover, |
| 119 | +a.slds-button_brand:focus, |
| 120 | +a.slds-button--brand:focus { |
| 121 | + color: |
| 122 | + var(--slds-c-button-brand-text-color-hover, |
| 123 | + var(--sds-c-button-brand-text-color-hover, |
| 124 | + var(--slds-g-link-text-color-hover, $color-text-brand-primary))); |
| 125 | +} |
| 126 | + |
| 127 | +a.slds-button_destructive:hover, |
| 128 | +a.slds-button--destructive:hover, |
| 129 | +a.slds-button_destructive:focus, |
| 130 | +a.slds-button--destructive:focus { |
| 131 | + color: |
| 132 | + var(--slds-c-button-destructive-text-color, |
| 133 | + var(--sds-c-button-destructive-text-color, $color-text-inverse)); |
| 134 | +} |
| 135 | + |
| 136 | +a.slds-button_text-destructive:hover, |
| 137 | +a.slds-button_text-destructive:focus { |
| 138 | + color: |
| 139 | + var(--slds-c-button-text-destructive-text-color-hover, |
| 140 | + var(--sds-c-button-text-destructive-text-color-hover, $color-text-destructive-hover)); |
| 141 | +} |
| 142 | + |
| 143 | +a.slds-button_success:hover, |
| 144 | +a.slds-button--success:hover, |
| 145 | +a.slds-button_success:focus, |
| 146 | +a.slds-button--success:focus { |
| 147 | + color: |
| 148 | + var(--slds-c-button-success-text-color-hover, |
| 149 | + var(--sds-c-button-success-text-color-hover, $color-text-inverse)); |
| 150 | +} |
| 151 | + |
| 152 | +// end NOTE |
| 153 | + |
116 | 154 | a.slds-button_inverse:focus,
|
117 | 155 | a.slds-button--inverse:focus {
|
118 | 156 | /*! @css-var-fallback border-color */
|
119 |
| - --slds-c-button-color-border: var(--sds-c-button-inverse-color-border-focus, var(--sds-c-button-inverse-color-border-focus, #{$color-border-button-focus-inverse})); |
| 157 | + --slds-c-button-color-border: var(--slds-c-button-inverse-color-border-focus, var(--sds-c-button-inverse-color-border-focus, #{$color-border-button-focus-inverse})); |
120 | 158 |
|
121 | 159 | /*! @css-var-fallback box-shadow */
|
122 | 160 | --slds-c-button-shadow: var(--slds-c-button-inverse-shadow-focus, var(--sds-c-button-inverse-shadow-focus, #{$shadow-button-focus-inverse}));
|
|
0 commit comments