Message: Fix paddings (#3538)
This commit is contained in:
parent
ca9457d4a5
commit
d92f581999
@ -3,6 +3,18 @@
|
|||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
&.inline {
|
||||||
|
margin-top: calc(0.5rem - 0.3125rem);
|
||||||
|
|
||||||
|
.message-content.no-text & {
|
||||||
|
margin-bottom: calc(0.8125rem - 0.375rem);
|
||||||
|
|
||||||
|
&[dir=rtl] {
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.media-loading {
|
.media-loading {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
@ -406,10 +418,3 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.has-replies .Audio {
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
[dir="rtl"] {
|
|
||||||
margin-bottom: 1.625rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@ -291,6 +291,7 @@ const Audio: FC<OwnProps> = ({
|
|||||||
const fullClassName = buildClassName(
|
const fullClassName = buildClassName(
|
||||||
'Audio',
|
'Audio',
|
||||||
className,
|
className,
|
||||||
|
origin === AudioOrigin.Inline && 'inline',
|
||||||
isOwn && origin === AudioOrigin.Inline && 'own',
|
isOwn && origin === AudioOrigin.Inline && 'own',
|
||||||
(origin === AudioOrigin.Search || origin === AudioOrigin.SharedMedia) && 'bigger',
|
(origin === AudioOrigin.Search || origin === AudioOrigin.SharedMedia) && 'bigger',
|
||||||
isSelected && 'audio-is-selected',
|
isSelected && 'audio-is-selected',
|
||||||
|
|||||||
@ -132,10 +132,6 @@
|
|||||||
margin-bottom: -0.5rem;
|
margin-bottom: -0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.message-content.audio & {
|
|
||||||
margin-bottom: -0.8125rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.message-content.document &,
|
.message-content.document &,
|
||||||
.message-content.audio &,
|
.message-content.audio &,
|
||||||
.message-content.voice &,
|
.message-content.voice &,
|
||||||
|
|||||||
@ -417,16 +417,24 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.document {
|
&.document {
|
||||||
padding: 0.5rem !important;
|
|
||||||
|
|
||||||
.File {
|
.File {
|
||||||
|
margin-top: calc(0.5rem - 0.3125rem);
|
||||||
|
|
||||||
|
.message-content.no-text & {
|
||||||
|
margin-bottom: calc(0.5rem - 0.375rem);
|
||||||
|
}
|
||||||
|
|
||||||
.theme-dark & {
|
.theme-dark & {
|
||||||
--color-primary: var(--color-selection-highlight);
|
--color-primary: var(--color-selection-highlight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.File + .text-content {
|
&.voice,
|
||||||
margin-top: 0.3125rem;
|
&.audio,
|
||||||
|
&.document {
|
||||||
|
.text-content {
|
||||||
|
margin-top: 0.25rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -439,31 +447,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.voice {
|
|
||||||
padding: 0.5rem !important;
|
|
||||||
|
|
||||||
.Voice + .text-content {
|
|
||||||
margin-top: 0.5rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.audio {
|
&.audio {
|
||||||
min-width: 20rem;
|
min-width: 20rem;
|
||||||
padding: 0.5rem 0.5rem 0.8125rem !important;
|
|
||||||
|
|
||||||
@media (max-width: 600px) {
|
@media (max-width: 600px) {
|
||||||
min-width: 17rem;
|
min-width: 17rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Audio + .text-content {
|
|
||||||
margin-top: 0.25rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:not(.has-replies) {
|
|
||||||
.Audio + .text-content {
|
|
||||||
margin-bottom: -0.4375rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&:not(.custom-shape) .emoji:not(.custom-emoji) {
|
&:not(.custom-shape) .emoji:not(.custom-emoji) {
|
||||||
|
|||||||
@ -48,6 +48,8 @@ export function buildContentClassName(
|
|||||||
}
|
}
|
||||||
} else if (hasText) {
|
} else if (hasText) {
|
||||||
classNames.push('text');
|
classNames.push('text');
|
||||||
|
} else {
|
||||||
|
classNames.push('no-text');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasActionButton) {
|
if (hasActionButton) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user