Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

*
* LESSCPY *
*
python LessCss Compiler.
v0.9c

A compiler written in python 3 for the lesscss language.
For those of us not willing/able to have node.js installed in our environment.
Not all features of lesscss are supported (yet).
Some features wil probably never be supported (JavaScript evaluation).
This program uses PLY (Python Lex-Yacc) to tokenize/parse the input and is
considerably slower than the nodejs compiler. The plan is to utilize this
to build in proper syntax checking and perhaps YUI compressing.

This is an early version, so you are likly to find bugs.

For more information on lesscss:
* http://lesscss.org/
* https://github.com/cloudhead/less.js

Development files
* https://github.com/robotis/Lesscpy

Requirements
============

* python 3+
* ply (Python Lex-Yacc) python 3 version

For more information on ply:
* http://www.dabeaz.com/ply/

Installation
============

python3 setup.py install

or simply place the package into your python path.

Compiler script Usage
=====================

usage: lesscpy [-h] [-I INCLUDE] [-v] [-x] [-X] [-t] [-s SPACES] [-o OUT] [-r]
[-f] [-m] [-D] [-S] [-V] [-L] [-N]
target

LessCss Compiler

positional arguments:
target less file or directory

optional arguments:
-h, --help show this help message and exit
-I INCLUDE, --include INCLUDE
Included less-files (comma separated)
-v, --verbose Verbose mode

Formatting options:
-x, --minify Minify output
-X, --xminify Minify output, no end of block newlines
-t, --tabs Use tabs
-s SPACES, --spaces SPACES
Number of startline spaces (default 2)

Directory options:
Compiles all *.less files in directory that have a newer timestamp than
it's css file.

-o OUT, --out OUT Output directory
-r, --recurse Recursive into subdirectorys
-f, --force Force recompile on all files
-m, --min-ending Add '.min' into output filename. eg, name.min.css
-D, --dry-run Dry run, do not write files

Debugging:
-S, --scopemap Scopemap
-V, --debug Debug mode
-L, --lex-only Run lexer on target
-N, --no-css No css output

Supported features
==================
* Variables
* String interpolation
* Mixins
* mixins (Nested)
* mixins (Nested (Calls))
* Guard expressions
* Parametered mixins (class)
* Parametered mixins (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 '%('
** add
** iscolor
** isnumber
** isurl
** isstring
** iskeyword
* Keyframe blocks

Differences from lessc.js
=========================
* All MS filters and other strange vendor constructs must be escaped
* All colors are auto-formatted to #nnnnnn. eg, #f7e923
* Does not preserve css comments

Not supported (yet)
===================
* mixins (closures)
* Pattern-matching
* JavaScript evaluation

License
=======
See the LICENSE file

<jtm@robot.is>

Metadata

Release files for lesscpy 0.9c

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lesscpy 0.9c
File Size Uploaded Provenance Actions
lesscpy-0.9c.tar.gz 29.6 kB Without provenance Details for lesscpy-0.9c.tar.gz

Release files / lesscpy-0.9c.tar.gz

Download URL lesscpy-0.9c.tar.gz
Size 29.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a07eb4034216ae5ab620e136c92bd1ee110502a9b5e91e6c3aabb4a40e536687
BLAKE2b-256 checksum
How to use checksums
246c013f9ebddf928cd852cf8bee1179028d46f64fb3a466cfd6eea4e00f9032
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for lesscpy 0.9c

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page