Disable unneeded selection; Dark theme color fixes (#1483)
This commit is contained in:
parent
c2f3c79923
commit
1abb31e3ee
@ -11,6 +11,7 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
display: flex;
|
display: flex;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
user-select: none;
|
||||||
|
|
||||||
img:not(.emoji) {
|
img:not(.emoji) {
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
|||||||
@ -194,6 +194,7 @@
|
|||||||
.ActionMessage,
|
.ActionMessage,
|
||||||
.empty {
|
.empty {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
user-select: none;
|
||||||
|
|
||||||
> span {
|
> span {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|||||||
@ -18,6 +18,7 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background-color .15s, color .15s;
|
transition: background-color .15s, color .15s;
|
||||||
|
user-select: none;
|
||||||
|
|
||||||
body.animation-level-0 & {
|
body.animation-level-0 & {
|
||||||
transition: none !important;
|
transition: none !important;
|
||||||
|
|||||||
@ -11,6 +11,7 @@
|
|||||||
color: white;
|
color: white;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
user-select: none;
|
||||||
|
|
||||||
.message-time,
|
.message-time,
|
||||||
.message-signature,
|
.message-signature,
|
||||||
|
|||||||
@ -501,6 +501,7 @@
|
|||||||
padding: 0 .375rem;
|
padding: 0 .375rem;
|
||||||
border-radius: .75rem;
|
border-radius: .75rem;
|
||||||
line-height: 1.125rem;
|
line-height: 1.125rem;
|
||||||
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.message-media-duration .icon-muted-chat {
|
.message-media-duration .icon-muted-chat {
|
||||||
|
|||||||
@ -63,7 +63,6 @@ $color-user-8: #faa774;
|
|||||||
--color-background-secondary-accent: #E4E4E5;
|
--color-background-secondary-accent: #E4E4E5;
|
||||||
--color-background-own: #{$color-light-green};
|
--color-background-own: #{$color-light-green};
|
||||||
--color-background-own-selected: #{darken($color-light-green, 10%)};
|
--color-background-own-selected: #{darken($color-light-green, 10%)};
|
||||||
--color-background-own-rgb: #{toRGB($color-light-green)};
|
|
||||||
--color-text: #{$color-black};
|
--color-text: #{$color-black};
|
||||||
--color-text-lighter: #{$color-dark-gray};
|
--color-text-lighter: #{$color-dark-gray};
|
||||||
--color-text-secondary: #{$color-text-secondary};
|
--color-text-secondary: #{$color-text-secondary};
|
||||||
@ -86,7 +85,6 @@ $color-user-8: #faa774;
|
|||||||
--color-composer-button: #{$color-text-secondary}CC;
|
--color-composer-button: #{$color-text-secondary}CC;
|
||||||
|
|
||||||
--color-primary: #{$color-primary};
|
--color-primary: #{$color-primary};
|
||||||
--color-primary-rgb: #{toRGB($color-primary)};
|
|
||||||
--color-primary-shade: #{mix($color-primary, $color-black, 92%)};
|
--color-primary-shade: #{mix($color-primary, $color-black, 92%)};
|
||||||
--color-primary-shade-darker: #{mix($color-primary, $color-black, 84%)};
|
--color-primary-shade-darker: #{mix($color-primary, $color-black, 84%)};
|
||||||
--color-primary-shade-rgb: #{toRGB(mix($color-primary, $color-black, 92%))};
|
--color-primary-shade-rgb: #{toRGB(mix($color-primary, $color-black, 92%))};
|
||||||
|
|||||||
@ -16,6 +16,10 @@ let isInitialized = false;
|
|||||||
const HEX_COLOR_REGEX = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;
|
const HEX_COLOR_REGEX = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;
|
||||||
const DURATION_MS = 200;
|
const DURATION_MS = 200;
|
||||||
const ENABLE_ANIMATION_DELAY_MS = 500;
|
const ENABLE_ANIMATION_DELAY_MS = 500;
|
||||||
|
const RGB_VARIABLES = new Set([
|
||||||
|
'--color-primary-shade',
|
||||||
|
'--color-text-secondary',
|
||||||
|
]);
|
||||||
|
|
||||||
const lerp = (start: number, end: number, interpolationRatio: number) => {
|
const lerp = (start: number, end: number, interpolationRatio: number) => {
|
||||||
return (1 - interpolationRatio) * start + interpolationRatio * end;
|
return (1 - interpolationRatio) * start + interpolationRatio * end;
|
||||||
@ -89,5 +93,9 @@ function applyColorAnimationStep(startIndex: number, endIndex: number, interpola
|
|||||||
document.documentElement.style.setProperty(property, a !== undefined
|
document.documentElement.style.setProperty(property, a !== undefined
|
||||||
? `rgba(${r},${g},${b},${a / 255})`
|
? `rgba(${r},${g},${b},${a / 255})`
|
||||||
: `rgb(${r},${g},${b})`);
|
: `rgb(${r},${g},${b})`);
|
||||||
|
|
||||||
|
if (RGB_VARIABLES.has(property)) {
|
||||||
|
document.documentElement.style.setProperty(`${property}-rgb`, `${r},${g},${b}`);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user