Outline Buttons Get Wrong Color and Border
See original GitHub issueShort description of the problem:
When a button with the outline property has the outline property conditionally removed, it becomes a solid color button with the wrong color applied. Instead of being the designated color, it uses the primary color. Later, if the button has the outline property conditionally applied again, the button correctly switches to the designated color but with the wrong border color. The applied border color is primary.
Additionally, as noted in #8845 , once a button has the outline property conditionally re-applied, it will never reappear as an outline button. It will always be a solid color button.
NOTE: This problem began with RC1/2. In Beta 11 the problem did not exist.
What behavior are you expecting?
When a button has the outline property conditionally removed, it should take on it’s designated color class instead of primary. When the outline class is reapplied, the border should be the designated color instead of primary.
Steps to reproduce: Open this Plunker: http://plnkr.co/edit/c0ybwYtvFTaT9dGvUje4?p=preview
- Notice that the buttons are the correct color
- Tap on “SECONDARY”.
- Notice that the SECONDARY button becomes the primary (blue) color
- Notice that the DANGER button has a blue border instead of red. It should also be an “outline” button.
- Tap on “DANGER”
- Notice that the SECONDARY button got the correct color. but it should be an outline button and should NOT have a primary color border
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
Which Ionic Version? 1.x or 2.x Ionic 2 RC1 and RC2
Plunker that shows an example of your issue
See steps to reproduce for the plunker.
Run ionic info
from terminal/cmd prompt: (paste output below):
Project 1 Info:
Cordova CLI: 6.2.0 Gulp version: CLI version 3.9.1 Gulp local: Local version 3.9.1 Ionic Framework Version: 2.0.0-rc.1 Ionic CLI Version: 2.1.4 Ionic App Lib Version: 2.1.2 Ionic App Scripts Version: 0.0.38 ios-deploy version: 1.9.0 ios-sim version: 5.0.9 OS: Mac OS X El Capitan Node Version: v6.7.0 Xcode version: Xcode 7.3.1 Build version 7D1014
Project 2 Info: Cordova CLI: 6.2.0 Gulp version: CLI version 3.9.1 Gulp local: Ionic Framework Version: 2.0.0-rc.2 Ionic CLI Version: 2.1.4 Ionic App Lib Version: 2.1.2 Ionic App Scripts Version: 0.0.39 ios-deploy version: 1.9.0 ios-sim version: 5.0.9 OS: Mac OS X El Capitan Node Version: v6.7.0 Xcode version: Xcode 7.3.1 Build version 7D1014
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:10 (9 by maintainers)
@brandyscarney Can confirm the issue is fixed with the nightlies in a local repo and on Plunker.
Thanks to you and @ncapito for the rapid turnaround!
Here’s an updated Plunker that shows the problem fixed in the nightlies : http://plnkr.co/edit/ClgMHjlDRtSXXejRdgaM?p=preview
@ncapito We have some steps here that might help: https://github.com/driftyco/ionic/blob/master/scripts/README.md#development
Specifically these steps should work: https://github.com/driftyco/ionic/blob/master/scripts/README.md#building--running-e2e-tests
Let me know if you run into problems and I can help! 😃