public function percent($value, $current_pixels)
    {
        if (strpos($value, '%') !== false) {
            $value = str_replace('%', '', $value) * 0.01 * $current_pixels;
        }

        return $value;
    }
public function percent($value, $current_pixels)
    {
        if (strpos($value, '%') !== false) {
            $value = str_replace('%', '', $value) * 0.01 * $current_pixels;
        }

        return $value;
    }
public function percent ( $ value , $ current_pixels ) { if ( strpos ( $ value , '%' ) !== false ) { $ value = str_replace ( '%' , '' , $ value ) * 0.01 * $ current_pixels ; } return $ value ; }
Accept a percentage and return it in pixels.

@param  string $value
@param  int $current_pixels
@return mixed
Accept a percentage and return it in pixels .