Skip to content

Commit

Permalink
Fix #488 (#494)
Browse files Browse the repository at this point in the history
Attempted to fix #488 

Edited padding for `form-control` class in `bootstrap.css` to prevent
the copy and clear buttons from being on top of the translated text.

Little note: I am a little new to open source so excuse me if I did
something wrong.

---------

Co-authored-by: Sushain Cherivirala <sushain@skc.name>
  • Loading branch information
Cellzawy and sushain97 committed Mar 20, 2024
1 parent c7662bb commit 78fe490
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/translator/TextTranslationForm.tsx
Expand Up @@ -239,7 +239,7 @@ const TextTranslationForm = ({
aria-label={t('Input_Text')}
as="textarea"
autoFocus
className="mb-2"
className="mb-2 translation-text-input"
dir={langDirection(srcLang)}
onChange={({ target: { value } }) => setSrcText(value)}
onKeyUp={handleSrcTextChange}
Expand All @@ -263,7 +263,7 @@ const TextTranslationForm = ({
<Col md="6" xs="12">
<Form.Control
as="textarea"
className={classNames('bg-light mb-2', { 'text-danger': error })}
className={classNames('bg-light mb-2 translation-text-input', { 'text-danger': error })}
dir={langDirection(tgtLang)}
readOnly
ref={tgtTextareaRef}
Expand Down
8 changes: 8 additions & 0 deletions src/components/translator/translator.css
Expand Up @@ -98,3 +98,11 @@ html[dir='rtl'] .translation-modes > :not(:first-child) {
border-radius: 4px;
height: 700px;
}

html[dir='ltr'] .translation-text-input {
padding-right: 1.85rem;
}

html[dir='rtl'] .translation-text-input {
padding-left: 1.85rem;
}

0 comments on commit 78fe490

Please sign in to comment.