Sector Nord AG: Textarea element now expands in both directions. #489
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed change
The
<textarea>
element currently only expands in one direction, usually horizontally. This causes issue when writing longer text in the field. As it stands<textarea>
holds the CSS propertyflex: 1;
, an abbreviation of the three proprietiesflex-grow: 1; flex-shrink: 1; flex-basis: 0%;
. The issue is being caused by the propertyflex-basis: 0%;
, because it sets the initial width to 0, but leaves the height unaltered by the flex property ( in the case the flex container is set to a row orientation).The proposed change is to change the value of the flex property from
flex: 1;
toflex: 1 auto;
, which adjusts the initial width and height, which in turn allows the flex container to adjust both values on expansion. This change would set the new values toflex-grow: 1; flex-shrink: 1; flex-basis: auto;
.Type of change
🐞 bug 🐞
Additional information
Many areas were tested ti see if this change creates and unwanted effects.
These areas include:
Checklist