Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
contrast-switch
function for buttons
Bourbon comes with a `contrast-switch` function which switches between two colors based on the contrast to another color. In this case, we check the contrast of the button's background color and output either black or white for the text color. It helps to ensure button text is accessible. No visual difference with the button's look-and-feel occurs by using `contrast-switch`, as we were already within the acceptable contrast ratio range. This change also DRYs up the use of `$action-color` and creates a better system to add further variations of button colors in the future. Meaning, you can easily add something like `$_button-secondary-background-color` when the time comes. Finally, this closely mimics the variables we have set up in the `_forms` partial, as well.
- Loading branch information