Skip to main content

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.

Metadata

Release files for django-compressor-postcss 0.8.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for django-compressor-postcss 0.8.2
File Interpreter ABI Platform
django_compressor_postcss-0.8.2-py2.py3-none-any.whl Python 3, Python 2 none any Details

Release files / django_compressor_postcss-0.8.2-py2.py3-none-any.whl

Download URL django_compressor_postcss-0.8.2-py2.py3-none-any.whl
Size 5.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
c443412f01f8abbb9f138e12ca2342c35d27208c4475ece8b437ef9961c3f012
BLAKE2b-256 checksum
How to use checksums
3096692b862e18fee1804f9982c6e1736a25c3c567862b0f570d9ebc77481702
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.8.2 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page