question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Outline Buttons Get Wrong Color and Border

See original GitHub issue

Short 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

  1. Notice that the buttons are the correct color
  2. Tap on “SECONDARY”.
  3. Notice that the SECONDARY button becomes the primary (blue) color
  4. Notice that the DANGER button has a blue border instead of red. It should also be an “outline” button.
  5. Tap on “DANGER”
  6. 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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
calendeecommented, Nov 11, 2016

@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

1reaction
brandyscarneycommented, Nov 10, 2016

@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! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Outline Buttons Get Wrong Color and Border #9031 - GitHub
Short description of the problem: When a button with the outline property has the outline property conditionally removed, it becomes a solid ...
Read more >
Button Border Color Issues - Stack Overflow
The issues I am having is getting rid of the right and bottom borders that are darker than the left and top borders....
Read more >
border button color problem - WordPress.org
Hi This buttons, in the product page and cart page, for recommended products don't have borders, I don't know why, because I set...
Read more >
Gutenberg outline button - border color not applying
I'm using standard Gutenberg buttons with outline style and NO background. I set the colour in the editor but it's being overridden by ......
Read more >
How To Create Outline Buttons - W3Schools
Step 2) Add CSS: Example .btn { border: 2px solid black; background-color ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found