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

fix(form-control): added vars for textarea width/height for resizing #3883

Merged
merged 1 commit into from
Mar 2, 2021

Conversation

mcoker
Copy link
Contributor

@mcoker mcoker commented Feb 23, 2021

fixes #3837

Allows textarea to be resized via --pf-c-form-control--textarea--Width and --pf-c-form-control--textarea--Height

@tlabaj can you let me know if this is enough to support autosize/resize?

@patternfly-build
Copy link

patternfly-build commented Feb 23, 2021

Preview: https://patternfly-pr-3883.surge.sh

CSS Size Report
NameCurrentPreviousDiff %
components/ContextSelector/context-selector.css8.9 kB8.9 kB-0.02
components/FormControl/form-control.css25.8 kB25.5 kB1.13
patternfly-no-reset.css1.1 MB1.1 MB0.03
patternfly.css1.1 MB1.1 MB0.03
patternfly.min.css957.3 kB957.1 kB0.03

A11y report: https://patternfly-pr-3883-coverage.surge.sh

Copy link
Contributor

@mattnolting mattnolting left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, can we add a max-width: 100% as well? When resizing, the fluidity of width makes the textarea feel unmaintained...

Screen Shot 2021-02-25 at 8 50 39 AM

@mcoker
Copy link
Contributor Author

mcoker commented Feb 25, 2021

@mattnolting when we initially introduced the resize modifiers in #2251 (comment), we decided not to impose any limitations on the ability to resize the width/height with the default textarea. It could also be considered a breaking change to do that at this point.

Copy link
Contributor

@mattnolting mattnolting left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@tlabaj
Copy link
Contributor

tlabaj commented Mar 2, 2021

@mcoker yes, this should be sufficient to autosize the textarea based on the scrollWidth/scrollHeight .

@mcoker mcoker merged commit 6d9631f into patternfly:master Mar 2, 2021
@redallen
Copy link
Contributor

redallen commented Mar 2, 2021

🎉 This PR is included in version 4.89.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

Textarea Autosize/Autoexpand
5 participants