-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjust Floating Input Padding and Border Color #7328
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -33,13 +33,14 @@ const StyledTextArea = styled(TextareaAutosize)` | |||||
resize: none; | ||||||
max-height: 400px; | ||||||
width: calc(100% - ${({ theme }) => theme.spacing(7)}); | ||||||
padding: 0px; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style: Setting padding to 0px may cause text to touch the edges of the textarea. Consider using a small padding value instead.
nganphan123 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
`; | ||||||
|
||||||
const StyledTextAreaContainer = styled.div` | ||||||
border: ${({ theme }) => `1px solid ${theme.border.color.light}`}; | ||||||
border: ${({ theme }) => `1px solid ${theme.border.color.medium}`}; | ||||||
position: relative; | ||||||
width: 100%; | ||||||
padding: ${({ theme }) => theme.spacing(2)} ${({ theme }) => theme.spacing(1)}; | ||||||
padding: ${({ theme }) => theme.spacing(2)}; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @martmull , thank you for reviewing. I fixed according to this. I'm new to this repo, could you let me know why this would work better than the other way? Thank you! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it is better to directly set padding to 0, instead of setting it to 1 then 0 |
||||||
border-radius: ${({ theme }) => theme.border.radius.sm}; | ||||||
background: ${({ theme }) => theme.background.primary}; | ||||||
`; | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: The width calculation may cause overflow issues. Consider using
width: 100%
and adjusting padding instead.