Push CSS to the document

@param   string  $stylesheet  Stylesheet or styles to add
@param   string  $extension   Extension name, e.g.: com_example, mod_example, plg_example_test
@param   array   $attributes  Attributes
@return  object
12528
public function css($stylesheet = '', $extension = null, $attributes = array())
	{
		$extension = $extension ?: $this->detectExtensionName();

		$attr = array_merge(array(
			'type'    => 'text/css',
			'media'   => null,
			'attribs' => array()
		), $attributes);

		$asset = new Stylesheet($extension, $stylesheet);

		$asset = $this->isSuperGroupAsset($asset);

		if ($asset->exists())
		{
			if ($asset->isDeclaration())
			{
				\App::get('document')->addStyleDeclaration($asset->contents());
			}
			else
			{
				\App::get('document')->addStyleSheet($asset->link(), $attr['type'], $attr['media'], $attr['attribs']);
			}
		}

		return $this;
	}
1144292
public function addCss($css = array())
	{
		foreach ($css as $file => $options)
		{
			$this->stylesheets = array_add($this->stylesheets, $file, $options);
		}
	}
24450
protected function setCssClass(Attributes $attributes)
    {
        $attributes->addClass('btn');

        if ($this->cssID[1] == '') {
            $attributes->addClass('btn-default');
        } else {
            $attributes->addClass($this->cssID[1]);
        }
    }
329996
public function process($paths, $absolutePaths, $attributes)
    {
        $url = url();
        $attributesAsText = $this->attributesArrayToText($attributes);

        foreach ($paths as $path)
        {
            print "<link href=\"{$url}{$path}\" {$attributesAsText} rel=\"stylesheet\" type=\"text/css\">" . PHP_EOL;
        }
    }
735246
public static function createToolbar(array $attributes = array(), $fromFieldset = false)
    {
        $toolbar = new Toolbar();
        static::applyAttributes($toolbar, $attributes, $fromFieldset);

        return $toolbar;
    }
544810
public void pushStylesheet(Stylesheet s)
  {

    if (m_stylesheets.size() == 0)
      m_stylesheetRoot = (StylesheetRoot) s;

    m_stylesheets.push(s);
  }
1098713
protected function addStyleElementToDocument($css)
    {
        $styleElement = $this->domDocument->createElement('style', $css);
        $styleAttribute = $this->domDocument->createAttribute('type');
        $styleAttribute->value = 'text/css';
        $styleElement->appendChild($styleAttribute);

        $headElement = $this->getHeadElement();
        $headElement->appendChild($styleElement);
    }
48796
public function addStyles($styles, $styleValue = false)
    {
        $currentStyles = $this->unpackStylesArray();

        if (is_array($styles)) {
            $currentStyles = array_merge($currentStyles, $styles);
        } elseif ($styleValue) {
            $currentStyles[$styles] = $styleValue;
        }

        $this->packStylesArray($currentStyles);

        return $this;
    }
1331403
public function withExtensions(Ext\Extension ...$exts): Extensions
    {
        $obj = clone $this;
        foreach ($exts as $ext) {
            $obj->_extensions[$ext->oid()] = $ext;
        }
        return $obj;
    }
147791
public function addStyle(Style $style)
    {
        if (!in_array($style, $this->styles, true)) {
            array_push($this->styles, $style);
        }
        return $this;
    }
317001
public function createStylesFile($styleHelper)
    {
        $stylesXmlFileContents = $styleHelper->getStylesXMLFileContent();
        $this->createFileWithContents($this->xlFolder, self::STYLES_XML_FILE_NAME, $stylesXmlFileContents);

        return $this;
    }
1083240
public function css($name, $attributes = [])
    {
        $this->getLayout()->css($name, $attributes)->attachTo($this);
        return $this;
    }
1110192
public static function style($file, array $attributes = null)
    {
        $attributes['href'] = $file;
        $attributes['rel'] = empty($attributes['rel']) ? 'stylesheet' : $attributes['rel'];
        $attributes['type'] = 'text/css';

        return (new Link($attributes))->render();
    }
281948
public static function buildAttrs(array $attributes, array $cssClasses = []): string
    {
        $output = '';
        if ($cssClasses) {
            if (array_key_exists('class', $attributes) && $attributes['class']) {
                $attributes['class'] .= ' ' . implode(' ', $cssClasses);
            } else {
                $attributes['class'] = implode(' ', $cssClasses);
            }
        }
        foreach ($attributes as $key => $value) {
            $output .= ' ' . $key . ($value !== null ? '="' . str_replace('"', '\"', $value) . '"' : '');
        }
        return $output;
    }
985895
public function setStyle(array $css_properties=[]) :self {
		// init the style attribute is it didn't exist already
		isset($this->attributes['style']) ?: $this->attributes['style'] = '';
		// for each of the css properties
		foreach($css_properties as $css_property => $css_value) {
			// add them to the already existing ones
			$this->attributes['style'] .= $css_property.':'.$css_value.';';
		}
		// return self
		return($this);
	}
1106414
public function appendStylesheet($href, $media = null, array $attributes = [], $priority = false)
    {
        static $counter = 0;
        
        $attributes['rel'] = 'stylesheet';
        $attributes['href'] = $href;
        //$attributes['type'] = 'text/css';
        $media && $attributes['media'] = $media;
        $this->links[$priority == 'high' ? $counter + 1000 : $counter] = Html::buildHtmlElement('link', $attributes);
        $counter++;
        return $this;
    }
725687
public function addStyles(array $styles)
    {
        if (!$this->styleSet) {
            $this->styleSet = new DefaultStyleSet();
        }

        $this->styleSet->merge($styles);

        return $this;
    }