WordPress.org

Ready to get started?Download WordPress

Forums

WordPress.com Custom CSS
CSS3, gradient backgrounds, @media (4 posts)

  1. Michael
    Member
    Posted 2 years ago #

    The Custom CSS plugin has proven to add quite a bit of flexibility in our multisite network, especially combined with the Twenty Eleven theme.

    Twenty Eleven features some advanced CSS that cannot be overridden via this plugin because CSSTidy strips out the code. Namely, the background gradients in the #access div and the @media queries.

    Does anyone have experience with editing the CSSTidy files that come with the "WordPress.com Custom CSS" plugin to allow CSS3 gradient backgrounds and/or @media queries?

    http://wordpress.org/extend/plugins/safecss/

  2. Michael
    Member
    Posted 2 years ago #

    Just as a follow up, with the current version of the plugin, 1.5, the following:
    @media (max-width: 800px) { }
    would become:
    @media max-width 800px { }
    and

    background: #222;
    background: -moz-linear-gradient(#252525, #0a0a0a);
    background: -o-linear-gradient(#252525, #0a0a0a);
    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#252525), to(#0a0a0a));
    background: -webkit-linear-gradient(#252525, #0a0a0a);

    would become:
    background:0;

  3. alittlebitofnothing
    Member
    Posted 2 years ago #

    It would be really nice to allow css3 gradients and not to have to meddle with the CSSTidy.

    Thanks!

  4. mrdb
    Member
    Posted 1 year ago #

    Hey Michael,

    Did you find an answer for your question? I am having trouble with gradients in internet explorer and have found a fix (see below) but SafeCSS strips out the -ms-filter & zoom lines.

    background:none;
    -ms-filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26ffffff,endColorstr=#26ffffff);
    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26ffffff,endColorstr=#26ffffff);
    zoom: 1;

    Any help would be appreciated.

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags