-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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(select): adjust label alignment when in a card #27202
Conversation
|
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.
Can we add screenshot tests for the select being rendered in a card, so that it doesn't regress in the future?
await page.setContent(` | ||
<ion-card> | ||
<ion-card-content> | ||
<ion-item style="border: 1px solid grey; margin: 16px"> |
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.
Is the border for a visual reference for the label alignment? If so, what is the margin: 16px
for?
~ Nit: Can we add lines="none"
to the ion-item
if we are going to draw a border around the container? Currently there are two bottom border lines.
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.
+1 to Sean's comments, but otherwise looks good.
Issue URL: resolves #27086
What is the current behavior?
When an
ion-select
is inside a card, the label is slightly lower than it should be, making it out of alignment with the label of anion-input
.What is the new behavior?
ion-input
andion-select
are in line with each other.Does this introduce a breaking change?
Other information
This bug was occurring because the label of ion-select is in the shadow DOM. As recommended, this fix was also added to ion-input and ion-textarea in case those labels are also later moved to the shadow DOM.
Before:

After:
