Various fixes for Waterfox Classic (#1974)

This commit is contained in:
Alexander Zinchuk 2022-08-05 19:23:09 +02:00
parent 6445847af0
commit e57bf3518d
15 changed files with 168 additions and 11 deletions

View File

@ -131,7 +131,7 @@ function replaceEmojis(textParts: TextPart[], size: 'big' | 'small', type: 'jsx'
emojiResult.push( emojiResult.push(
// For preventing extra spaces in html // For preventing extra spaces in html
// eslint-disable-next-line max-len // eslint-disable-next-line max-len
`<img draggable="false" class="${className}" src="./img-apple-${size === 'big' ? '160' : '64'}/${code}.png" alt="${emoji}" />`, `<img draggable="false" contenteditable="false" class="${className}" src="./img-apple-${size === 'big' ? '160' : '64'}/${code}.png" alt="${emoji}" />`,
); );
} }

View File

@ -118,6 +118,12 @@
transform: translate3d(-20vw, 0, 0); transform: translate3d(-20vw, 0, 0);
left: env(safe-area-inset-left) !important; left: env(safe-area-inset-left) !important;
width: calc(100vw - env(safe-area-inset-left)) !important; width: calc(100vw - env(safe-area-inset-left)) !important;
// Target: Old Firefox (Waterfox Classic)
@supports not (left: env(safe-area-inset-left)) {
left: 0 !important;
width: 100vw !important;
}
} }
} }

View File

@ -39,8 +39,14 @@
} }
.frame { .frame {
aspect-ratio: 1/1; aspect-ratio: 1;
@supports not (aspect-ratio: 1) {
height: 0;
padding-bottom: 100%;
}
} }
.slide { .slide {
width: 100%; width: 100%;
flex: none; flex: none;
@ -83,10 +89,15 @@
margin: 0 -1rem; margin: 0 -1rem;
margin-top: -1rem; margin-top: -1rem;
background: var(--premium-feature-background); background: var(--premium-feature-background);
aspect-ratio: 1/1; aspect-ratio: 1;
width: 100%; width: 100%;
border-top-right-radius: var(--border-radius-default); border-top-right-radius: var(--border-radius-default);
border-top-left-radius: var(--border-radius-default); border-top-left-radius: var(--border-radius-default);
@supports not (aspect-ratio: 1) {
height: 0;
padding-bottom: 100%;
}
} }
.title { .title {

View File

@ -1,9 +1,14 @@
.root { .root {
display: flex; display: flex;
justify-content: center; justify-content: center;
aspect-ratio: 1; aspect-ratio: 1;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
@supports not (aspect-ratio: 1) {
height: 0;
padding-bottom: 100%;
}
} }
.wrapper { .wrapper {
@ -26,6 +31,10 @@ display: flex;
) )
rotateY(calc(var(--scroll-progress-converted) * 40deg)); rotateY(calc(var(--scroll-progress-converted) * 40deg));
opacity: calc(1 - var(--abs-scroll-progress-converted) * 0.4); opacity: calc(1 - var(--abs-scroll-progress-converted) * 0.4);
@supports not (aspect-ratio: 1) {
transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, -0.005, 0, -342.2, 0, 1)
}
} }
.down { .down {
@ -54,8 +63,10 @@ display: flex;
border-radius: 0 0 10% 10%; border-radius: 0 0 10% 10%;
} }
.down .video { @supports (aspect-ratio: 1) {
top: 0; .down .video {
bottom: initial; top: 0;
border-radius: 10% 10% 0 0; bottom: initial;
border-radius: 10% 10% 0 0;
}
} }

View File

