create a style link

@param   mixed   style path data - will be passed to the assets interface for processing
@param   array   attributes to be placed on the link tag
@return  string
548670
public function style($src, $attr = array())
    {
        $src = $this->Assets->getStyle($src);
        $attr['href'] = $src;

        $attr = array_merge(
            array(
                'media' => 'screen',
                'rel' => 'stylesheet',
                'type' => 'text/css'
            ),
            $attr
        );

        return $this->tag('link', $attr);
    }
492415
public function styles()
	{
		$assets = array();
		
		foreach ($this->assets as $asset) {
			if ('css' !== $asset['ext'] && 'less' !== $asset['ext']) {
				continue;
			}
			
			$assets[] = $this->route ? $asset : $this->process($asset);
		}
		
		if (empty($assets)) {
			return '';
		}
		
		if ($this->route) {
			return $this->prepareForController($assets, 'style');
		}
		
		if ($this->combine) {
			$assets = $this->combine($assets, 'style');
		}
		
		$links = array();
		foreach ($assets as $asset) {
			$url = $this->cdn ? $this->cdn . $asset['url'] : $asset['url'];
			$links[] = HTML::style($url, $asset['attributes']);
		}
		
		return implode('', $links);
	}
166969
protected function _renderStyle($style, $link, $attribs = array())
    {
        $attribs = AnHelperArray::toString($attribs);

        if (!$link) {
            $html  = '<style type="text/css" '.$attribs.'>'."\n";
            $html .= trim($style['data']);
            $html .= '</style>'."\n";
        } else {
            $html = '<link type="text/css" rel="stylesheet" href="'.$style.'" '.$attribs.' />'."\n";
        }

        return $html;
    }
934563
private function appendStyles(array $styles)
    {
        if (empty($styles)) {
            return;
        }

        $string = '';
        $prependSemicolon = false;
        foreach ($styles as $key => $value) {
            if ($prependSemicolon) {
                $string .= '; ';
            }
            $prependSemicolon = true;
            $string .= $key.': '.$value;
        }

        $this->appendAttribute('style', $string);
    }
1182656
private function transformPathAnchors(PathInterface $path, StyleInterface $style)
    {

        $anchors = $path->getAnchors();
        $origin = $style->getTransformOrigin();
        $transformations = $style->getTransformations();

        if ($origin) {

            $bounds = $path->getBounds();

            //Map relative values to absolute values
            $origin = new Point($bounds->getWidth() * $origin->getX(), $bounds->getHeight() * $origin->getY());
        }

        return array_map(function (AnchorInterface $anchor) use ($transformations, $origin) {

            //Transform the anchor
            foreach ($transformations as $transformation) {

                $anchor = $transformation->transformAnchor($anchor, $origin);
            }

            return $anchor;
        }, $anchors);
    }
1263156
static public function css($path, $with_version = true, $return = false, $absolutely = false) {
        $href = $absolutely ? $path : self::path('static/' . $path);

        $query = array();
        \Comm\Misc::isProEnv() || $query['debug'] = 1;
        $with_version && $query['version'] = self::cssVer();
        $query && $href .= '?' . http_build_query($query);

        $result = "<link href=\"{$href}\" type=\"text/css\" rel=\"stylesheet\" />";
        if ($return) {
            return $result;
        } else {
            echo $result;
            return null;
        }
    }
1267544
public function getImageUrl($path, $style=null)
    {
        if (empty($style)){
            return $this->imageHost.$this->prefix.$path;
        }
        return $this->imageHost.$this->prefix.$path.'@!'.$style;
    }
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;
        }
    }
678640
private function css($file, $path = 'css', array $options = [])
    {
        $attr = array_key_exists('attr', $options) ? $options['attr'] : [];
        $attr = array_merge(['rel' => 'stylesheet'], $attr);
        $location = $this->location("{$path}/{$file}", $options);
        return sprintf(
            '<link href="%s" %s>',
            $location,
            $this->attributesStr($attr)
        );
    }
186901
function addLinkedStyleSheet(url, deferred) {
        var attributes = {
            type: "text/css",
            rel:  "stylesheet",
            href: url
        };

        var $link = $("<link/>").attr(attributes);

        if (deferred) {
            $link.on('load', deferred.resolve).on('error', deferred.reject);
        }

        $link.appendTo("head");

        return $link[0];
    }
1272623
public static function css($href, array $attrs = [])
    {
        $attrs = array_merge([
            'type' => 'text/css',
            'rel' => 'stylesheet',
            'href' => $href,
        ],
            $attrs);

        return static::tag('link', null, $attrs);
    }
406329
def style_url(path, css_name=nil)
#      $stderr.puts "style_url( #{path.inspect}, #{css_name.inspect} )"
      css_name ||= CSS_NAME
      if %r{^(https?:/)?/} =~ css_name
        return css_name
      else
        return HTMLGenerator.gen_url(path, css_name)
      end
    end
1149495
public function attributes(array $attributes): AssetInterface
    {
        if (is_null($this->getType())) {
            throw new AssetException('The asset must have a type.');
        }

        $hook = 'script' === $this->getType() ? 'script_loader_tag' : 'style_loader_tag';
        $key = strtolower(trim($this->getHandle()));
        $attributes = $this->html->attributes($attributes);

        $this->filter->add($hook, function ($tag, $handle) use ($attributes, $key) {
            if ($key !== $handle) {
                return $tag;
            }

            return preg_replace('/(src|href)(.+>)/', $attributes.'$1$2', $tag);
        });

        return $this;
    }
872989
public function create(RoutePath $path, array $attributes = []): string
    {
        $uri = new PathUri($path, $attributes);

        return (string)$uri;
    }
785457
public function style($url, $attributes = [], $secure = null)
    {
        $defaults = ['media' => 'all', 'type' => 'text/css', 'rel' => 'stylesheet'];

        $attributes = $attributes + $defaults;

        $attributes['href'] = $this->url->asset($url, $secure);

        return '<link' . $this->attributes($attributes) . '>' . PHP_EOL;
    }
125141
public static function link(
        string $content = null, 
        array $attributes = []
    ) : string
    {
        return self::tag("link", $content, $attributes);
    }
731373
public static function style($url, $attributes = array(), $secure = null)
    {
        $html = self::getInstance()->html;
        $args = func_get_args();
        return call_user_func_array(array($html, __FUNCTION__), $args);
    }