-
Notifications
You must be signed in to change notification settings - Fork 235
fix(field-label): address edge case where required icon would not render on the same line(Safari only) #5822
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
base: main
Are you sure you want to change the base?
Conversation
|
📚 Branch Preview🔍 Visual Regression Test ResultsWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
Deployed to Azure Blob Storage: If the changes are expected, update the |
Tachometer resultsCurrently, no packages are changed by this PR... |
Pull Request Test Coverage Report for Build 18987390821Details
💛 - Coveralls |
6deb824 to
acdec8d
Compare
4d9aea8 to
03260a4
Compare
5d7d7e5 to
6075d1f
Compare
|
Hi @cdransf, as part of the review process, could you please revert the golden hash so I can update the visuals that the VRT is flagging? Once your changes are approved, you can reapply the golden hash to accept the updated baseline. |
6075d1f to
d723d35
Compare
| display: inline-block; | ||
| display: inline-flex; | ||
| align-items: baseline; | ||
| white-space: nowrap; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm seeing that this longer field label example has stopped wrapping because we have nowrap on here, do we want the field label to wrap for situations like this?
It doesn't seem like we have VRTs covering this situation as far as I can see, it would be good to address this gap in coverage too.
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