PyKSS - Knyle Style Sheets
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.
Metadata
Release files for pykss 0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pykss-0.5.tar.gz | 8.1 kB | Without provenance | Details for pykss-0.5.tar.gz |
Release files / pykss-0.5.tar.gz
| Download URL | pykss-0.5.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ac1bd50492c09ed813cb2885e832704ec1957d710d49d57366d2a447af05a6c
|
|
BLAKE2b-256 checksum How to use checksums |
27c0188e4ffed0f182eb1f2c1c3de339f45e49ed229dd7e8d87ddec97c855699
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pykss 0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.