SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Addict Scott Blanchard's Avatar
    Join Date
    Sep 2010
    Posts
    314
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.

  2. #2
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,095
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)

  3. #3
    I solve practical problems. bronze trophy
    Michael Morris's Avatar
    Join Date
    Jan 2008
    Location
    Knoxville TN
    Posts
    2,011
    Mentioned
    56 Post(s)
    Tagged
    0 Thread(s)
    I seriously doubt such a property would ever be given token consideration. CSS is a markup for designers - and mechanisms for allowing your users to design their own layout have no place in the markup.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •