CSS Media Queries and v:asset
  • Vote Up0Vote Down Scott September 2011

    It looks like using the v:asset tag break the media queries formatting in a css file. For example, the raw css is written like this:
    @media screen and (max-width: 380px) {
    #some_element {
    display: none;
    }
    }

    And when I try to deliver this css file using v:asset, it turns into this:
    @media screen and max-width 380px {
    #some_element {
    display: none;
    }
    }

    I can set debug="true" in my v:asset tag to deliver the unmodified css, but ideally I would like to be able to deliver a single compressed css file.

  • 1 Answer sorted by
  • Vote Up0Vote Down KevinKevin September 2011

    Yeah, unfortunately media queries aren't supported by the CSS compressing library that we use. What you can do, is in the Site > Optimization tab, we have an option to reduce the compression level, which should allow it to work for you.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

In this Discussion