Skip to main content

PostCSS support for django-compressor

Project description

This module will let you use PostCSS as a filter with django-compressor. You can use any postcss plugin you wish (assuming the plugin is installed).

Installation

Install this package:

pip install django-compressor-postcss

You also need to install the postcss tool itself and depending on what plugins you plan to use, you should install those manually.

Example:

sudo npm install -g postcss-cli
sudo npm install -g autoprefixer postcss-font-magician

Configuration

Your Django’s settings should look something like below.

COMPRESS_CSS_FILTERS = (
    ..
    'compressor_postcss.PostCSSFilter',
    ..
)

COMPRESS_POSTCSS_PLUGINS = (
    'autoprefixer',
    'postcss-font-magician'
)

COMPRESS_POSTCSS_PLUGINS determines the plugins that PostCSS will use.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

django_compressor_postcss-0.8.2-py2.py3-none-any.whl (5.4 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page