public function css($file, $options = [])
    {
        $file = $this->_addExt($file, '.css');
        if (!$this->collection()->contains($file)) {
            throw new RuntimeException(
                "Cannot create a stylesheet tag for a '$file'. That build is not defined."
            );
        }
        $output = '';
        if (!empty($options['raw'])) {
            unset($options['raw']);
            $target = $this->collection()->get($file);
            foreach ($target->files() as $part) {
                $path = $this->_relativizePath($part->path());
                if (DS === '\\') {
                    $path = str_replace(DS, '/', $path);
                }
                $output .= $this->Html->css($path, $options);
            }

            return $output;
        }

        $url = $this->url($file, $options);
        unset($options['full']);

        return $this->Html->css($url, $options);
    }
public function css($file, $options = [])
    {
        $file = $this->_addExt($file, '.css');
        if (!$this->collection()->contains($file)) {
            throw new RuntimeException(
                "Cannot create a stylesheet tag for a '$file'. That build is not defined."
            );
        }
        $output = '';
        if (!empty($options['raw'])) {
            unset($options['raw']);
            $target = $this->collection()->get($file);
            foreach ($target->files() as $part) {
                $path = $this->_relativizePath($part->path());
                if (DS === '\\') {
                    $path = str_replace(DS, '/', $path);
                }
                $output .= $this->Html->css($path, $options);
            }

            return $output;
        }

        $url = $this->url($file, $options);
        unset($options['full']);

        return $this->Html->css($url, $options);
    }
public function css ( $ file , $ options = [ ] ) { $ file = $ this -> _addExt ( $ file , '.css' ) ; if ( ! $ this -> collection ( ) -> contains ( $ file ) ) { throw new RuntimeException ( "Cannot create a stylesheet tag for a '$file'. That build is not defined." ) ; } $ output = '' ; if ( ! empty ( $ options [ 'raw' ] ) ) { unset ( $ options [ 'raw' ] ) ; $ target = $ this -> collection ( ) -> get ( $ file ) ; foreach ( $ target -> files ( ) as $ part ) { $ path = $ this -> _relativizePath ( $ part -> path ( ) ) ; if ( DS === '\\' ) { $ path = str_replace ( DS , '/' , $ path ) ; } $ output .= $ this -> Html -> css ( $ path , $ options ) ; } return $ output ; } $ url = $ this -> url ( $ file , $ options ) ; unset ( $ options [ 'full' ] ) ; return $ this -> Html -> css ( $ url , $ options ) ; }
Create a CSS file. Will generate link tags
for either the dynamic build controller, or the generated file if it exists.

To create build files without configuration use addCss()

Options:

- All options supported by HtmlHelper::css() are supported.
- `raw` - Set to true to get one link element for each file in the build.

@param string $file A build target to include.
@param array $options An array of options for the stylesheet tag.
@throws RuntimeException
@return string A stylesheet tag
Create a CSS file . Will generate link tags for either the dynamic build controller or the generated file if it exists .