@ -88,6 +88,15 @@
margin-right: 1.5rem; margin-right: 1.5rem;
} }
} }
// Target: Old Firefox (Waterfox Classic)
@supports not (padding: 0.5rem max(1.25rem, env(safe-area-inset-left))) {
padding: 0.5rem 1.25rem;
@media (max-width: 600px) {
padding: 0.5rem;
}
}
} }
& > .Transition, & > .Transition,
@ -144,6 +153,16 @@
right: env(safe-area-inset-right); right: env(safe-area-inset-right);
transform: scaleX(-1); transform: scaleX(-1);
} }
// Target: Old Firefox (Waterfox Classic)
@supports not (left: env(safe-area-inset-left)) {
left: 0;
&[dir="rtl"] {
left: auto;
right: 0;
}
}
} }
&.next { &.next {
@ -156,6 +175,16 @@
left: env(safe-area-inset-left); left: env(safe-area-inset-left);
transform: scaleX(-1); transform: scaleX(-1);
} }
// Target: Old Firefox (Waterfox Classic)
@supports not (right: env(safe-area-inset-right)) {
right: 0;
&[dir="rtl"] {
right: auto;
left: 0;
}
}
} }
&.inline { &.inline {

View File

@ -29,6 +29,18 @@
} }
} }
// Target: Old Firefox (Waterfox Classic)
@supports not (right: max(1rem, env(safe-area-inset-right))) {
right: 1rem;
@media (max-width: 600px) {
right: 0.5rem;
:global(body:not(.keyboard-visible)) & {
bottom: 4.5rem;
}
}
}
&.revealed { &.revealed {
transform: translateY(0); transform: translateY(0);
opacity: 1; opacity: 1;

View File

@ -37,6 +37,11 @@
position: relative; position: relative;
bottom: calc(0px - env(safe-area-inset-bottom)); bottom: calc(0px - env(safe-area-inset-bottom));
// Target: Old Firefox (Waterfox Classic)
@supports not (bottom: calc(0px - env(safe-area-inset-bottom))) {
bottom: 0;
}
body.keyboard-visible.animation-level-0 & { body.keyboard-visible.animation-level-0 & {
transition: none !important; transition: none !important;
} }

View File

@ -8,6 +8,11 @@
justify-content: center; justify-content: center;
margin: 0; margin: 0;
// Target: Old Firefox (Waterfox Classic)
@supports not (bottom: calc(0.5rem + env(safe-area-inset-bottom))) {
bottom: 0.5rem;
}
.mask-image-disabled &::before { .mask-image-disabled &::before {
left: auto !important; left: auto !important;
right: auto !important; right: auto !important;

View File

@ -189,6 +189,11 @@
body.keyboard-visible & { body.keyboard-visible & {
top: env(safe-area-inset-bottom); top: env(safe-area-inset-bottom);
} }
// Target: Old Firefox (Waterfox Classic)
@supports not (padding-bottom: env(safe-area-inset-bottom)) {
padding-bottom: 0;
}
} }
&::before { &::before {
@ -316,7 +321,12 @@
} }
@media (max-width: 600px) { @media (max-width: 600px) {
padding-bottom: calc(0.75rem + env(safe-area-inset-bottom)); padding-bottom: 0.75rem;
// Target: Old Firefox (Waterfox Classic)
@supports (padding-bottom: calc(0.75rem + env(safe-area-inset-bottom))) {
padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
}
} }
.mask-image-disabled &::before { .mask-image-disabled &::before {

View File

@ -18,6 +18,12 @@
padding-right: max(0.5rem, env(safe-area-inset-right)); padding-right: max(0.5rem, env(safe-area-inset-right));
background: var(--color-background); background: var(--color-background);
// Target: Old Firefox (Waterfox Classic)
@supports not (padding-left: max(0.75rem, env(safe-area-inset-left))) {
padding-left: 0.75rem;
padding-right: 0.5rem;
}
&::before { &::before {
content: ""; content: "";
display: block; display: block;
@ -94,6 +100,17 @@
padding-right: max(0.5rem, env(safe-area-inset-right)); padding-right: max(0.5rem, env(safe-area-inset-right));
} }
// Target: Old Firefox (Waterfox Classic)
@supports not (padding-left: max(1.5rem, env(safe-area-inset-left))) {
padding-left: 1.5rem;
padding-right: 0.8125rem;
@media (max-width: 600px) {
padding-left: 0.5rem;
padding-right: 0.5rem;
}
}
.Transition { .Transition {
width: 100%; width: 100%;
// https://dfmcphee.com/flex-items-and-min-width-0/ // https://dfmcphee.com/flex-items-and-min-width-0/

View File

@ -15,6 +15,12 @@
margin-left: 0.25rem; margin-left: 0.25rem;
flex: 1; flex: 1;
} }
// Target: Old Firefox (Waterfox Classic)
@supports not (padding-left: max(0.25rem, env(safe-area-inset-left))) {
padding-left: 0.25rem;
padding-right: 0.5rem;
}
} }
#MobileSearch > .footer { #MobileSearch > .footer {
@ -35,6 +41,17 @@
height: calc(3.5rem + env(safe-area-inset-bottom)); height: calc(3.5rem + env(safe-area-inset-bottom));
} }
// Target: Old Firefox (Waterfox Classic)
@supports not (padding-left: max(1rem, env(safe-area-inset-left))) {
padding-left: 1rem;
padding-right: 0.5rem;
body:not(.keyboard-visible) & {
padding-bottom: 0;
height: 3.5rem;
}
}
> .counter { > .counter {
flex: 1; flex: 1;
color: var(--color-text-secondary); color: var(--color-text-secondary);

View File

@ -8,6 +8,11 @@
padding-right: 2rem; padding-right: 2rem;
bottom: env(safe-area-inset-bottom); bottom: env(safe-area-inset-bottom);
// Target: Old Firefox (Waterfox Classic)
@supports not (bottom: env(safe-area-inset-bottom)) {
bottom: 0;
}
@media (max-width: 600px) { @media (max-width: 600px) {
padding-right: 1rem; padding-right: 1rem;
} }

View File

@ -27,6 +27,14 @@
} }
} }
// Target: Old Firefox (Waterfox Classic)
@supports not (padding-right: env(safe-area-inset-right)) {
padding-right: 0;
padding-bottom: 0;
padding-left: 0;
transform: translate3d(0, calc(var(--symbol-menu-height) + var(--symbol-menu-footer-height)), 0);
}
body.animation-level-0 & { body.animation-level-0 & {
transition: none; transition: none;
} }
@ -39,6 +47,11 @@
&-main { &-main {
height: var(--symbol-menu-height); height: var(--symbol-menu-height);
max-height: calc(100vh - var(--symbol-menu-footer-height) - env(safe-area-inset-bottom)); max-height: calc(100vh - var(--symbol-menu-footer-height) - env(safe-area-inset-bottom));
// Target: Old Firefox (Waterfox Classic)
@supports not (max-height: calc(100vh - var(--symbol-menu-footer-height) - env(safe-area-inset-bottom))) {
max-height: calc(100vh - var(--symbol-menu-footer-height));
}
} }
&-footer { &-footer {
@ -133,8 +146,14 @@
.symbol-close-button { .symbol-close-button {
display: none; display: none;
position: absolute; position: absolute;
right: max(calc(0.25rem), env(safe-area-inset-right)); right: max(0.25rem, env(safe-area-inset-right));
top: max(calc(0.25rem), env(safe-area-inset-top)); top: max(0.25rem, env(safe-area-inset-top));
// Target: Old Firefox (Waterfox Classic)
@supports not (right: max(0.25rem, env(safe-area-inset-right))) {
right: 0.25rem;
top: 0.25rem;
}
} }
@media (orientation: landscape) { @media (orientation: landscape) {

View File

@ -30,5 +30,10 @@
.skeleton { .skeleton {
aspect-ratio: 16/9; aspect-ratio: 16/9;
@supports not (aspect-ratio: 16/9) {
height: 0 !important;
padding-bottom: 56.25%;
}
} }
} }

View File

@ -12,6 +12,11 @@
transition: transform var(--layer-transition); transition: transform var(--layer-transition);
// Target: Old Firefox (Waterfox Classic)
@supports not (padding-right: env(safe-area-inset-right)) {
padding-right: 0;
}
body.animation-level-0 & { body.animation-level-0 & {
transition: none; transition: none;
} }