Skip to content

Commit

Permalink
fix(ui-styles): TextArea helper text is misaligned (#518)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Style Updates**
- Improved text area component layout: Labels now move above the field
when focused, and helper text is repositioned below the field for better
clarity and usability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
aversini authored Apr 18, 2024
1 parent b8d0e35 commit 71bea12
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
export default {
[`.av-text-area-wrapper label[aria-hidden="true"]`]: {
'.av-text-area-wrapper label[aria-hidden="true"]': {
/* move the label inline */
transform: "translate(18px, 0) scale(1)",
transformOrigin: "top left",
transition: "var(--av-text-area-wrapper-transition, all 0.2s ease-out)",
},
'.av-text-area:focus + label[aria-hidden="true"],\n\t.av-text-area:not(:placeholder-shown) + label[aria-hidden="true"]':
{
transform:
"translate(18px, var(--av-text-area-label, -25px)) scale(0.75)",
},
/* move the label above the field (on focus) */
[`.av-text-area:focus + label[aria-hidden="true"],
.av-text-area:not(:placeholder-shown) + label[aria-hidden="true"]`]: {
transform: "translate(18px, var(--av-text-area-label, -25px)) scale(0.75)",
},
/* move the helper text below the field */
".av-text-area-helper-text": {
transform:
"translate(18px, var(--av-text-area-helper-text, 32px))\n\t\t\tscale(0.75)",
"translate(12px, var(--av-text-area-helper-text, 32px)) scale(0.75)",
transformOrigin: "top left",
},
".av-text-area__control--right": {
Expand Down

0 comments on commit 71bea12

Please sign in to comment.