Hyss - High Ympact Style Sheets
Rationale
Define styles as python dicts! All of the power of python, realised to create stylesheets. Coming soon to a package index near you!
Features
-
Create minified css content from a nested dictionary structure
-
Helper for compound css classes (think 'div p', 'main section')
Potential Future Features
-
Generate helpers for various css features. Already exist for animations.
-
Build an indenter for output css; ease of debugging for users
-
Means to convert
Usage Demonstrations
Here is a set of examples to illustrate the behaviour of functions within hyss
stylesheet(styles: dict) -> str
Takes a fractal dictionary structure and generates a minified css string as shown
from hyss import stylesheet
css = stylesheet(
{
'body': {
'background-color': 'yellow',
},
'div': {
'color': 'red'
}
}
print(css)
# This prints the following
# "body{background-color:yellow;}div{color:red;}"
with_linebreaks(css: str) -> str
Applies linebreaks to a minified css string, for debugging purposes as shown
from hyss.format import with_linebreaks
minified_css = "body{background-color:yellow;}div{color:red;}"
linebreak_css = with_linebreaks(minified_css)
print(linebreaks_css)
# This prints "body{\nbackground-color:yellow;\n}\ndiv{\ncolor:red;\n}\n"
In a file, linebreak_css will look as follows
body{
background-color:yellow;
}
div{
color:red;
}
Metadata
Release files for hyss 2.0.0
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 |
|---|---|---|---|---|
| hyss-2.0.0.tar.gz | 3.8 kB | Without provenance | Details for hyss-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hyss-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for hyss-2.0.0-py3-none-any.whl |
Total release size: 8.5 kB
Release files / hyss-2.0.0.tar.gz
| Download URL | hyss-2.0.0.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9491ba38af3b35f109c9c1e1330ca5d39541a521a7e14ffaa13eb6e7b05316ea
|
|
BLAKE2b-256 checksum How to use checksums |
d4415f3fb20391ba973ff67dff8ec31c9c87facada1c2b77e930acc7b32d6aa7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|
Release files / hyss-2.0.0-py3-none-any.whl
| Download URL | hyss-2.0.0-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ef94c92cd1cb21e34b0180df426106d64fcfe5c60d45bf8c125150278fa07c4f
|
|
BLAKE2b-256 checksum How to use checksums |
5f9d74f234424b6b4532f37a8f7291e80f2a9e4909d8ff904557fb4fb0cbb0d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|
Security for hyss 2.0.0
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.