Conversation
…o-grow Replace the library's inline height!important with a CSS variable approach. The auto-grow library now sets --suggested-height on the textarea node; Atlas picks it up via min-height so customers can override sizing in their own styles without fighting inline !important declarations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The auto-grow textarea library controls height via an inline
height: <value>!importantstyle, which prevents customers from overriding textarea height in their own stylesheets.Solution
The library is patched (via npm patch) to set a CSS custom property instead:
This PR adds the Atlas CSS side of the fix:
Why this approach
min-heightnotheight— preserves grow-automatically behavior; the textarea can still expand beyond the suggested height..mx-textarea— only affects the Mendix textarea widget, not any other widget usingtextarea.form-control.--suggested-heightis not set (projects without the library patch),min-heightresolves to its initial value and has no effect.min-height: 0or any value on.mx-textarea textareato fully opt out.Backport of #336 to
lts/mx/9.24(Atlas 3).Test plan
min-heightin custom CSS takes effect