Fix lag caused by poorly written CSS rules (#3198)

Co-authored-by: Nuckyz <61953774+Nuckyz@users.noreply.github.com>
This commit is contained in:
v 2025-02-02 01:37:54 +01:00 committed by GitHub
parent 4f5ebec4bb
commit 6cccb54ffc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
43 changed files with 270 additions and 330 deletions

View file

@ -76,7 +76,7 @@ export function TranslateModal({ rootProps }: { rootProps: ModalProps; }) {
return (
<ModalRoot {...rootProps}>
<ModalHeader className={cl("modal-header")}>
<Forms.FormTitle tag="h2">
<Forms.FormTitle tag="h2" className={cl("modal-title")}>
Translate
</Forms.FormTitle>
<ModalCloseButton onClick={rootProps.onClose} />

View file

@ -55,7 +55,7 @@ export function TranslationAccessory({ message }: { message: Message; }) {
return (
<span className={cl("accessory")}>
<TranslateIcon width={16} height={16} />
<TranslateIcon width={16} height={16} className={cl("accessory-icon")} />
{Parser.parse(translation.text)}
{" "}
(translated from {translation.sourceLanguage} - <Dismiss onDismiss={() => setTranslation(undefined)} />)

View file

@ -6,7 +6,7 @@
place-content: center space-between;
}
.vc-trans-modal-header h1 {
.vc-trans-modal-title {
margin: 0;
}
@ -17,7 +17,7 @@
font-weight: 400;
}
.vc-trans-accessory svg {
.vc-trans-accessory-icon {
margin-right: 0.25em;
}