PyCSS
PyCSS is a microlibrary to speed up the process of writing CSS.
How does it do it?
With Python!!!
First download the https://github.com/Jammin-Coder/py-css/tree/main/PythonCSS folder that contains the program files, then in that directory open the app.py
file:
Then within app.py
and within the CSSClasses
class, you write Python classes that translate into CSS:
Then you run compile.py
with python3 compile.py -o <output_css_file>.css
:
The -o
flag tells the program where to output the compiled CSS file.
Then open the css file and make sure it worked:
You can also inherit properties from other classes:
which turns into this:
Then you can use the CSS file in any web-development project!