<?php
 
 
include_once 'class.css2less.php';
 
 
# sample: creates less source
 
 
$css = <<<EOD
 
#sidebar {
 
  padding: 0;
 
  margin: 0;
 
  font-size: 11px;
 
  width: 217px;
 
  position: absolute;
 
  top: 45px;
 
  left: 0;
 
  background-color: #EFEFEF;
 
  color: #444;
 
}
 
 
#sidebar h3 {
 
  clear: both;
 
  padding: 0;
 
  font-size: 12px;
 
  font-weight: bold;
 
}
 
 
#sidebar input[type='text'],
 
#sidebar input[type='password'],
 
#sidebar textarea {
 
  width: 186px;
 
  padding: 6px 5px;
 
  color: #626262;
 
  font-family: "Lucida Grande", "Lucida Sans", "Lucida Sans Unicode", "Luxi Sans", Tahoma, sans-serif;
 
  font-size: 1em;
 
  border: 1px solid #CCC;
 
  box-shadow: inset 0 1px 3px #E4E4E4;
 
}
 
 
EOD;
 
 
$cls = new CSS2LESS($css);
 
$less = $cls->convert();
 
echo sprintf('<pre>%s</pre>', $less);
 
 
 |