Skip to content

Commit 739cefa

Browse files
PwntusSamuell1
authored andcommitted
fix(MdListItem): expand content cursor style and hover (#1808)
* fix(MdListItemExpand): specifically target direct md-list-expand-icon children when parent is active. * fix(MdListItem): expand content cursor style and hover (#1643)
1 parent 24e63ba commit 739cefa

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

src/components/MdList/MdListItem/MdListItem.vue

+4-2
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,10 @@
127127
text-transform: none;
128128
129129
&:not(.md-list-item-default):not([disabled]) {
130-
user-select: none;
131-
cursor: pointer;
130+
> .md-list-item-content {
131+
user-select: none;
132+
cursor: pointer;
133+
}
132134
}
133135
134136
&.md-button-clean:hover {

src/components/MdList/MdListItem/MdListItemExpand.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
will-change: border;
130130
131131
&.md-active {
132-
.md-list-expand-icon {
132+
> .md-list-item-content > .md-list-expand-icon {
133133
perspective: 1000px;
134134
perspective-origin: 50% 50%;
135135
transform: rotateX(180deg);

src/components/MdList/theme.scss

+12-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
.md-list-item-container {
1919
@include md-theme-property(color, text-primary, background);
2020

21-
&:not(.md-list-item-default):not([disabled]):hover {
21+
&:not(.md-list-item-default):not(.md-list-item-expand):not([disabled]):hover {
2222
@include md-theme-property(background-color, divider, background);
2323
@include md-theme-property(color, text-primary, background);
2424
}
@@ -35,8 +35,17 @@
3535
}
3636
}
3737

38-
.md-list-item-expand.md-active {
39-
@include md-theme-property(border-color, divider, background);
38+
.md-list-item-expand {
39+
&.md-active {
40+
@include md-theme-property(border-color, divider, background);
41+
}
42+
43+
&:not(.md-list-item-default):not([disabled]) {
44+
> .md-list-item-content:hover {
45+
@include md-theme-property(background-color, divider, background);
46+
@include md-theme-property(color, text-primary, background);
47+
}
48+
}
4049
}
4150
}
4251
}

0 commit comments

Comments
 (0)