public function apply_breakpoints($layout) { $css = ''; $breakpoints = $this->get_breakpoints(true); foreach ($breakpoints as $name => $point) { $this->_current_breakpoint = $point; $point_css = ''; $line_height = $point->get_line_height(); $point_css .= $point->get_frontend_rule($layout); $layout_view = new Upfront_Layout_View($layout); $point_css .= $layout_view->get_style_for($point, $this->get_grid_scope()); $width_pfx = $point->get_prefix(Upfront_GridBreakpoint::PREFIX_WIDTH); foreach ($layout['regions'] as $region) { // Cascade defaults $container = !empty($region['container']) ? $region['container'] : $region['name']; $region['sub'] = !empty($region['sub']) ? $region['sub'] : false; if ($container == $region['name']) { $container_view = new Upfront_Region_Container($region); $point_css .= $container_view->get_style_for($point, $this->get_grid_scope()); } if ($region['sub'] == 'top' || $region['sub'] == 'bottom') { $sub_container_view = new Upfront_Region_Sub_Container($region); $point_css .= $sub_container_view->get_style_for($point, $this->get_grid_scope()); $region_col = $point->get_columns(); } else { $region_col = $this->_get_property_col($region); } $region_col = $region_col ? $region_col : $this->_get_available_container_col($container, $layout['regions']); $region_row = $this->_get_property_row($region); $region_hide = $this->_get_breakpoint_data($region, 'hide'); $region_view = new Upfront_Region($region); $name = strtolower(str_replace(" ", "-", $region_view->get_name())); $point_css .= $region_view->get_style_for($point, $this->get_grid_scope()); $point_css .= $point->apply_col($region_col, $region, $this->get_grid_scope(), '#upfront-region-' . $name); if ($region_row) { $point_css .= $point->apply_row($region_row, $region, $this->get_grid_scope(), '#upfront-region-' . $name); } if (!$point->is_default() && $region['sub'] == 'fixed') { // @TODO we hide float region by default for responsive for now $region_hide = 1; } if ($region_hide == 1) { $point_css .= $point->apply_hide($region_hide, $region, $this->get_grid_scope(), '#upfront-region-' . $name); } $point_css .= $this->_apply_modules($region, $region_col); } if ($this->_debugger->is_active(Upfront_Debug::STYLE)) { $point_css .= $point->get_debug_rule($this->get_grid_scope()); } $css .= $point->wrap($point_css, $breakpoints); } return $css; }
public function wrap($out, $before = '', $after = '') { return parent::wrap($out, '', ''); }