Skip to content

Commit dee55cf

Browse files
authored
feat(ui5-token): change readonly select state visual (#12822)
1 parent 86440aa commit dee55cf

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

packages/main/src/themes/Token.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
background: var(--sapButton_Hover_Background);
2121
}
2222

23-
:host([selected]) {
23+
:host(:not([readonly])[selected]) {
2424
background: var(--sapButton_Selected_Background);
2525
border: var(--sapButton_BorderWidth) solid var(--sapButton_Selected_BorderColor);
2626
color: var(--sapButton_Selected_TextColor);
2727
}
2828

29-
:host([selected]) .ui5-token--wrapper::before {
29+
:host(:not([readonly])[selected]) .ui5-token--wrapper::before {
3030
content: "";
3131
position: absolute;
3232
border-bottom: var(--_ui5_token_selected_internal_border_bottom);
@@ -40,6 +40,11 @@
4040
pointer-events: none;
4141
}
4242

43+
:host([readonly][selected]) .ui5-token--text {
44+
background: var(--sapSelectedColor);
45+
color: var(--sapContent_ContrastTextColor);
46+
}
47+
4348
:host([selected]:hover) {
4449
background: var(--sapButton_Selected_Hover_Background);
4550
}
@@ -58,7 +63,7 @@
5863
outline: var(--_ui5_token_selected_focus_outline);
5964
}
6065

61-
:host([focused][selected]:not(:hover)) {
66+
:host(:not([readonly])[focused][selected]:not(:hover)) {
6267
background: var(--sapButton_Selected_Background);
6368
color: var(--sapButton_Selected_TextColor);
6469
border: var(--_ui5_token_focused_selected_border);

0 commit comments

Comments
 (0)