Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85805313
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/components/attachment/attachment.scss b/src/components/attachment/attachment.scss
index 3c3ba7751a..5e54085c10 100644
--- a/src/components/attachment/attachment.scss
+++ b/src/components/attachment/attachment.scss
@@ -5,6 +5,7 @@
align-self: flex-start;
line-height: 0;
height: 100%;
+ width: 100%;
border-style: solid;
border-width: 1px;
border-radius: var(--roundness);
@@ -13,8 +14,14 @@
.attachment-wrapper {
flex: 1 1 auto;
height: 100%;
+ width: 100%;
position: relative;
- overflow: hidden;
+ display: grid;
+ grid-template-rows: 100%;
+ grid-template-columns: 100%;
+ grid-template-areas: "center";
+ place-content: center;
+ place-items: center;
}
.description-container {
@@ -56,10 +63,23 @@
& .video-container,
& .flash-container,
& .oembed-container {
- display: flex;
- justify-content: center;
width: 100%;
height: 100%;
+ object-fit: contain;
+ grid-area: center;
+
+ &.-hidden {
+ position: absolute;
+ top: 0;
+ left: 0;
+ max-width: 0;
+ max-height: 0;
+ pointer-events: none;
+ }
+ }
+
+ .nsfw.image {
+ object-fit: cover;
}
.image-container {
@@ -211,7 +231,6 @@
&.-placeholder {
display: inline-block;
color: var(--link);
- overflow: hidden;
white-space: nowrap;
height: auto;
line-height: 1.5;
diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue
index 8082eee172..182358a2c1 100644
--- a/src/components/attachment/attachment.vue
+++ b/src/components/attachment/attachment.vue
@@ -66,7 +66,7 @@
>
<img
:key="nsfwImage"
- class="nsfw"
+ class="nsfw image"
:src="nsfwImage"
:alt="$t('status.nsfw_placeholder')"
:title="$t('status.nsfw_placeholder')"
@@ -157,6 +157,7 @@
class="image-container"
:class="{'-hidden': hidden && preloadImage }"
:tabindex="hidden ? -1 : 0"
+ :aria-hidden="hidden"
:href="attachment.url"
target="_blank"
@click.stop.prevent="openModal"
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Oct 11, 7:12 AM (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1785644
Default Alt Text
(2 KB)
Attached To
Mode
rPUFE pleroma-fe-upstream
Attached
Detach File
Event Timeline
Log In to Comment