Skip to content
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): make floating labels work for ion-select #10770

Merged
merged 1 commit into from
Mar 15, 2017
Merged

fix(select): make floating labels work for ion-select #10770

merged 1 commit into from
Mar 15, 2017

Conversation

imgx64
Copy link
Contributor

@imgx64 imgx64 commented Mar 14, 2017

Short description of what this resolves:

This makes floating labels work with ion-select, instead of behaving like stacked labels.

Changes proposed in this pull request:

  • fix(select): make floating labels work for ion-select

Ionic Version: 2.x

Fixes: #10751

Copy link
Contributor

@manucorporat manucorporat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this have to do with floating? aren't you trying to fix input-has-value not being set?

@@ -65,7 +65,3 @@ ion-label[floating] {

max-width: 100%;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This CSS rule was forcing the floating label to always "float". It was needed because floating labels only float when the ion-item has input-has-value class. Now that it's being set by the ion-select, there's no need to force it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough

@imgx64
Copy link
Contributor Author

imgx64 commented Mar 15, 2017

Once I fixed input-has-value, I realized that it made it possible to make floating labels work just by deleting a single CSS rule. So I did just that, and changed the purpose of the change.

I think that CSS rule was added as a workaround because ion-select didn't support input-has-value.

@manucorporat manucorporat merged commit 8c483f2 into ionic-team:master Mar 15, 2017
@manucorporat
Copy link
Contributor

Merged! thank you very much for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants