Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Don’t auto-select a pullquote text colour for regular style #10792
The pullquote block auto-selects an appropriate text colour based on the main colour. This is designed to give a good contrast. However it assumes the quote has a 'solid colour' style where the main colour is the background, with the text overlayed:
If the pullquote uses the 'regular colour' style the background is white (or whatever the theme uses), and the main colour changes the top and bottom border:
The colour calculated for the main colour background can often give a poor contrast ratio on this white background.
For example, if you create a pull quote with regular style and pick red as the main colour it sets the text colour to light grey (the calculated text colour for red). In the above solid colour quote this gives good contrast, but on a regular colour quote with white background it gives poor contrast:
This PR restricts the auto-colour selection to the 'solid colour' style only. I'm not sure if this fits the intended purpose of the block, but it fixes the problem in this instance.
Also fixes the situation where clicking 'clear' on the main colour sets a text colour.
How has this been tested?