Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Design Creating a global black and white (grey scaled) theme

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #204424
    farazbz
    Participant

    Hi,
    I wanted to create a global css that will turn every color in a page to a grey scaled version so the page looks black and white. I am not really familiar with css coding. It would be great if anyone could tell if it is possible and how. I am using the extension stylish on my safari and it accepts css code.
    Thanks

    #204428
    Shikkediel
    Participant

    I guess a grayscale filter on body would qualify for that :

    https://css-tricks.com/almanac/properties/f/filter/

    #204429
    farazbz
    Participant

    Shikkediel thanks for the immediate response. I really admire your help, but what if I didn’t want the images to be effected by it?

    #204433
    Shikkediel
    Participant

    I think I’ll need to investigate a bit… there doesn’t seem to be a straightforward solution.

    #204434
    Paulie_D
    Member

    Shouldn’t that be

    body :not(img) { /* you want the children not the body itself*/
    filter: grayscale(100%);
    }
    

    or

    body *:not(img) { 
    filter: grayscale(100%);
    }
    
    #204435
    Paulie_D
    Member

    Nope…it has issues….you can’t selectively apply greyscale it’s like opacity the children inherit it…so if the image is in a wrapper…it gets greyscaled.

    http://codepen.io/Paulie-D/pen/YXeqGv

    #204436
    Shikkediel
    Participant

    You are right, both about the (removed) CSS and the inheritance issue. For Safari, I think it needs a -webkit- prefix by the way.

    #204438
    Paulie_D
    Member

    Prefixes….Soooo last year! ;)

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Design’ is closed to new topics and replies.