Skip to content

Commit 9ec51f2

Browse files
committed
Merge remote-tracking branch 'origin/release/v25.0.0' into fix/hotkeysDuringDialog-CMEM-6851
2 parents 96f58c4 + c0b6276 commit 9ec51f2

File tree

1 file changed

+65
-15
lines changed

1 file changed

+65
-15
lines changed

src/components/Button/button.scss

Lines changed: 65 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -50,31 +50,57 @@ $dark-button-gradient: $button-gradient; // !default;
5050
// $button-outlined-border-disabled-intent-opacity: 0.2 !default;
5151

5252
$button-intents: (
53-
"primary": (
54-
eccgui-color-var("identity", "brand", "900"),
55-
eccgui-color-var("identity", "brand", "700"),
56-
eccgui-color-var("identity", "brand", "500"),
57-
),
53+
// default - hover - active
54+
"primary":
55+
(
56+
eccgui-color-var("identity", "brand", "900"),
57+
eccgui-color-mix(
58+
eccgui-color-var("identity", "brand", "900"),
59+
eccgui-color-var("identity", "text", "900") 10%
60+
),
61+
eccgui-color-mix(
62+
eccgui-color-var("identity", "brand", "900"),
63+
eccgui-color-var("identity", "text", "900") 20%
64+
)
65+
),
5866
"accent": (
5967
eccgui-color-var("identity", "accent", "900"),
60-
eccgui-color-var("identity", "accent", "700"),
61-
eccgui-color-var("identity", "accent", "500"),
68+
eccgui-color-mix(
69+
eccgui-color-var("identity", "accent", "900"),
70+
eccgui-color-var("identity", "text", "900") 10%
71+
),
72+
eccgui-color-mix(eccgui-color-var("identity", "accent", "900"), eccgui-color-var("identity", "text", "900") 20%)
6273
),
6374
"success": (
6475
eccgui-color-var("semantic", "success", "900"),
65-
eccgui-color-var("semantic", "success", "700"),
66-
eccgui-color-var("semantic", "success", "500"),
76+
eccgui-color-mix(
77+
eccgui-color-var("semantic", "success", "900"),
78+
eccgui-color-var("identity", "text", "900") 10%
79+
),
80+
eccgui-color-mix(
81+
eccgui-color-var("semantic", "success", "900"),
82+
eccgui-color-var("identity", "text", "900") 20%
83+
)
6784
),
6885
"warning": (
6986
eccgui-color-var("semantic", "warning", "900"),
70-
eccgui-color-var("semantic", "warning", "700"),
71-
eccgui-color-var("semantic", "warning", "500"),
87+
eccgui-color-mix(
88+
eccgui-color-var("semantic", "warning", "900"),
89+
eccgui-color-var("identity", "text", "900") 10%
90+
),
91+
eccgui-color-mix(
92+
eccgui-color-var("semantic", "warning", "900"),
93+
eccgui-color-var("identity", "text", "900") 20%
94+
)
7295
),
7396
"danger": (
7497
eccgui-color-var("semantic", "danger", "900"),
75-
eccgui-color-var("semantic", "danger", "700"),
76-
eccgui-color-var("semantic", "danger", "500"),
77-
),
98+
eccgui-color-mix(
99+
eccgui-color-var("semantic", "danger", "900"),
100+
eccgui-color-var("identity", "text", "900") 10%
101+
),
102+
eccgui-color-mix(eccgui-color-var("semantic", "danger", "900"), eccgui-color-var("identity", "text", "900") 20%)
103+
)
78104
);
79105

80106
@import "~@blueprintjs/core/src/components/button/button";
@@ -100,7 +126,31 @@ $button-intents: (
100126

101127
&:disabled,
102128
&.#{$ns}-disabled {
103-
color: eccgui-color-rgba(list.nth(map.get($button-intents, $intentvalue), 1), 0.39);
129+
color: eccgui-color-rgba(list.nth(map.get($button-intents, $intentvalue), 1), $eccgui-opacity-disabled);
130+
border-color: eccgui-color-rgba(
131+
list.nth(map.get($button-intents, $intentvalue), 1),
132+
$eccgui-opacity-disabled
133+
);
134+
}
135+
136+
&:active:not(:disabled):not(.#{$ns}-disabled),
137+
&.#{$ns}-active:not(:disabled):not(.#{$ns}-disabled) {
138+
color: list.nth(map.get($button-intents, $intentvalue), 3);
139+
background-color: eccgui-color-rgba(
140+
list.nth(map.get($button-intents, $intentvalue), 3),
141+
$eccgui-opacity-ghostly
142+
);
143+
border-color: list.nth(map.get($button-intents, $intentvalue), 3);
144+
}
145+
146+
&:focus:not(:disabled):not(.#{$ns}-disabled),
147+
&:hover:not(:disabled):not(.#{$ns}-disabled) {
148+
color: list.nth(map.get($button-intents, $intentvalue), 2);
149+
background-color: eccgui-color-rgba(
150+
list.nth(map.get($button-intents, $intentvalue), 2),
151+
0.5 * $eccgui-opacity-ghostly
152+
);
153+
border-color: list.nth(map.get($button-intents, $intentvalue), 2);
104154
}
105155
}
106156
}

0 commit comments

Comments
 (0)