mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-06-19 05:59:26 +08:00
Fixes some lightbox layout issues in RTL languages, especially around the next/previous buttons. Previously the nav btns were cut off in RTL mode: <img width="41" height="69" alt="Screenshot 2025-12-22 at 11 35 44 AM" src="https://github.com/user-attachments/assets/c6f4812c-0539-4ed2-96a2-5515a8741d21" /> After the fix: <img width="65" height="71" alt="Screenshot 2025-12-22 at 11 34 55 AM" src="https://github.com/user-attachments/assets/e32a68eb-0f0e-4a9c-9e80-1d8e550cbac3" />
241 lines
4.2 KiB
SCSS
Vendored
241 lines
4.2 KiB
SCSS
Vendored
.d-lazyload-hidden {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.onebox img.d-lazyload-hidden:not(.ytp-thumbnail-image) {
|
|
border: 1px solid var(--content-border-color);
|
|
}
|
|
|
|
.cooked img.d-lazyload:not(.animated) {
|
|
transition: opacity 0.4s 0.75s ease;
|
|
}
|
|
|
|
.lightbox-wrapper {
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
|
|
img {
|
|
object-fit: cover;
|
|
object-position: top;
|
|
}
|
|
|
|
&,
|
|
* {
|
|
outline: 0;
|
|
}
|
|
|
|
.lightbox {
|
|
position: relative;
|
|
display: inline-block;
|
|
overflow: hidden;
|
|
|
|
&:hover .meta {
|
|
user-select: none;
|
|
opacity: 0.9;
|
|
transition: opacity 0.5s;
|
|
}
|
|
|
|
.meta {
|
|
--meta-element-margin: 0.375em;
|
|
position: absolute;
|
|
bottom: 0;
|
|
width: 100%;
|
|
color: var(--secondary);
|
|
background: var(--primary);
|
|
opacity: 0;
|
|
transition: opacity 0.2s;
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
@media (pointer: coarse) {
|
|
align-items: center;
|
|
background: var(--secondary);
|
|
color: var(--primary-high);
|
|
height: 25px;
|
|
width: 25px;
|
|
bottom: 0;
|
|
right: 0;
|
|
opacity: 0.8;
|
|
transition: opacity 500ms;
|
|
|
|
&.open {
|
|
opacity: 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.filename {
|
|
margin: var(--meta-element-margin);
|
|
|
|
@include ellipsis;
|
|
|
|
@media (pointer: coarse) {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.d-icon {
|
|
margin: var(--meta-element-margin);
|
|
opacity: 0.8;
|
|
color: var(--secondary);
|
|
|
|
+ .filename {
|
|
margin-left: 0;
|
|
}
|
|
|
|
&.d-icon-far-image {
|
|
@media (pointer: coarse) {
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
|
|
.informations {
|
|
margin: var(--meta-element-margin);
|
|
padding-right: 20px;
|
|
color: var(--secondary-high);
|
|
font-size: var(--font-0);
|
|
flex-shrink: 0;
|
|
flex-grow: 3;
|
|
|
|
@media (pointer: coarse) {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
@media (pointer: coarse) {
|
|
.d-icon-discourse-expand {
|
|
color: var(--primary-high);
|
|
}
|
|
}
|
|
}
|
|
|
|
.discourse-no-touch {
|
|
a.lightbox {
|
|
transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
|
|
}
|
|
|
|
a.lightbox:hover {
|
|
box-shadow:
|
|
0 2px 5px 0 rgb(var(--always-black-rgb), 0.2),
|
|
0 2px 10px 0 rgb(var(--always-black-rgb), 0.2);
|
|
}
|
|
}
|
|
|
|
.rtl {
|
|
.pswp__scroll-wrap,
|
|
.pswp__bg,
|
|
.pswp__container,
|
|
.pswp__item,
|
|
.pswp__content,
|
|
.pswp__img,
|
|
.pswp__zoom-wrap {
|
|
right: 0;
|
|
left: unset;
|
|
}
|
|
|
|
.pswp .pswp__top-bar .pswp__button .pswp__icn {
|
|
right: 6px;
|
|
left: unset;
|
|
}
|
|
|
|
.pswp__button--arrow--next {
|
|
left: 0 !important;
|
|
right: unset !important;
|
|
|
|
.pswp__icn {
|
|
right: unset;
|
|
left: 6px;
|
|
}
|
|
}
|
|
|
|
.pswp__button--arrow--prev {
|
|
left: unset !important;
|
|
right: 0 !important;
|
|
|
|
.pswp__icn {
|
|
left: unset;
|
|
right: 6px;
|
|
}
|
|
}
|
|
}
|
|
|
|
.pswp.pswp--behind-header {
|
|
z-index: z("header") - 1;
|
|
}
|
|
|
|
// photoswipe custom caption
|
|
.pswp__caption {
|
|
left: 0;
|
|
bottom: var(--safe-area-inset-bottom);
|
|
width: 100%;
|
|
text-align: center;
|
|
position: absolute;
|
|
|
|
.pswp__caption-title {
|
|
left: 50%;
|
|
bottom: 0;
|
|
color: #fff;
|
|
line-height: 1.25em;
|
|
position: relative;
|
|
max-width: 800px;
|
|
padding: 0 1em 0.25em;
|
|
transform: translateX(-50%);
|
|
transition: transform 0.4s ease;
|
|
}
|
|
|
|
.pswp__caption-details {
|
|
position: relative;
|
|
left: 50%;
|
|
bottom: 0;
|
|
color: #000;
|
|
background: #fff;
|
|
border-radius: 4px;
|
|
max-width: 200px;
|
|
font-size: var(--font-down-1);
|
|
transform: translate(-50%, 100%);
|
|
opacity: 0;
|
|
transition:
|
|
transform 0.4s ease,
|
|
opacity 0.4s ease;
|
|
}
|
|
}
|
|
|
|
.pswp--caption-expanded .pswp__caption-title {
|
|
transform: translate(-50%, -5px);
|
|
}
|
|
|
|
.pswp--caption-expanded .pswp__caption-details {
|
|
transform: translate(-50%, -5px);
|
|
opacity: 1;
|
|
}
|
|
|
|
.pswp .pswp__top-bar .pswp__button {
|
|
width: 45px;
|
|
|
|
.pswp__icn {
|
|
left: 6px;
|
|
}
|
|
}
|
|
|
|
.pswp__button--original-image svg,
|
|
.pswp__button--image-info svg,
|
|
.pswp__button--quote-image svg {
|
|
padding: 0.32em;
|
|
}
|
|
|
|
.pswp__custom-counter {
|
|
height: 30px;
|
|
margin-top: 15px;
|
|
margin-inline-start: 20px;
|
|
font-size: 14px;
|
|
line-height: 30px;
|
|
color: var(--pswp-icon-color);
|
|
text-shadow: 1px 1px 3px var(--pswp-icon-color-secondary);
|
|
opacity: 0.85;
|
|
}
|
|
|
|
.pswp--one-slide .pswp__custom-counter {
|
|
display: none;
|
|
}
|