src/HtmlPage.php
public function addCss(string $css, array $attributes = []) : self
    {
        if (substr($css, -4) == '.css' ||
            substr($css, 0, 2) == '//' ||
            substr($css, 0, 4) == 'http'
        ) {
            list($path, $hash) = $this->getAssetData($css);

            $meta = new HtmlElement('<link />');

            if ($hash) {
                $meta->addAttribute('name', str_replace(['.css', '.', '/', ':'], ['', '_', '_', '_'], $css));
            }

            $meta->addAttributes([
                'type' => 'text/css',
                'rel' => 'stylesheet',
                'href' => (string) $path,
            ]);
        } else {
            $meta = new HtmlElement('<style>');
            $meta->addAttributes($attributes);
            $meta->addAttribute('type', 'text/css')
                ->setContent($css);
        }

        $this->head->add($meta);

        return $this;
    }
public function addCss(string $css, array $attributes = []) : self
    {
        if (substr($css, -4) == '.css' ||
            substr($css, 0, 2) == '//' ||
            substr($css, 0, 4) == 'http'
        ) {
            list($path, $hash) = $this->getAssetData($css);

            $meta = new HtmlElement('<link />');

            if ($hash) {
                $meta->addAttribute('name', str_replace(['.css', '.', '/', ':'], ['', '_', '_', '_'], $css));
            }

            $meta->addAttributes([
                'type' => 'text/css',
                'rel' => 'stylesheet',
                'href' => (string) $path,
            ]);
        } else {
            $meta = new HtmlElement('<style>');
            $meta->addAttributes($attributes);
            $meta->addAttribute('type', 'text/css')
                ->setContent($css);
        }

        $this->head->add($meta);

        return $this;
    }
Add Css file inclusion.

@param string $css
@param array $attributes

@return $this|self