Python LESS compiler
Maintained. Last release 4 months ago, commits in 2 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install lesscpyLESSCPY
Python LESS Compiler.
A compiler written in Python for the LESS language. For those of us not willing or able to have node.js installed in our environment. Not all features of LESS are supported. Some features will probably never be supported (JavaScript evaluation). This program uses PLY (Python Lex-Yacc) to tokenize / parse the input and is considerably slower than the Node.js compiler.
For more information on LESS:
Development files:
Supported features
- Variables
- String interpolation
- Mixins (nested, calls, closures, recursive)
- Guard expressions
- Parametered mixins (class / id)
@arguments- Nesting
- Escapes
~/e() - Expressions
- Keyframe blocks
- Color functions (lighten, darken, saturate, desaturate, spin, hue, mix, saturation, lightness)
- Other functions (round, increment, decrement, format
'%(...))
Differences from less.js
- All colors are auto-formatted to
#nnnnnn(for example,#f7e923)

