LESS API

[edit] Please Note

These docs are now deprecated, we have a new Support area located here

(Difference between revisions)
(Created page with "== LESS API == LESS extends CSS with the use of dynamic "variables, mixins, operations, and functions". '''Variables''' allow you to define widely used values in a single pla...")
 
Line 1: Line 1:
== LESS API ==
+
== Introduction ==
 
LESS extends CSS with the use of dynamic "variables, mixins, operations, and functions".
 
LESS extends CSS with the use of dynamic "variables, mixins, operations, and functions".
  
Line 10: Line 10:
 
'''Functions''' work in a one-to-one relationship with JavaScript and allow you to manipulate values however you want.
 
'''Functions''' work in a one-to-one relationship with JavaScript and allow you to manipulate values however you want.
  
 +
== PageLines LESS ==
 +
The default variables (or constants):
 +
* @pl-base => ''$this->base_color''
 +
* @pl-text => ''pl_hashify( pl_text_color() )''
 +
* @pl-link => ''pl_hashify( pl_link_color() )''
 +
* @pl-header => ''pl_hashify( pl_header_color() )''
 +
* @pl-footer => ''pl_hashify( pl_footer_color() )''
 +
* @invert-dark => ''$this->invert()''
 +
* @invert-light => ''$this->invert('light')''
 +
* @font-size => ''$fontsize . 'px'''
 +
* @line-height => ''page_line_height($fontsize, $content_width) . 'px'''
  
 
=== External References ===
 
=== External References ===
 +
* [http://lesscss.org/ lesscss Home Page]
 
* [http://leafo.net/lessphp lessphp Home Page]
 
* [http://leafo.net/lessphp lessphp Home Page]
 
* [http://leafo.net/lessphp/docs/ lessphp Official Documentation]
 
* [http://leafo.net/lessphp/docs/ lessphp Official Documentation]
* [http://lesscss.org/ lesscss Home Page]
 
 
  
 
----
 
----
 +
 
[[Category:Draft]]
 
[[Category:Draft]]
 
[[Category:New Page]]
 
[[Category:New Page]]
 
[[Category:API]]
 
[[Category:API]]

Revision as of 20:01, 15 March 2012

Introduction

LESS extends CSS with the use of dynamic "variables, mixins, operations, and functions".

Variables allow you to define widely used values in a single place. Then you are able to re-use them throughout the style sheet. Making global changes then becomes as easy as changing one line of code.

Mixins allow you take all of the properties of one class and simply include them as the class name in another class. It’s just like variables, but for whole classes.

Operations let you add, subtract, divide and multiply property values and colors, giving you the power to create complex relationships between properties.

Functions work in a one-to-one relationship with JavaScript and allow you to manipulate values however you want.

PageLines LESS

The default variables (or constants):

  • @pl-base => $this->base_color
  • @pl-text => pl_hashify( pl_text_color() )
  • @pl-link => pl_hashify( pl_link_color() )
  • @pl-header => pl_hashify( pl_header_color() )
  • @pl-footer => pl_hashify( pl_footer_color() )
  • @invert-dark => $this->invert()
  • @invert-light => $this->invert('light')
  • @font-size => $fontsize . 'px'
  • @line-height => page_line_height($fontsize, $content_width) . 'px'

External References