Fix: Text colour on focused primary buttons#6714
Fix: Text colour on focused primary buttons#6714nfmohit wants to merge 1 commit intoWordPress:masterfrom nfmohit:update/component-button/6668
Conversation
|
Thanks for looking at this. The rules are becoming a bit complex, I'm going to try and take a stab at this as well, see if there's a nicer way to do it. It feels like there's an opportunity to leverage #6562 to do this. |
|
I took inspiration from this PR to push a fix to #6562. Let me know what you think, and we'll give you props for that PR. Thanks again for your contributions! |
|
Thank you so much for checking this out @jasmussen! I just checked out and tested #6562 and it seems to be a much better and consistent solution than mine. I believe that is the most important part of open source contributions where beginners like me get to watch and learn from inspiring professionals like you 😊 Thank you very much! |
|
Awesome! Thanks again for your contribution. Let's get that other branch in, then! |
|
Looking at this I think I'm right in closing this as the other branch is the focus. Thanks again @nfmohit-wpmudev for your contribution here. |
Description
This PR addresses #6668 and fixes the wrong colour on not just the focused "Publish" button but also all other buttons with the
.button-primaryclass on focus.How has this been tested?
This PR has been tested by making sure the text colour of the "Publish" button is white on focus. This was tested in WP 4.9.5, Gutenberg 2.8.0, Apache server with PHP 7.2.0 and MySQL 5.6.34. According to initial tests, the code doesn’t seem to affect any other areas.
Screenshots
Types of changes
This PR adds a new style which enforces the buttons having the
.button-primaryclass to have the white colour. I'm open to recommendations if a new mixin should be introduced for these buttons or if this can be done in a more optimal way.Checklist: