How can you call CSS3 effects from the custom CSS window?

Viewing 4 posts - 1 through 4 (of 4 total)
  • #15251
    cwesson
    Participant

    I can customise the shape of my (gr)avatar using this code:

    /*Customised Gravatar*/

    .avatar {
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    border-radius: 20px;

    -webkit-box-shadow: inset 0 0 4px rgba(0,0,0,1), inset 0 2px 1px rgba(255,255,255,.5), inset 0 -9px 2px rgba(0,0,0,.6), inset 0 -12px 2px rgba(255,255,255,.3);
    -moz-box-shadow: inset 0 0 4px rgba(0,0,0,1), inset 0 2px 1px rgba(255,255,255,.5), inset 0 -9px 2px rgba(0,0,0,.6), inset 0 -12px 2px rgba(255,255,255,.3);
    box-shadow: inset 0 0 4px rgba(0,0,0,1), inset 0 2px 1px rgba(255,255,255,.5), inset 0 -9px 2px rgba(0,0,0,.6), inset 0 -12px 2px rgba(255,255,255,.3);

    }

    My question is, how do I get it to recognise something like this?

    .soft-embossed .avatar

    #15261
    Daniel Tara
    Keymaster

    That code should work in the custom CSS field but you’d need to add the .soft-embossed class to avatars like this:

    function pinboard_avatar_class( $avatar ) {
    $avatar = str_replace( “class=’avatar”, “class=’avatar soft-embossed”, $avatar );
    return $avatar;
    }

    add_filter( ‘get_avatar’, ‘pinboard_avatar_class’ );

    #15317
    cwesson
    Participant

    Thanks! This is exactly the bit I need but where do I put it?

    I’ve tried at the bottom of theme-functions.php, no good, and I’ve tried in the Custom CSS, also no good.

    #15342
    Daniel Tara
    Keymaster

    At the bottom of functions.php it should work.

Viewing 4 posts - 1 through 4 (of 4 total)

Tagged: 

You must be logged in to reply to this topic.