-
Notifications
You must be signed in to change notification settings - Fork 92
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
FIX Search box css for compact size #1407
FIX Search box css for compact size #1407
Conversation
9bc5ca7
to
4b605e8
Compare
9ffd8ee
to
00c4a37
Compare
@@ -90,6 +91,10 @@ class SearchBox extends Component { | |||
return this.state.tagWidth + existingPadding; | |||
} | |||
|
|||
calculateInputRightPadding() { | |||
return this.state.width < 576 ? 121 : 264; |
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.
Where do 121
and 264
come from? These seem like arbitrary numbers. Maybe add a comment indicating what this is actually doing?
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.
const style = { paddingLeft: `${this.calculateInputLeftPadding()}px` }; | ||
const style = { | ||
paddingLeft: `${this.calculateInputLeftPadding()}px`, | ||
paddingRight: `${this.calculateInputRightPadding()}px` | ||
}; |
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.
Why both left and right, but before it was only doing left padding?
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.
Right padding was added to fix the bug :-)
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.
From memory it was because there's an "x" that shows when you type in the text input in chrome, and without the right padding change it was totally out of alignment after the search button text was removed
00c4a37
to
a053b22
Compare
Issue #1398
This SearchBox component already had the ResizeAware functionality applied to it
576px is used elsewhere in the SearchBox component for the 'compact size' version