Ads: Fix text color and media width (#5062)

This commit is contained in:
zubiden 2024-10-20 18:54:02 +02:00 committed by Alexander Zinchuk
parent e8302b134e
commit 45057a4688
4 changed files with 7 additions and 10 deletions

View File

@ -400,7 +400,6 @@ const AttachmentModal: FC<OwnProps & StateProps> = ({
return; return;
} }
// Get inner width, without padding
const { width, height } = svg.getBoundingClientRect(); const { width, height } = svg.getBoundingClientRect();
svg.viewBox.baseVal.width = width; svg.viewBox.baseVal.width = width;
svg.viewBox.baseVal.height = height; svg.viewBox.baseVal.height = height;

View File

@ -40,7 +40,6 @@ const DropTarget: FC<OwnProps> = ({ isQuick, isGeneric, onFileSelect }) => {
return; return;
} }
// Get inner width, without padding
const { width, height } = svg.getBoundingClientRect(); const { width, height } = svg.getBoundingClientRect();
svg.viewBox.baseVal.width = width; svg.viewBox.baseVal.width = width;
svg.viewBox.baseVal.height = height; svg.viewBox.baseVal.height = height;

View File

@ -35,7 +35,7 @@
text-transform: capitalize; text-transform: capitalize;
} }
.message-peer { .content-inner, .message-peer {
color: var(--color-text); color: var(--color-text);
} }
@ -46,9 +46,9 @@
.message-content { .message-content {
padding: 0.5rem; padding: 0.5rem;
--border-top-left-radius: var(--border-radius-messages-small); --border-top-left-radius: var(--border-radius-messages);
--border-top-right-radius: var(--border-radius-messages-small); --border-top-right-radius: var(--border-radius-messages);
--border-bottom-right-radius: var(--border-radius-messages-small); --border-bottom-right-radius: var(--border-radius-messages);
@media (max-width: 600px) { @media (max-width: 600px) {
max-width: min(29rem, calc(100vw - 4.5rem)) !important; max-width: min(29rem, calc(100vw - 4.5rem)) !important;
@ -74,7 +74,6 @@
padding-inline-start: 0.625rem; padding-inline-start: 0.625rem;
font-size: calc(var(--message-text-size, 1rem) - 0.125rem); font-size: calc(var(--message-text-size, 1rem) - 0.125rem);
background-color: var(--accent-background-color); background-color: var(--accent-background-color);
border-radius: 0.375rem;
overflow: hidden; overflow: hidden;
&::before { &::before {
@ -128,10 +127,10 @@
transition: 150ms filter ease-in; transition: 150ms filter ease-in;
background: var(--accent-background-active-color); background: var(--accent-background-active-color);
cursor: var(--custom-cursor, pointer); cursor: var(--custom-cursor, pointer);
filter: opacity(0.8); filter: brightness(1);
&:hover { &:hover {
filter: opacity(1); filter: brightness(1.1);
} }
} }

View File

@ -262,13 +262,13 @@ const SponsoredMessage: FC<OwnProps & StateProps> = ({
return ( return (
<div <div
ref={ref} ref={ref}
style={style}
key="sponsored-message" key="sponsored-message"
className="SponsoredMessage Message open sponsored-media-preview" className="SponsoredMessage Message open sponsored-media-preview"
> >
<div <div
className="message-content media has-shadow has-solid-background has-appendix" className="message-content media has-shadow has-solid-background has-appendix"
dir="auto" dir="auto"
style={style}
onMouseDown={handleMouseDown} onMouseDown={handleMouseDown}
onContextMenu={handleContextMenu} onContextMenu={handleContextMenu}
> >