-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change disabled button style #77
Changes from 2 commits
bbb5ea4
fb2b587
0c639e5
27a334f
8c23506
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -569,7 +569,6 @@ export const buttonStyles: ( | |
appearanceBehavior( | ||
'accent', | ||
css` | ||
:host([appearance='accent'][disabled]), | ||
:host([appearance='accent'][disabled]:hover), | ||
:host([appearance='accent'][disabled]:active) { | ||
background: ${accentFillRest}; | ||
|
@@ -661,7 +660,6 @@ export const buttonStyles: ( | |
appearanceBehavior( | ||
'stealth', | ||
css` | ||
:host([appearance='stealth'][disabled]), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should remove the all block including on hover and on active case as the goal is to avoid style change when the button is disabled. |
||
:host([appearance='stealth'][disabled]:hover), | ||
:host([appearance='stealth'][disabled]:active) { | ||
background: ${neutralFillStealthRest}; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,7 +64,6 @@ export { | |
designUnit, | ||
direction, | ||
DirectionalStyleSheetBehavior, | ||
disabledOpacity, | ||
fillColor, | ||
focusStrokeInner, | ||
focusStrokeInnerRecipe, | ||
|
@@ -174,6 +173,12 @@ export { | |
|
||
const { create } = DesignToken; | ||
|
||
/** | ||
* The default disabled opacity. | ||
*/ | ||
export const disabledOpacity = | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually as the design token are shared, you should only call import { disabledOpacity } from '@microsoft/fast-components';
export { disabledOpacity } from '@microsoft/fast-components';
disabledOpacity.withDefault(0.3); There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, I didn't know about that. |
||
DesignToken.create<number>('opacity').withDefault(0.4); | ||
|
||
/* | ||
* The error palette is built using the same color algorithm as the accent palette | ||
* But by copying the algorithm from @microsoft/fast-components at commit 03d711f222bd816834a5e1d60256d3e083b27c27 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a specific reason for changing the accent type case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency.
And maybe we should also remove the
background-color
property of:host([disabled])
too.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep it for now as in the opposite of the stealth appearance, the background-color is controlled by the toolkit.