Skip to content
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

Updates input width in _chips.scss sass component #513

Open
wants to merge 1 commit into
base: v2-dev
Choose a base branch
from

Conversation

Git-Harshit
Copy link

This is a minor but suitable change which updates the width property of an input field for adding new chips from fixed 120px to fit-content, with same !important weight. Also, the min-width and max-width properties are set to limit its size between 100px and 200px. With this change, the input placeholder (if limited to under 200px) will not get cropped, and it will also have a better fit into the input field, thereby offering it more flexibility to adapt the content.

Note: It was proposed long back into the parent repository Dogfalo#6567, where it went approved but unattended. Today, after a few years, as I had noted that this forked repository from the parent repository is the one under the latest maintenance, I had squashed and cherry-picked my previous changes from Dogfalo#6567 into another branch that was baselined with the v2-dev here, to raise another pull request for this same enhancement.

Proposed changes

This change fixes the issue that I had encountered recently with the placeholder or text of the input before pressing enter to convert it to a chip. Please have a look at how this small change affects the chips input (Screenshot from Google Chrome).
I did not file any bug for it since it was a working feature which gets enhanced with the SASS changes from this Pull Request.

Screenshots (if appropriate) or codepen:

Capture-ChangePropose

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to change).

Checklist:

  • I have read the CONTRIBUTING document.
  • My commit messages follows the conventional commit format
  • My change requires a change to the documentation, and updated it accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

This is a minor commit which updates the width of input field from fixed
121px to 'fit-content' type, overwritten wherever the browser is able to
render this property. Also, the optional min-width and max-width are set
to limit its size between a reasnable limit of 100px and 200px. With
this change, the input placeholder (if limited to under 200px) will not
get cropped, and it will also have a better fit into the input field.

Signed-off-by: Harshit Gupta <hkg1412@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant