function sassy_compass__headers in Sassy 7.2
Same name and namespace in other branches
- 7.3 sassy_compass/functions/selectors.inc \sassy_compass__headers()
File
- extensions/
compass/ functions/ selectors.inc, line 30
Code
function sassy_compass__headers($from = false, $to = false) {
if (is_object($from)) {
$from = $from->value;
}
if (is_object($to)) {
$to = $to->value;
}
if (!$from || !is_numeric($from)) {
$from = 1;
}
if (!$to || !is_numeric($to)) {
$to = 6;
}
$from = (int) $from;
$to = (int) $to;
$output = array();
for ($i = $from; $i <= $to; $i++) {
$output[] = 'h' . $i;
}
return new SassString(implode(', ', $output));
}