fix(field-label): address edge case where required icon would not render on the same line #5822
+5
−2
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.
Description
Fixed Safari-specific rendering issue where the required asterisk in
sp-field-labelwould intermittently wrap to a new line. The solution uses CSS-only changes to ensure the asterisk always stays inline with the label text.Changes:
labelelement to usedisplay: inline-flexwithwhite-space: nowrapflex-shrink: 0to.required-iconto prevent asterisk from shrinkingMotivation and context
Safari (desktop and iPad) had an intermittent rendering bug where the required field asterisk would wrap to the next line, especially within flex containers. This was unpredictable and occurred on page refresh. The issue impacted form usability and visual consistency across browsers.
Related issue(s)
Author's checklist
Reviewer's checklist
patch,minor, ormajorfeaturesManual review test cases
Required asterisk stays inline in Safari
Required asterisk displays correctly across all size variants
Side-aligned labels maintain correct alignment
requiredattribute to examplesExisting field label behavior is unchanged
Device review