Results 1 to 3 of 3
Feb 6, 2013, 18:30 #1
CSS "color:contrast" property or equivalent?
Does any upcoming draft of the CSS spec support setting text color based on the underlying color of the container element?
For example, my theme allows a user to customize the background color of elements as well as text. However, I'd like to provide a fallback in the event that I default a section's text color to white (as an example) and they change the background for that section to white. In that case, its difficult to tell that there is actually text there.
This is probably something that can be addressed with jQuery, but I'm curious if anything exists in the css spec working groups to handle it.