1
0
mirror of https://github.com/zedeus/nitter.git synced 2026-04-13 09:12:12 -04:00

Support image alt text

Fixes #559
This commit is contained in:
Zed
2026-02-10 22:42:06 +01:00
parent 40b1ba4e4e
commit 1c06a67afd
9 changed files with 60 additions and 19 deletions

View File

@@ -4,7 +4,6 @@
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
overflow: hidden;
flex-grow: 1;
max-height: 379.5px;
@@ -13,7 +12,7 @@
.still-image {
width: 100%;
display: flex;
align-self: center;
}
}
@@ -58,7 +57,6 @@
.still-image {
max-height: 379.5px;
max-width: 533px;
justify-content: center;
img {
object-fit: cover;
@@ -69,8 +67,37 @@
}
}
.alt-text {
margin: 0px;
padding: 11px 7px;
box-sizing: border-box;
position: absolute;
bottom: 10px;
left: 10px;
width: 2.98em;
max-height: 25px;
white-space: pre;
overflow: hidden;
border-radius: 10px;
color: var(--fg_color);
font-size: 12px;
font-weight: bold;
background: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(12px);
}
.alt-text:hover {
padding: 7px;
width: Min(230px, calc(100% - 10px * 2));
max-height: calc(100% - 10px);
line-height: 1.2em;
white-space: pre-wrap;
transition-duration: 0.4s;
transition-property: max-height;
}
.image {
display: inline-block;
display: flex;
}
// .single-image {