Skip to main content

Python implementation of KSS

Project description

PyKSS is a Python implementation of KSS. KSS attempts to provide a methodology for writing maintainable, documented CSS within a team.

The official docs provide a good introduction to KSS. The complete syntax can he found on the syntax page.


pip install pykss


>>> import pykss
>>> styleguide = pykss.Parser('static/css')
>>> styleguide.section('2.1.1')
<pykss.section.Section object at 0x10c1d1190>
>>> styleguide.section('2.1.1').description
'A button suitable for giving stars to someone.'
>>> styleguide.section('2.1.1').modifiers[0]
<pykss.modifier.Modifier object at 0x10c1d1290>
>>> styleguide.section('2.1.1').modifiers[0].name
>>> styleguide.section('2.1.1').modifiers[0].class_name
>>> styleguide.section('2.1.1').modifiers[0].description
'Subtle hover highlight'

Django Usage

If you would like to use KSS within a Django project pykss.contrib.django provides a view and template tag to make it easier. Check out the example Django project for usage.

Project details

Download files

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

Files for pykss, version 0.5
Filename, size File type Python version Upload date Hashes
Filename, size pykss-0.5.tar.gz (8.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page