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

Segment: add transition to hover #5308

Closed
brandyscarney opened this issue Feb 2, 2016 · 10 comments
Closed

Segment: add transition to hover #5308

brandyscarney opened this issue Feb 2, 2016 · 10 comments
Assignees
Milestone

Comments

@brandyscarney
Copy link
Member

Hover needs to be lighter but tap can stay the same as it is now

@brandyscarney brandyscarney self-assigned this Feb 2, 2016
@brandyscarney brandyscarney added this to the 2.0.0-beta.1 milestone Feb 3, 2016
@jgw96
Copy link
Contributor

jgw96 commented Feb 5, 2016

Should just be able to change the opacity to fix this right? If so i can knock this out real quick.
$segment-button-ios-hover-opacity: 0.16 !default;

@brandyscarney
Copy link
Member Author

The opacity on hover needs to be lightened to 0.1, but when the activated class is applied it should keep the 0.16 opacity. Then the transition needs to be on the hover as well. If you want to knock it out let me know. :)

Hover (0.1 opacity):
screen shot 2016-02-05 at 2 03 49 pm

Activated (0.16 opacity)
screen shot 2016-02-05 at 2 04 21 pm

Active (1.0 opacity)
screen shot 2016-02-05 at 2 06 47 pm

https://github.com/driftyco/ionic/blob/2.0/ionic/components/segment/segment.ios.scss

@jgw96
Copy link
Contributor

jgw96 commented Feb 6, 2016

Ill handle this one. (:

@brandyscarney
Copy link
Member Author

@jgw96 Cool, thanks! Let me know if you have any questions!

@jgw96
Copy link
Contributor

jgw96 commented Feb 6, 2016

@brandyscarney no probs!

@jgw96
Copy link
Contributor

jgw96 commented Feb 6, 2016

@brandyscarney quick question, the activated class seems to be applied to the segment when the segment is selected, aka clicked, so shouldn't it be at 1.0 opacity then? So you would have hover with 0.1 opacity and then when the selected class is applied it goes to 1.0 opacity. With your pic/explanation above it seems that we want to make the opacity 0.16 when the activated class is applied, but that means when that segment is chosen it goes to 0.16 opacity, which is pretty ugly.

@brandyscarney
Copy link
Member Author

Sorry I should have looked at the exact names before responding. So it should be:

.segment-button:hover 0.1 opacity
.segment-button:active 0.16 opacity
.segment-activated 1.0 opacity

The active is only while pressing on the button and then on release it changes to the solid background.

2brjsj5s7x

@jgw96
Copy link
Contributor

jgw96 commented Feb 6, 2016

No, your perfectly fine, that makes much more sense now. Thanks for the response!

@jgw96 jgw96 mentioned this issue Feb 6, 2016
@jgw96
Copy link
Contributor

jgw96 commented Feb 6, 2016

Pull request submitted above! Thanks for the help @brandyscarney If i need to change anything just tell me and ill change it.

brandyscarney added a commit that referenced this issue Feb 12, 2016
@brandyscarney
Copy link
Member Author

@jgw96 Thank you for the PR! I haven't checked on this in awhile, but I see Adam merged it! I added a fix for the colorized segments, too. Thanks again. 😄

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants