You are here

protected function AvailabilityCalendarsCssGenerator::addCssLengthDeclaration in Availability Calendars 7.2

Same name and namespace in other branches
  1. 6.2 availability_calendars.styles.inc \AvailabilityCalendarsCssGenerator::addCssLengthDeclaration()

Creates a CSS declaration for a length property.

See also

addCssDeclaration for param and return info.

5 calls to AvailabilityCalendarsCssGenerator::addCssLengthDeclaration()
AvailabilityCalendarsCssGenerator::createDaysCss in ./availability_calendars.styles.inc
AvailabilityCalendarsCssGenerator::createHeaderCss in ./availability_calendars.styles.inc
AvailabilityCalendarsCssGenerator::createStatesCss in ./availability_calendars.styles.inc
AvailabilityCalendarsCssGenerator::createTableCss in ./availability_calendars.styles.inc
AvailabilityCalendarsCssGenerator::createWeekNotesCss in ./availability_calendars.styles.inc

File

./availability_calendars.styles.inc, line 780

Class

AvailabilityCalendarsCssGenerator

Code

protected function addCssLengthDeclaration($category, $name) {
  $value = $this
    ->getStyle($category, $name);

  // Pixels are the default for numeric values
  if (!empty($value) && is_numeric($value)) {
    $value .= 'px';
  }
  return $this
    ->cssDeclaration($name, $value);
}