Skip to content

Commit b37f65f

Browse files
committed
style ideas
1 parent 20f3981 commit b37f65f

File tree

1 file changed

+28
-14
lines changed

1 file changed

+28
-14
lines changed

src/pg/treeItem/treeItem.css

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,33 @@
5959
}
6060

6161
[part=item]:hover {
62-
background: var(--pg-tree-item-background-hover, #453C4F);
62+
background: var(--pg-tree-item-background-hover, rgb(69, 60, 79, 0.1));
6363
}
64-
[part=item]:hover [part=iconButton] {
65-
--pg-icon-color: var(--pg-tree-item-color-hover, #FFF);
66-
}
67-
[part=item]:hover [part=label] {
68-
color: var(--pg-tree-item-color-hover, #FFFFFF);
64+
65+
[part=item].items.selected {
66+
background-color: var(--pg-tree-item-background-selected, rgb(69, 60, 79, 0.1));
6967
}
70-
[part=item]:hover [part=actions] {
71-
--pg-icon-color: var(--pg-tree-item-color-hover, #FFFFFF);
68+
[part=item].items.selected [part=toggle] {
69+
position: relative;
70+
border-radius: 0.125rem;
71+
background-color: var(--pg-tree-item-background-selected, #453C4F);
72+
background-image: url("data:image/svg+xml; utf8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M 11,17L 13,17L 19,11L 17,9L 12,14L 7,9L 5,11' fill='white' /></svg>") !important;
7273
}
7374

74-
[part=item].selected {
75-
background: var(--pg-tree-item-background-selected, #453C4F);
75+
[part=item].selected:not(.items) {
76+
position: relative;
77+
background-color: var(--pg-tree-item-background-selected, rgb(69, 60, 79, 0.1));
78+
}
79+
[part=item].selected:not(.items)::before {
80+
position: absolute;
81+
content: ' ';
82+
display: flex;
83+
left: calc(0.125rem + 0.5rem * var(--x));
84+
top: 0.125rem;
85+
bottom: 0.125rem;
86+
width: 1rem;
87+
border-radius: 0.125rem;
88+
background: #453C4F;
7689
}
7790

7891
[part=item]:not(.items) {
@@ -109,8 +122,8 @@
109122
}
110123

111124
[part=toggle]:hover {
112-
box-shadow: 0 0 1px rgba(255, 255, 255, 0.5) inset;
113-
background-color: rgba(255, 255, 255, 0.2);
125+
box-shadow: 0 0 0.125rem rgba(0, 0, 0, 0.25);
126+
background-color: rgba(255, 255, 255, 0.5);
114127
border-radius: 0.125rem;
115128
}
116129

@@ -123,7 +136,7 @@
123136
display: flex;
124137
background-image: url("data:image/svg+xml; utf8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M 11,17L 13,17L 19,11L 17,9L 12,14L 7,9L 5,11' fill='rgb(69 60 79)' /></svg>");
125138
}
126-
139+
/*
127140
[part=item].items:not(.expanded):hover [part=toggle] {
128141
display: flex;
129142
background-image: url("data:image/svg+xml; utf8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M 17,13L 17,11L 11,5L 9,7L 14,12L 9,17L 11,19' fill='white' /></svg>");
@@ -132,4 +145,5 @@
132145
[part=item].items.expanded:hover [part=toggle] {
133146
display: flex;
134147
background-image: url("data:image/svg+xml; utf8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M 11,17L 13,17L 19,11L 17,9L 12,14L 7,9L 5,11' fill='white' /></svg>");
135-
}
148+
}
149+
*/

0 commit comments

Comments
 (0)