Skip to main content
https://secure.travis-ci.org/seanbrant/pykss.png?branch=master

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.

Installing

pip install pykss

Usage

>>> 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
':hover'
>>>
>>> styleguide.section('2.1.1').modifiers[0].class_name
'pseudo-class-hover'
>>>
>>> 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.

Download files

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

Source Distribution

pykss-0.2.5.tar.gz (7.8 kB view details)

Uploaded Source

File details

Details for the file pykss-0.2.5.tar.gz.

File metadata

  • Download URL: pykss-0.2.5.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pykss-0.2.5.tar.gz
Algorithm Hash digest
SHA256 48e0398551416b6ad541a9bb37181e1724ce2e9d602cf3d40d6a024255a21e71
MD5 8166a63f44755312f02237c8b77720ff
BLAKE2b-256 dae51b5bbaeb0b6a8b30651f7a71bc11ad2758d74277577830526a1ada2bb34b

See more details on using hashes here.

Release history Release notifications | RSS feed

0.5

1 file

0.4

1 file

0.3

1 file

0.2.9

1 file

0.2.8

1 file

0.2.7

1 file

0.2.6

1 file

This release

0.2.5 This release

1 file

0.2.4

1 file

0.2.3

1 file

0.2.2

1 file

0.2.1

1 file

0.1

1 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