Recommend this page to a friend! |
Download .zip |
Info | View files (8) | Download .zip | Reputation | Support forum (1) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2010-09-02 (6 years ago) | Not enough user ratings | Total: 455 | All time: 5,828 This week: 987 |
Version | License | PHP version | Categories | |||
less-php 1.0 | BSD License | 5.0 | PHP 5, Text processing, Templates |
Description | Author | ||||||||||||||
This process can be used to parse and process Leaner CSS (LESS) files. |
|
Less.php let's you convert .less files into .css Versions -------- 0.0.1 - First official release (beta) 0.0.3 - Stable release; bug fixes; nested functions support; @if operator support How to Use ---------- Run on the console: lessc file.less > output.css If you want you can check the lessc file so you can use the class inside your code. Supported --------- - variables - mixins - nested rules - operations - comments (C-style and inline) - math functions (min, max, avg, round, ceil, floor) - color functions (lighten, darken, greyscale) Missing ------- - namespaces & accessors TBD --- - dataurl() function to embed images in css - suggestions? EXAMPLE ------- @light-blue: #111 + #111; @default-border: .4em; @max-border: 2em; /** * First comment **/ .bordered (@radius: 3px; @shadow-color: rgba(100, 100, 100, .5)) { border-radius: @radius; -moz-border-radius: @radius; -webkit-border-radius: @radius; box-shadow: 0 0 3px @shadow-color; -moz-box-shadow: 0 0 3px @shadow-color; -webkit-box-shadow: 0 0 3px @shadow-color; } #header, #content { // second comment @red-color: #abcdef + #111; // other comment a:active, a:hover { text-decoration: none; // one more comment border: @default-border + .2 solid black; background: url(some/file.png) left center repeat-x; } color: @light-blue * 2; .bordered ( 5px, ); :hover { color: @red-color; } .item { color: #af6788; } &.item { color: red; } } #nav { margin: min(@max-border, 1em, .5em); color: darken(#ccc, 20%); // same as lighten(#ccc, -20%) background: greyscale(#f00); } .foo { &.bar { color: black }} |
Files | / | lib |
File | Role | Description |
---|---|---|
common.less.class.php | Class | Base class (common methods) |
entities.less.class.php | Class | Entities found on LESS code (Scope, Declaration, Property, ..) |
functions.less.class.php | Aux. | Extended functions |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.
Related pages |
GitHub Less.php on GitHub |
Pages that reference this package |
Do more with LESS LESS extends CSS with variables, mixins, methods and nested rules. In short, it makes CSS a lot easier to work with, and speeds up your web design... |