Lime\Helper\Assets::style PHP Method

style() public method

Compile styles and return in a link tag
public style ( Array $assets, String $name, String $path = "", Float $cache, boolean $version = false ) : String
$assets Array
$name String
$path String
$cache Float
$version boolean
return String
    public function style($assets, $name, $path = "", $cache = 0, $version = false)
    {
        $path = $this->path($path);
        if (!$path) {
            return null;
        }
        $href = rtrim($this->pathToUrl($path), '/') . "/{$name}.css" . ($version ? "?ver={$version}" : "");
        $path .= "/{$name}.css";
        $tag = '<link href="' . $href . '" type="text/css" rel="stylesheet" />' . "\n";
        if ($cache && file_exists($path) && time() - filemtime($path) < $cache) {
            return $tag;
        }
        $result = $this->compile($assets, "css");
        if ($result) {
            file_put_contents($path, $result);
            return $tag;
        }
        return null;
    }