Sickdesigner.com

The work & fun of web designer Radu Chelariu.

Menu

Experiments, ideas & things done just for the fun of it

Contact me

Feel free to get in touch with me if you want to hire me (design work, speaking engagements, guest posting), interviews, if you have a problem with either Photoshop, HTML, CSS or Wordpress, or if you just want to talk about design. I'm also available on Twitter, Facebook or Google+, if that's more your game.

But, for the love of all that is Bauhaus, please do not contact me if you're selling something or about link exchanges and that kind of stuff. I will not reply to these requests.

Selectively creative

Let’s face it, ::selection styles are about as boring as watching turtles fuck. I, borderline, hate doing the damned things and I’m sure I’m not the only one with this mindset. I mean about ::selections, not about the turtle thing.

Fortunately, here’s a pretty nifty idea about ::selections I sort of just stumbled upon: styling them differently throughout the website. And the code for that just couldn’t be simpler:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* General style */
::selection{
    background: #000;
    color: #fff; }

    /* Area specific style */
    #id ::selection{
        background: #a20;
        color: #ef0; }

    /* Another area specific style */
    .class ::selection{
        background: #b1f;
        color: #fff; }

*Vendor prefixes needed, of course

Pretty cool, huh? Just don’t get too carried away with this, lest you waste countless hours just tweaking ::selections like some sort of weird OCD crazed loony. No disrespect intended to people actually suffering from OCD.

Cheers, all!

Speak your mind