CSS Merge Media merges identical media queries in your CSS
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
# Copyright (c) 2012 Adrien Kohlbecker
Intro
=====
CSS Merge Media 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
Changelog
=========
0.1.1 - June 13, 2012
---------------------
Fixed dependecy check on install
0.1 - June 13, 2012
-------------------
Initial release
Intro
=====
CSS Merge Media 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
Changelog
=========
0.1.1 - June 13, 2012
---------------------
Fixed dependecy check on install
0.1 - June 13, 2012
-------------------
Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cssmergemedia-0.1.1.tar.gz
(3.4 kB
view details)
File details
Details for the file cssmergemedia-0.1.1.tar.gz.
File metadata
- Download URL: cssmergemedia-0.1.1.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4caa5bcba85292b99d8a496ca02bceda7af9ece38cbd8bef4798a960d4e62e19
|
|
| MD5 |
27e6ca79e9d3ce1da73c19fa256f7351
|
|
| BLAKE2b-256 |
31d9bcc39e0a11ef5c267b5c8a130e541f44d0f6450bf4f3e72babb57e40ac82
|