/** * Generate a link to a CSS file. With Stylist, this could actually generate * numerous style tags, due to CSS inheritance requirements. * * @param string $url * @param array $attributes * @param bool $secure * @return string */ public function style($url, $attributes = array(), $secure = null) { $styles = []; $theme = StylistFacade::current(); // If our theme has a parent, we want its stylesheet, as well. // @todo: This is dog-ugly - need to figure out a better approach. if ($theme->hasParent()) { $parent = StylistFacade::get($theme->getParent()); StylistFacade::activate($parent); $styles[] = $this->style($url, $attributes, $secure); StylistFacade::activate($theme); } $styles[] = $this->html->style($this->assetUrl($url), $attributes, $secure); return implode("\n", $styles); }
/** * Generate a link to a CSS file. * * @param string $url * @param array $attributes * @param bool $secure * @return \Illuminate\Support\HtmlString * @static */ public static function style($url, $attributes = array(), $secure = null) { return \Collective\Html\HtmlBuilder::style($url, $attributes, $secure); }