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'
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.1.tar.gz
(3.2 kB
view details)
File details
Details for the file pykss-0.1.tar.gz.
File metadata
- Download URL: pykss-0.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9dfa30f9c4d9da00da7e2efdea701feda79f8550976c21747708332907626b3
|
|
| MD5 |
4c3e9f987ec8432899faf44a04661341
|
|
| BLAKE2b-256 |
6134d4276d97e4c401173d06788f9967b2587bc26f318d9793f3856b8ff98cb9
|