cssmergemedia 0.1.1

Merges identical media queries in your CSS

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!

What's new in cssmergemedia 0.1.1:

  • Fixed dependecy check on install
Read full changelog
send us
an update
LICENSE TYPE:
Other/Proprietary License
USER RATING:
UNRATED
  0.0/5
DEVELOPED BY:
Adrien Kohlbecker
HOMEPAGE:
pypi.python.org
CATEGORY:
ROOT \ Text Editing&Processing \ Markup
cssmergemedia is a Python tool that merges identical media queries in your CSS.

For example, the following CSS:

    @media screen and (min-width: 480px) and (max-width:899px) {
     .foo {
       color:black;
     }
    }

    @media screen and (min-width: 480px) and (max-width:899px) {
     .bar {
       background:red;
     }
    }


Is compiled to:

    @media screen and (min-width: 480px) and (max-width:899px) {
     .foo {
       color:black;
     }
     .bar {
       background:red;
     }
    }


This allows you to keep your media queries along with the base style for each element, instead of grouping them together at the end of the file or in a separate file (and thus turning maintenance into a nightmare)

CSS Merge Media is based on cssutils: what can be parsed with cssutils can be used in the script.

Installation

Unpack the tarball and run::

  python setup.py install

Invocation

Invoke the script like so::

  cssmergemedia --input style.css --output style-merged.css

Last updated on June 13th, 2012

requirements

#media queries #merge queries #CSS #media #queries #merge

Add your review!

SUBMIT