mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-25 01:08:50 +01:00
Make horizontally-scrollable comments more apparent
This commit is contained in:
parent
9ac71920bf
commit
dd5b374b53
2 changed files with 20 additions and 1 deletions
|
@ -256,6 +256,11 @@ a[href^='http'][rel*='nofollow']:visited:not(:has(div)) {
|
||||||
.timeline.contextual > li.descendant:not(.thread) > .status-link {
|
.timeline.contextual > li.descendant:not(.thread) > .status-link {
|
||||||
padding-left: 40px;
|
padding-left: 40px;
|
||||||
}
|
}
|
||||||
|
.timeline.contextual .replies[data-scroll-left]:not([data-scroll-left='0']) {
|
||||||
|
background-color: var(--bg-color);
|
||||||
|
box-shadow: inset 0 -3px var(--comment-line-color),
|
||||||
|
inset 0 3px var(--comment-line-color);
|
||||||
|
}
|
||||||
.timeline.contextual .replies[data-comments-level='4'] {
|
.timeline.contextual .replies[data-comments-level='4'] {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
@ -272,7 +277,7 @@ a[href^='http'][rel*='nofollow']:visited:not(:has(div)) {
|
||||||
.replies[data-comments-level='4']
|
.replies[data-comments-level='4']
|
||||||
.replies[data-comments-level-overflow='true']
|
.replies[data-comments-level-overflow='true']
|
||||||
.status {
|
.status {
|
||||||
min-width: min(15em, 75vw);
|
min-width: min(20em, 80vw);
|
||||||
}
|
}
|
||||||
.timeline.contextual
|
.timeline.contextual
|
||||||
> li.descendant.thread
|
> li.descendant.thread
|
||||||
|
|
|
@ -1040,8 +1040,22 @@ function SubComments({
|
||||||
});
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
const detailsRef = useRef();
|
||||||
|
useEffect(() => {
|
||||||
|
function handleScroll(e) {
|
||||||
|
e.target.dataset.scrollLeft = e.target.scrollLeft;
|
||||||
|
}
|
||||||
|
detailsRef.current?.addEventListener('scroll', handleScroll, {
|
||||||
|
passive: true,
|
||||||
|
});
|
||||||
|
return () => {
|
||||||
|
detailsRef.current?.removeEventListener('scroll', handleScroll);
|
||||||
|
};
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<details
|
<details
|
||||||
|
ref={detailsRef}
|
||||||
class="replies"
|
class="replies"
|
||||||
open={openBefore || open}
|
open={openBefore || open}
|
||||||
onToggle={(e) => {
|
onToggle={(e) => {
|
||||||
|
|
Loading…
Reference in a new issue