fix(forms): avoid .is-required element to be alone on a new line #2760
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.
Related issues
Closes #2758
Description
This PR fixes the issue described at #2758 where the asterisk showing that a form control is required can be alone on a new line when the label length has exactly the same length as the corresponding input.
I tried different non-working solutions based on
word-wrap
and non breakable space without success. This PR relies on @jacques-lebourgeois's suggestion.The only drawback I've found of this fix is that the asterisk, intead of going to the new line, stays on the same line but is displayed in the safe area; outside of the bounding box that we should use. However, I'd consider that as a minor issue.
See:
Types of change
Live previews