Skip to content

Commit a0ce732

Browse files
fix(ui5-file-uploader): hovering now gives correct button styles (#3148)
* fix(ui5-file-uploader): hovering now gives correct button styles
1 parent d3c80e6 commit a0ce732

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

packages/main/src/themes/Avatar.css

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
box-sizing: border-box;
44
}
55

6+
/*The ui5_hovered class is set by FileUploader to indicate hover state of the control*/
67
:host(:not([hidden]).ui5_hovered) {
78
opacity: .7;
89
}

packages/main/src/themes/Button.css

+16-3
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ bdi {
148148
text-shadow: var(--_ui5_button_text_shadow);
149149
}
150150

151-
:host([design="Positive"]:not([active]):not([non-interactive]):not([_is-touch]):hover) {
151+
/*The ui5_hovered class is set by FileUploader to indicate hover state of the control*/
152+
:host([design="Positive"]:not([active]):not([non-interactive]):not([_is-touch]):hover),
153+
:host([design="Positive"]:not([active]):not([non-interactive]):not([_is-touch]).ui5_hovered) {
152154
background-color: var(--sapButton_Accept_Hover_Background);
153155
border-color: var(--_ui5_button_positive_border_hover_color);
154156
}
@@ -176,7 +178,9 @@ bdi {
176178
text-shadow: var(--_ui5_button_text_shadow);
177179
}
178180

179-
:host([design="Negative"]:not([active]):not([non-interactive]):not([_is-touch]):hover) {
181+
/*The ui5_hovered class is set by FileUploader to indicate hover state of the control*/
182+
:host([design="Negative"]:not([active]):not([non-interactive]):not([_is-touch]):hover),
183+
:host([design="Negative"]:not([active]):not([non-interactive]):not([_is-touch]).ui5_hovered) {
180184
background-color: var(--sapButton_Reject_Hover_Background);
181185
border-color: var(--sapButton_Reject_Hover_BorderColor);
182186
}
@@ -205,10 +209,13 @@ bdi {
205209
font-weight: var(--_ui5_button_emphasized_font_weight);
206210
}
207211

208-
:host([design="Emphasized"]:not([active]):not([non-interactive]):not([_is-touch]):hover) {
212+
/*The ui5_hovered class is set by FileUploader to indicate hover state of the control*/
213+
:host([design="Emphasized"]:not([active]):not([non-interactive]):not([_is-touch]):hover),
214+
:host([design="Emphasized"]:not([active]):not([non-interactive]):not([_is-touch]).ui5_hovered) {
209215
background-color: var(--sapButton_Emphasized_Hover_Background);
210216
border-color: var(--sapButton_Emphasized_Hover_BorderColor);
211217
}
218+
212219
:host([ui5-button][design="Empasized"][active]:not([non-interactive])) {
213220
background-color: var(--sapButton_Emphasized_Active_Background);
214221
border-color: var(--sapButton_Emphasized_Active_BorderColor);
@@ -232,6 +239,12 @@ bdi {
232239
background-color: var(--sapButton_Lite_Hover_Background);
233240
}
234241

242+
/*The ui5_hovered class is set by FileUploader to indicate hover state of the control*/
243+
:host([design="Transparent"]:not([active]):not([non-interactive]):not([_is-touch]).ui5_hovered){
244+
background-color: var(--sapButton_Lite_Hover_Background);
245+
border-color: var(--_ui5_button_transparent_hover_border_color);
246+
}
247+
235248
:host([ui5-button][design="Transparent"][active]:not([non-interactive])) {
236249
background-color: var(--sapButton_Active_Background);
237250
color: var(--sapButton_Active_TextColor);

packages/main/src/themes/Icon.css

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
display:none;
77
}
88

9+
/*The ui5_hovered class is set by FileUploader to indicate hover state of the control*/
910
:host(:not([hidden]).ui5_hovered) {
1011
opacity: .7;
1112
}

0 commit comments

Comments
 (0)