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
feat(components): improve hover states for buttons #19440
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Remove close button * update tests * update tests * add build
- applies to ion-back-button, ion-menu-button, ion-button - still need to do others including fab - CSS cleanup - this is only implemented in MD - greatly reduces the requirement by users to set the background hover for dark modes, also eliminates the need to know what the hover opacity is for each - updates the MD dark theme per their spec
ionitron-bot
bot
added
package: core
@ionic/core package
package: vue
@ionic/vue package
labels
Sep 24, 2019
BREAKING CHANGE css class `activated` -> `ion-activated` to stay consistent with `ion-focused` and reduce conflicts with user's CSS Also fixes an issue with border radius, the hover state for buttons w/ color
* Remove close button * update tests * update tests * add build
BREAKING CHANGES Removes ion-nav-pop, ion-nav-push and ion-nav-set-root in favor of using ion-nav-link with router-direction
BREAKING CHANGES Removes `scss` files from the distributed files. Please use CSS variables for theming instead.
BREAKING CHANGES The Ionic default colors have been updated to the following: primary: #3880ff secondary: #3dc2ff tertiary: #5260ff success: #2dd36f warning: #ffc409 danger: #eb445a light: #f4f5f8 medium: #92949c dark: #222428 `primary`, `light` and `dark` have not changed. The contrast color for `warning` has been updated to `#000`.
BREAKING CHANGES Removes all CSS utility attributes. Please use CSS classes instead. See the documentation for the correct class names: https://ionicframework.com/docs/layout/css-utilities
BREAKING CHANGES Skeleton text's `width` property has been removed. Please use CSS instead to set the width.
BREAKING CHANGES The deprecated `ion-anchor` component has been removed in favor using `ion-router-link`. It should still only be used with vanilla and Stencil JavaScript projects. For Angular projects, use an `<a>` and `routerLink` with the Angular router.
) BREAKING CHANGES The `show-cancel-button` property of the searchbar no longer accepts boolean values. Accepted values are strings: `"focus"`, `"always"`, `"never"`. The following should change: ``` <ion-searchbar show-cancel-button> <ion-searchbar show-cancel-button="true"> <ion-searchbar show-cancel-button="false"> ``` becomes ``` <ion-searchbar show-cancel-button="focus"> <ion-searchbar show-cancel-button="focus"> <ion-searchbar show-cancel-button="never"> ```
…r on segment w/ color
Fixed by: 1d4fe52 |
liamdebeasi
reviewed
Jan 23, 2020
liamdebeasi
approved these changes
Jan 23, 2020
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.
A++
Ready 2 Merge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull request checklist
Please check if your PR fulfills the following requirements:
npm run build
) was run locally and any changes were pushednpm run lint
) has passed locally and any fixes were made for failuresPull request type
Please check the type of change your PR introduces:
What is the current behavior?
Currently users have to know the exact opacity that the MD spec uses in order to change the hover color. This allows them to change the background without having to know the opacity. There is also a bug with dark mode because the hover state would need to be set to the toolbar color with the opacity for each fill.
References #18279 Fixes #20213 Fixes #19965
What is the new behavior?
Component Updates
Any component in the below table needs to have hover corrected.
Table Key:
master
): Did the component have the variables for--background-hover
onmaster
⬜ - Incomplete
✅ - Done
🌀 - Doesn't exist
master
)Remaining components here: #18279
Does this introduce a breaking change?
Will go into Ionic 5.
BREAKING CHANGES
Activated Class
The
activated
class that is automatically added to buttons on press has been renamed toion-activated
. This will be more consistent with ourion-focused
class we add and also will reduce conflicts with user's CSS.CSS Variables
The
--background-hover
CSS variable on buttons will now have an opacity automatically set. Anyone setting it like the following:Will likely not see a hover state anymore, it should be updated to the following:
If the opacity desired is something other than what is set by default, use:
Other information