UI: Do not use deprecated overflow: overlay (#3185)
This commit is contained in:
parent
d6b919e6ae
commit
a8d742aa18
@ -96,7 +96,6 @@
|
|||||||
max-height: calc(100 * var(--vh) - 3.75rem);
|
max-height: calc(100 * var(--vh) - 3.75rem);
|
||||||
|
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
@include overflow-y-overlay();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.extra-spacing {
|
.extra-spacing {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
left: 0.5rem;
|
left: 0.5rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: calc(var(--symbol-menu-width) + 0.25rem); // Reserve width for scrollbar
|
max-width: calc(var(--symbol-menu-width) + var(--scrollbar-width));
|
||||||
height: var(--symbol-menu-height);
|
height: var(--symbol-menu-height);
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
|
|
||||||
@ -16,10 +16,6 @@
|
|||||||
backdrop-filter: blur(10px);
|
backdrop-filter: blur(10px);
|
||||||
}
|
}
|
||||||
|
|
||||||
@supports (overflow: overlay) {
|
|
||||||
width: var(--symbol-menu-width);
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 26rem) {
|
@media (max-width: 26rem) {
|
||||||
left: 0.5rem !important;
|
left: 0.5rem !important;
|
||||||
right: 0.5rem !important;
|
right: 0.5rem !important;
|
||||||
|
|||||||
@ -1,5 +1,3 @@
|
|||||||
@import "../../../styles/mixins";
|
|
||||||
|
|
||||||
#Settings {
|
#Settings {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
@ -34,11 +32,9 @@
|
|||||||
|
|
||||||
.settings-content {
|
.settings-content {
|
||||||
border-top: 1px solid var(--color-borders);
|
border-top: 1px solid var(--color-borders);
|
||||||
background-color: var(--color-background-secondary);
|
|
||||||
height: calc(100% - var(--header-height));
|
height: calc(100% - var(--header-height));
|
||||||
|
|
||||||
overflow-y: auto;
|
overflow-y: scroll;
|
||||||
@include overflow-y-overlay();
|
|
||||||
|
|
||||||
&.no-border, &.two-fa, &.local-passcode, &.password-form {
|
&.no-border, &.two-fa, &.local-passcode, &.password-form {
|
||||||
border-top: none;
|
border-top: none;
|
||||||
@ -129,7 +125,7 @@
|
|||||||
background-color: var(--color-background);
|
background-color: var(--color-background);
|
||||||
padding: 1.5rem 1.5rem 1rem;
|
padding: 1.5rem 1.5rem 1rem;
|
||||||
box-shadow: inset 0 -0.0625rem 0 0 var(--color-background-secondary-accent);
|
box-shadow: inset 0 -0.0625rem 0 0 var(--color-background-secondary-accent);
|
||||||
margin-bottom: 0.625rem;
|
border-bottom: 0.625rem solid var(--color-background-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.settings-item {
|
.settings-item {
|
||||||
|
|||||||
@ -1,5 +1,3 @@
|
|||||||
@import "../../../styles/mixins";
|
|
||||||
|
|
||||||
.root, .item {
|
.root, .item {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -16,5 +14,4 @@
|
|||||||
|
|
||||||
.languages {
|
.languages {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
@include overflow-y-overlay();
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,3 @@
|
|||||||
@import "../../styles/mixins";
|
|
||||||
|
|
||||||
.root {
|
.root {
|
||||||
:global(.modal-content) {
|
:global(.modal-content) {
|
||||||
min-height: min(75vh, 32rem);
|
min-height: min(75vh, 32rem);
|
||||||
@ -26,5 +24,4 @@
|
|||||||
|
|
||||||
.languages {
|
.languages {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
@include overflow-y-overlay();
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,16 +1,13 @@
|
|||||||
@import "../../styles/mixins";
|
|
||||||
|
|
||||||
.MessageList {
|
.MessageList {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: 0.5rem;
|
||||||
|
|
||||||
overflow: scroll;
|
overflow-y: scroll;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: auto;
|
|
||||||
@include overflow-y-overlay();
|
|
||||||
|
|
||||||
transition: transform var(--layer-transition);
|
/* stylelint-disable-next-line plugin/no-low-performance-animation-properties */
|
||||||
|
transition: bottom 150ms ease-out, transform var(--layer-transition);
|
||||||
|
|
||||||
body.no-page-transitions & {
|
body.no-page-transitions & {
|
||||||
transition: none !important;
|
transition: none !important;
|
||||||
@ -30,9 +27,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* stylelint-disable-next-line plugin/no-low-performance-animation-properties */
|
|
||||||
transition: bottom 150ms ease-out, transform var(--layer-transition);
|
|
||||||
|
|
||||||
body.keyboard-visible & {
|
body.keyboard-visible & {
|
||||||
position: relative;
|
position: relative;
|
||||||
bottom: calc(0px - env(safe-area-inset-bottom));
|
bottom: calc(0px - env(safe-area-inset-bottom));
|
||||||
@ -379,10 +373,6 @@
|
|||||||
top: 0.625rem;
|
top: 0.625rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-animating {
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.is-animating .message-select-control {
|
&.is-animating .message-select-control {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
@ -464,14 +454,11 @@
|
|||||||
|
|
||||||
.Transition_slide-from > &,
|
.Transition_slide-from > &,
|
||||||
.Transition_slide-to > & {
|
.Transition_slide-to > & {
|
||||||
|
padding-inline-end: var(--scrollbar-width) !important;
|
||||||
|
|
||||||
|
scrollbar-width: none !important;
|
||||||
&::-webkit-scrollbar {
|
&::-webkit-scrollbar {
|
||||||
width: 0 !important;
|
width: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Styles for Firefox */
|
|
||||||
@supports (scrollbar-width: none) {
|
|
||||||
padding-right: 0.6875rem !important;
|
|
||||||
scrollbar-width: none !important;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,3 @@
|
|||||||
@import "../../../styles/mixins";
|
|
||||||
|
|
||||||
.Composer {
|
.Composer {
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
|
|
||||||
@ -666,7 +664,6 @@
|
|||||||
|
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
@include overflow-y-overlay();
|
|
||||||
|
|
||||||
box-shadow: 0 1px 2px var(--color-default-shadow);
|
box-shadow: 0 1px 2px var(--color-default-shadow);
|
||||||
|
|
||||||
|
|||||||
@ -3,11 +3,8 @@
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
|
||||||
|
overflow-x: scroll;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
overflow-x: auto;
|
|
||||||
@supports (overflow-x: overlay) {
|
|
||||||
overflow-x: overlay;
|
|
||||||
}
|
|
||||||
|
|
||||||
.emojiButton {
|
.emojiButton {
|
||||||
flex: 0 0 2rem;
|
flex: 0 0 2rem;
|
||||||
|
|||||||
@ -10,12 +10,12 @@
|
|||||||
height: calc(100% - 3rem);
|
height: calc(100% - 3rem);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
|
@include adapt-padding-to-scrollbar(0.75rem);
|
||||||
|
|
||||||
@media (max-width: 600px) {
|
@media (max-width: 600px) {
|
||||||
padding: 0.5rem 0.25rem;
|
padding: 0.5rem 0.25rem;
|
||||||
|
@include adapt-padding-to-scrollbar(0.25rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@include overflow-y-overlay();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&-header {
|
&-header {
|
||||||
|
|||||||
@ -2,10 +2,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
overflow-x: auto;
|
overflow-x: scroll;
|
||||||
@supports (overflow-x: overlay) {
|
|
||||||
overflow-x: overlay;
|
|
||||||
}
|
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
|
|
||||||
.EmojiButton {
|
.EmojiButton {
|
||||||
|
|||||||
@ -1,5 +1,3 @@
|
|||||||
@import "../../../styles/mixins";
|
|
||||||
|
|
||||||
.GifPicker {
|
.GifPicker {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(6, 1fr);
|
grid-template-columns: repeat(6, 1fr);
|
||||||
@ -14,8 +12,6 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
top: 0.1875rem;
|
top: 0.1875rem;
|
||||||
|
|
||||||
@include overflow-y-overlay();
|
|
||||||
|
|
||||||
.Loading, .picker-disabled {
|
.Loading, .picker-disabled {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|||||||
@ -11,13 +11,16 @@
|
|||||||
|
|
||||||
position: relative;
|
position: relative;
|
||||||
height: calc(100% - 3rem);
|
height: calc(100% - 3rem);
|
||||||
overflow-y: auto;
|
|
||||||
padding: 0.5rem 0.25rem;
|
|
||||||
|
|
||||||
@include overflow-y-overlay();
|
overflow-y: auto;
|
||||||
|
overflow-x: hidden;
|
||||||
|
|
||||||
|
padding: 0.5rem 0.25rem;
|
||||||
|
@include adapt-padding-to-scrollbar(0.25rem);
|
||||||
|
|
||||||
&_customEmoji {
|
&_customEmoji {
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
|
@include adapt-padding-to-scrollbar(0.75rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
:global(.bubble) {
|
:global(.bubble) {
|
||||||
|
|||||||
@ -141,7 +141,7 @@
|
|||||||
--offset-y: 4rem;
|
--offset-y: 4rem;
|
||||||
|
|
||||||
border-radius: 1.25rem;
|
border-radius: 1.25rem;
|
||||||
width: calc(var(--symbol-menu-width) + 0.25rem); // Reserve width for scrollbar
|
width: calc(var(--symbol-menu-width) + var(--scrollbar-width));
|
||||||
padding: 0;
|
padding: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
@ -155,10 +155,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
transition-duration: 200ms !important;
|
transition-duration: 200ms !important;
|
||||||
|
|
||||||
@supports (overflow: overlay) {
|
|
||||||
width: var(--symbol-menu-width);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.StickerButton.custom-emoji, .sticker-set-cover {
|
.StickerButton.custom-emoji, .sticker-set-cover {
|
||||||
|
|||||||
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
&_items {
|
&_items {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
overflow: overlay;
|
|
||||||
padding: 0.5rem 0;
|
padding: 0.5rem 0;
|
||||||
overscroll-behavior: contain;
|
overscroll-behavior: contain;
|
||||||
|
|
||||||
|
|||||||
@ -18,15 +18,11 @@
|
|||||||
backdrop-filter: blur(10px);
|
backdrop-filter: blur(10px);
|
||||||
}
|
}
|
||||||
|
|
||||||
width: calc(var(--symbol-menu-width) + 0.25rem); // Reserve width for scrollbar
|
width: calc(var(--symbol-menu-width) + var(--scrollbar-width));
|
||||||
height: var(--symbol-menu-height);
|
height: var(--symbol-menu-height);
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
transform-origin: 9rem 4.625rem !important;
|
transform-origin: 9rem 4.625rem !important;
|
||||||
|
|
||||||
@supports (overflow: overlay) {
|
|
||||||
width: var(--symbol-menu-width);
|
|
||||||
}
|
|
||||||
|
|
||||||
&:global(.bubble) {
|
&:global(.bubble) {
|
||||||
transform: scale(0.8) !important;
|
transform: scale(0.8) !important;
|
||||||
transition: opacity 150ms cubic-bezier(0.2, 0, 0.2, 1), transform 150ms cubic-bezier(0.2, 0, 0.2, 1) !important;
|
transition: opacity 150ms cubic-bezier(0.2, 0, 0.2, 1), transform 150ms cubic-bezier(0.2, 0, 0.2, 1) !important;
|
||||||
|
|||||||
@ -1,5 +1,3 @@
|
|||||||
@import "../../styles/mixins";
|
|
||||||
|
|
||||||
.Profile {
|
.Profile {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -7,7 +5,6 @@
|
|||||||
|
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
@include overflow-y-overlay();
|
|
||||||
|
|
||||||
> .profile-info > .ChatInfo {
|
> .profile-info > .ChatInfo {
|
||||||
grid-area: chat_info;
|
grid-area: chat_info;
|
||||||
|
|||||||
@ -2,13 +2,9 @@
|
|||||||
container: stickers / inline-size;
|
container: stickers / inline-size;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 0 0.5rem;
|
padding: 0 0.5rem;
|
||||||
overflow-y: auto;
|
overflow-y: scroll;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
|
||||||
@supports (overflow-y: overlay) {
|
|
||||||
overflow-y: overlay;
|
|
||||||
}
|
|
||||||
|
|
||||||
.helper-text {
|
.helper-text {
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
margin-bottom: 0.125rem;
|
margin-bottom: 0.125rem;
|
||||||
@ -77,7 +73,7 @@
|
|||||||
|
|
||||||
.StickerButton {
|
.StickerButton {
|
||||||
margin: 0.125rem;
|
margin: 0.125rem;
|
||||||
|
|
||||||
@media (max-width: 380px) {
|
@media (max-width: 380px) {
|
||||||
&:last-child {
|
&:last-child {
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
.Management {
|
.Management {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: var(--color-background-secondary);
|
|
||||||
|
|
||||||
& > .custom-scroll {
|
& > .custom-scroll {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@ -18,7 +17,7 @@
|
|||||||
padding: 1rem 1.5rem;
|
padding: 1rem 1.5rem;
|
||||||
background-color: var(--color-background);
|
background-color: var(--color-background);
|
||||||
box-shadow: inset 0 -0.0625rem 0 0 var(--color-background-secondary-accent);
|
box-shadow: inset 0 -0.0625rem 0 0 var(--color-background-secondary-accent);
|
||||||
margin-bottom: 0.625rem;
|
border-bottom: 0.625rem solid var(--color-background-secondary);
|
||||||
|
|
||||||
&.wide {
|
&.wide {
|
||||||
padding: 1.5rem;
|
padding: 1.5rem;
|
||||||
|
|||||||
@ -1,5 +1,3 @@
|
|||||||
@import "./mixins";
|
|
||||||
|
|
||||||
// Common styles for all media-type components across the app.
|
// Common styles for all media-type components across the app.
|
||||||
.media-inner {
|
.media-inner {
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -97,9 +95,10 @@
|
|||||||
background: var(--color-background);
|
background: var(--color-background);
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 0.5rem 0.4375rem 0.5rem 0.4375rem;
|
padding: 0.5rem 0.4375rem 0.5rem 0.4375rem;
|
||||||
|
@include adapt-padding-to-scrollbar(0.4375rem);
|
||||||
|
|
||||||
overflow-y: auto;
|
overflow-x: hidden;
|
||||||
@include overflow-y-overlay();
|
overflow-y: scroll;
|
||||||
|
|
||||||
&.forum-panel-open {
|
&.forum-panel-open {
|
||||||
.info {
|
.info {
|
||||||
|
|||||||
@ -5,13 +5,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin overflow-y-overlay() {
|
@mixin adapt-padding-to-scrollbar($padding) {
|
||||||
@supports (overflow-y: overlay) {
|
padding-inline-end: calc($padding - var(--scrollbar-width));
|
||||||
overflow-y: overlay;
|
|
||||||
|
|
||||||
//Workaround for Android <= 9
|
|
||||||
overflow-x: hidden;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin reset-range() {
|
@mixin reset-range() {
|
||||||
|
|||||||
@ -202,6 +202,8 @@ $color-message-reaction-own-hover: #b5e0a4;
|
|||||||
--symbol-menu-height: 22.375rem;
|
--symbol-menu-height: 22.375rem;
|
||||||
--symbol-menu-footer-height: 3rem;
|
--symbol-menu-footer-height: 3rem;
|
||||||
|
|
||||||
|
--scrollbar-width: 0;
|
||||||
|
|
||||||
@media (min-width: 1276px) and (max-width: 1920px) {
|
@media (min-width: 1276px) and (max-width: 1920px) {
|
||||||
--right-column-width: 25vw;
|
--right-column-width: 25vw;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -123,6 +123,19 @@ export const IS_TRANSLATION_SUPPORTED = Boolean(Intl.DisplayNames);
|
|||||||
|
|
||||||
export const MESSAGE_LIST_SENSITIVE_AREA = 750;
|
export const MESSAGE_LIST_SENSITIVE_AREA = 750;
|
||||||
|
|
||||||
|
export const SCROLLBAR_WIDTH = (() => {
|
||||||
|
const el = document.createElement('div');
|
||||||
|
el.style.cssText = 'overflow:scroll; visibility:hidden; position:absolute;';
|
||||||
|
el.classList.add('custom-scroll');
|
||||||
|
document.body.appendChild(el);
|
||||||
|
const width = el.offsetWidth - el.clientWidth;
|
||||||
|
el.remove();
|
||||||
|
|
||||||
|
document.documentElement.style.setProperty('--scrollbar-width', `${width}px`);
|
||||||
|
|
||||||
|
return width;
|
||||||
|
})();
|
||||||
|
|
||||||
export const MAX_BUFFER_SIZE = (IS_MOBILE ? 512 : 2000) * 1024 ** 2; // 512 OR 2000 MB
|
export const MAX_BUFFER_SIZE = (IS_MOBILE ? 512 : 2000) * 1024 ** 2; // 512 OR 2000 MB
|
||||||
|
|
||||||
function isLastEmojiVersionSupported() {
|
function isLastEmojiVersionSupported() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user