mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-14 04:08:32 +03:00
Contextually highlight related caption when hovering over image
For multiple-media figures
This commit is contained in:
parent
f9299ac15c
commit
e1ae89b00e
2 changed files with 17 additions and 0 deletions
|
@ -1027,6 +1027,22 @@ body:has(#modal-container .carousel) .status .media img:hover {
|
|||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
}
|
||||
|
||||
/* Only 4, for now. Would be better if this is a for loop */
|
||||
&:has(.media[data-has-alt]:nth-child(1):is(:hover, :focus))
|
||||
figcaption
|
||||
> div[data-caption-index='1'],
|
||||
&:has(.media[data-has-alt]:nth-child(2):is(:hover, :focus))
|
||||
figcaption
|
||||
> div[data-caption-index='2'],
|
||||
&:has(.media[data-has-alt]:nth-child(3):is(:hover, :focus))
|
||||
figcaption
|
||||
> div[data-caption-index='3'],
|
||||
&:has(.media[data-has-alt]:nth-child(4):is(:hover, :focus))
|
||||
figcaption
|
||||
> div[data-caption-index='4'] {
|
||||
color: var(--text-color);
|
||||
}
|
||||
}
|
||||
|
||||
.carousel-item {
|
||||
|
|
|
@ -1283,6 +1283,7 @@ function Status({
|
|||
!!media.description && (
|
||||
<div
|
||||
key={media.id}
|
||||
data-caption-index={i + 1}
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
|
Loading…
Add table
Reference in a new issue