Skip to content

Commit 4ac6d23

Browse files
authored
fix(ui5-li-tree): hover and active visual state (#3298)
1 parent 15e235e commit 4ac6d23

File tree

1 file changed

+39
-35
lines changed

1 file changed

+39
-35
lines changed
+39-35
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
@import "./InvisibleTextStyles.css";
2-
32
:host(:not([hidden])) {
43
display: block;
5-
cursor: pointer;
6-
position: relative;
4+
position: relative;
75
}
86

97
:host([_minimal]) .ui5-li-tree-toggle-box {
@@ -12,85 +10,91 @@
1210
}
1311

1412
:host([_minimal]) .ui5-li-icon {
15-
padding: 0;
13+
padding: 0;
1614
}
1715

1816
:host([_minimal]) .ui5-li-content {
19-
justify-content: center;
17+
justify-content: center;
2018
}
2119

2220
:host([_minimal]) .ui5-li-root-tree {
23-
padding: 0;
21+
padding: 0;
2422
}
2523

2624
:host([_minimal][show-toggle-button])::after {
27-
content: "";
28-
width: 0;
29-
height: 0;
30-
border-left: 0.375rem solid transparent;
31-
border-bottom: .375rem solid var(--sapContent_IconColor);
32-
position: absolute;
33-
right: 0.1875rem;
34-
bottom: 0.125rem;
25+
content: "";
26+
width: 0;
27+
height: 0;
28+
border-left: 0.375rem solid transparent;
29+
border-bottom: .375rem solid var(--sapContent_IconColor);
30+
position: absolute;
31+
right: 0.1875rem;
32+
bottom: 0.125rem;
3533
}
3634

3735
:host([_minimal]) .ui5-li-tree-text-wrapper {
3836
display: none;
3937
}
4038

4139
.ui5-li-root-tree {
42-
padding-left: 0;
40+
padding-left: 0;
4341
}
4442

4543
:host(:not([level="1"])) {
46-
border-color: var(--sapList_AlternatingBackground);
44+
border-color: var(--sapList_AlternatingBackground);
4745
}
4846

49-
:host([_toggle-button-end][selected]:not([level="1"])){
50-
border-bottom: var(--ui5-listitem-selected-border-bottom);
47+
:host([_toggle-button-end][selected]:not([level="1"])) {
48+
border-bottom: var(--ui5-listitem-selected-border-bottom);
5149
}
5250

53-
:host([_toggle-button-end]:not([selected])) .ui5-li-root-tree:hover {
54-
background: var(--sapList_Hover_Background);
55-
cursor: pointer;
51+
:host([_toggle-button-end]:not([selected])) .ui5-li-root-tree:hover, :host([_mode]:not([_mode="None"]):not([_mode="Delete"]):not([selected])) .ui5-li-root-tree:hover {
52+
background: var(--sapList_Hover_Background);
53+
cursor: pointer;
5654
}
5755

5856
:host(:not([level="1"]):not([selected])) .ui5-li-root-tree {
59-
background: var(--sapList_AlternatingBackground);
57+
background: var(--sapList_AlternatingBackground);
6058
}
6159

6260
:host([_toggle-button-end]:not([level="1"])) .ui5-li-root-tree {
63-
background: var(--ui5-listitem-background-color);
61+
background: var(--ui5-listitem-background-color);
6462
}
6563

6664
:host([_toggle-button-end][selected]:not([level="1"])) .ui5-li-root-tree {
67-
background: var(--sapList_SelectionBackgroundColor);
65+
background: var(--sapList_SelectionBackgroundColor);
66+
}
67+
68+
:host([_mode]:not([_mode="None"]):not([_mode="Delete"])[selected]) .ui5-li-root-tree:hover {
69+
background-color: var(--sapList_Hover_SelectionBackground);
70+
cursor: pointer;
6871
}
6972

7073
.ui5-li-tree-toggle-box {
71-
min-width: var(--_ui5-tree-toggle-box-width);
72-
min-height: var(--_ui5-tree-toggle-box-height);
73-
display: flex;
74-
align-items: center;
75-
justify-content: center;
74+
min-width: var(--_ui5-tree-toggle-box-width);
75+
min-height: var(--_ui5-tree-toggle-box-height);
76+
display: flex;
77+
align-items: center;
78+
justify-content: center;
7679
}
7780

7881
.ui5-li-tree-toggle-icon {
79-
width: var(--_ui5-tree-toggle-icon-size);
80-
height: var(--_ui5-tree-toggle-icon-size);
82+
width: var(--_ui5-tree-toggle-icon-size);
83+
height: var(--_ui5-tree-toggle-icon-size);
8184
color: var(--sapContent_IconColor);
85+
cursor: pointer;
8286
}
8387

8488
:host([actionable]) .ui5-li-tree-toggle-icon {
85-
color: var(--sapButton_TextColor);
89+
color: var(--sapButton_TextColor);
8690
}
8791

8892
:host([active][actionable]) .ui5-li-tree-toggle-icon {
89-
color: var(--sapList_Active_TextColor);
93+
color: var(--sapList_Active_TextColor);
9094
}
9195

9296
.ui5-li-tree-text-wrapper {
93-
display:flex;
94-
justify-content:space-between;
97+
display: flex;
98+
justify-content: space-between;
9599
width: 100%;
96100
}

0 commit comments

Comments
 (0)