Skip to content

feat(form-field): implement hover state #9215

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

Closed
wants to merge 1 commit into from

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Jan 3, 2018

Based on the spec form fields should have a hover state where the underline gets darkened while the user is hovering and gets replaced by the theme color after the focus the input.

@crisbeto crisbeto requested a review from mmalerba as a code owner January 3, 2018 15:43
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jan 3, 2018
@@ -195,6 +195,19 @@ $mat-form-field-default-infix-width: 180px !default;
}
}

// Note that we need this specific of a selector because we don't want
// want the hover effect to show when the user hovers over the hints.
Copy link

Choose a reason for hiding this comment

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

@crisbeto duplicate word 'want' on new line

@mmalerba
Copy link
Contributor

mmalerba commented Jan 8, 2018

This feels a little jarring currently, I think it needs some animation to make it feel smoother. The animation videos in the spec don't seem to agree with the static images, since they show the underline already thick before hovering, so we might just have to play around with it on our own

@crisbeto
Copy link
Member Author

crisbeto commented Jan 8, 2018

Added a short transition @mmalerba.

@mmalerba
Copy link
Contributor

while you're at it, it looks like error state should be 2px underline as well

[Based on the spec](https://material.io/guidelines/components/text-fields.html#text-fields-states) form fields should have a hover state where the underline gets darkened while the user is hovering and gets replaced by the theme color after the focus the input.
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release and removed pr: needs review labels Jan 12, 2018
@mmalerba
Copy link
Contributor

FYI, I've rolled these changes into the standard and box variants in #9366. Should make merging easier since users won't see a change until they ask for one.

@crisbeto
Copy link
Member Author

Closing in favor of #9366.

@crisbeto crisbeto closed this Jan 13, 2018
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants