Various CSS fixes (#4335)

This commit is contained in:
Alexander Zinchuk 2024-03-08 12:48:36 +01:00
parent fc2baf636e
commit 207e73a18e
4 changed files with 23 additions and 20 deletions

View File

@ -267,9 +267,9 @@ const StickerSet: FC<OwnProps> = ({
> >
{!shouldHideHeader && ( {!shouldHideHeader && (
<div className="symbol-set-header"> <div className="symbol-set-header">
<p className={buildClassName('symbol-set-name', withAddSetButton && 'symbol-set-name-external')}> <p className={buildClassName('symbol-set-title', withAddSetButton && 'symbol-set-title-external')}>
{isLocked && <i className="symbol-set-locked-icon icon icon-lock-badge" />} {isLocked && <i className="symbol-set-locked-icon icon icon-lock-badge" />}
{stickerSet.title} <span className="symbol-set-name">{stickerSet.title}</span>
{(isChatEmojiSet || isChatStickerSet) && ( {(isChatEmojiSet || isChatStickerSet) && (
<span className="symbol-set-chat">{lang(isChatEmojiSet ? 'GroupEmoji' : 'GroupStickers')}</span> <span className="symbol-set-chat">{lang(isChatEmojiSet ? 'GroupEmoji' : 'GroupStickers')}</span>
)} )}

View File

@ -187,51 +187,53 @@
color: rgba(var(--color-text-secondary-rgb), 0.75); color: rgba(var(--color-text-secondary-rgb), 0.75);
} }
&-name { &-title {
display: flex;
gap: 0.5rem;
align-items: center;
font-size: 1rem; font-size: 1rem;
line-height: 1.6875rem; line-height: 1.6875rem;
font-weight: 500; font-weight: 500;
margin: 0; margin: 0;
padding: 0 0.25rem 0.125rem; padding: 0 0.25rem 0.125rem;
overflow: hidden; overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
text-align: center;
unicode-bidi: plaintext; unicode-bidi: plaintext;
z-index: 1; z-index: 1;
&-external { &-external {
color: var(--color-text); color: var(--color-text);
text-align: start; text-align: start;
margin-right: 0.5rem;
} }
} }
&-name {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
text-align: center;
}
&-amount { &-amount {
display: block;
font-size: 0.875rem; font-size: 0.875rem;
font-weight: normal; font-weight: normal;
text-align: left; text-align: left;
line-height: 1.125rem;
margin-top: -0.125rem;
margin-bottom: 0.125rem;
color: rgba(var(--color-text-secondary-rgb), 0.75); color: rgba(var(--color-text-secondary-rgb), 0.75);
unicode-bidi: plaintext; unicode-bidi: plaintext;
white-space: nowrap;
.symbol-set-locked & {
padding-left: 1.25rem;
}
} }
&-chat { &-chat {
background-color: var(--color-text-secondary); background-color: var(--color-text-secondary);
color: var(--color-background); color: var(--color-background);
border-radius: 0.5rem; border-radius: 1rem;
padding-inline: 0.25rem; padding-inline: 0.25rem;
margin-inline-start: 0.5rem; white-space: nowrap;
} }
&-locked-icon { &-add-button {
margin-right: 0.25rem; margin-bottom: 0.25rem;
} }
&-remove { &-remove {

View File

@ -41,6 +41,7 @@
.section { .section {
margin-bottom: 1rem; margin-bottom: 1rem;
max-width: 100%;
} }
.description { .description {

View File

@ -27,8 +27,8 @@ import renderText from '../../common/helpers/renderText';
import useLang from '../../../hooks/useLang'; import useLang from '../../../hooks/useLang';
import useLastCallback from '../../../hooks/useLastCallback'; import useLastCallback from '../../../hooks/useLastCallback';
import AnimatedIcon from '../../common/AnimatedIcon';
import AnimatedIconFromSticker from '../../common/AnimatedIconFromSticker'; import AnimatedIconFromSticker from '../../common/AnimatedIconFromSticker';
import AnimatedIconWithPreview from '../../common/AnimatedIconWithPreview';
import PickerSelectedItem from '../../common/PickerSelectedItem'; import PickerSelectedItem from '../../common/PickerSelectedItem';
import Button from '../../ui/Button'; import Button from '../../ui/Button';
import ConfirmDialog from '../../ui/ConfirmDialog'; import ConfirmDialog from '../../ui/ConfirmDialog';
@ -304,7 +304,7 @@ const Giveaway = ({
<div className={styles.root}> <div className={styles.root}>
<div className={buildClassName(styles.sticker, isResults && styles.resultSticker)}> <div className={buildClassName(styles.sticker, isResults && styles.resultSticker)}>
{isResults ? ( {isResults ? (
<AnimatedIcon <AnimatedIconWithPreview
size={RESULT_STICKER_SIZE} size={RESULT_STICKER_SIZE}
tgsUrl={LOCAL_TGS_URLS.PartyPopper} tgsUrl={LOCAL_TGS_URLS.PartyPopper}
nonInteractive nonInteractive