Allow to add complementary strylesheets


param:
stylesheets:
- path/css.css
- { path: path/css.css, media: all }

@return array
495438
public function getStylesheets()
    {
        $parse_stylesheets = function ($params, $stylesheets) {
            foreach ($params as $css) {
                if (is_string($css)) {
                    $css = array(
                        'path'  => $css,
                        'media' => 'all',
                    );
                }

                $stylesheets[] = $css;
            }

            return $stylesheets;
        };

        // From config.yml
        $stylesheets = $parse_stylesheets(
            $this->getGenerator()->getContainer()
                 ->getParameter('admingenerator.stylesheets', array()), array()
        );

        // From generator.yml
        $stylesheets = $parse_stylesheets(
            $this->getVariable('stylesheets', array()), $stylesheets
        );

        return $stylesheets;
    }
1021200
public function createStylesheetPaths(array $stylesheets)
    {
        $sheets = array();

        foreach ($stylesheets as $key => $sheet) {
            if (!$this->isExternalStylesheet($sheet)) {
                // assetic version removal
                $sheet = str_replace(strrchr($sheet, 'css?'), 'css', $sheet);
                $sheet = $this->getBasePath() . $sheet;
            }

            $sheets[] = $sheet;
        }

        return $sheets;
    }
351512
function generateStylesheets(done) {
			// Convert codepoints to array of strings
			var codepoints = [];
			_.each(o.glyphs, function(name) {
				codepoints.push(o.codepoints[name].toString(16));
			});
			o.codepoints = codepoints;

			// Prepage glyph names to use as CSS classes
			o.glyphs = _.map(o.glyphs, classnameize);

			o.stylesheets.sort(function(a, b) {
				return a === 'css' ? 1 : -1;
			}).forEach(generateStylesheet);

			done();
		}
622267
def find_stylesheet!(name)
      errors = []
      @providers.each do |provider|
        begin
          return provider.find_stylesheet!(name)
        rescue CssNotFound => error
          errors << error
        end
      end
      raise ProvidersFailed.new(name, self, errors)
    end
396153
def css
      css_files = []
      @assets.each do |type, path|
        case type
          when :folder
            # Don't import any css/scss files that start with an underscore, so scss partials
            # aren't imported by default:
            #  http://sass-lang.com/guide
            base_path = base(path)
            css_files += Dir["#{path}/**/[^_]*.{css,scss,sass}"].sort.map do |folder|
              local_path = folder[path.size..-1].gsub(/[.](scss|sass)$/, '')
              css_path = @app_url + '/' + base_path + local_path
              css_path += '.css' unless css_path =~ /[.]css$/
              css_path
            end
          when :css_file
            css_files << path
        end
      end

      css_files.uniq
    end
1248682
def stylesheet_bundle(key, files = nil)
      stylesheet_bundles[key] = StylesheetBundle.new(self, key.to_s, files)
    end
467201
def styles(styles)
      styles.each do |k,v|
        style = SimplerTiles::Style.new k, v
        add_style style
      end
    end
142621
public static function addStylesheet($stylesheet)
	{
		if (!$stylesheet)
		{
			return;
		}

		if (substr($stylesheet, -4) != '.css')
		{
			$stylesheet .= '.css';
		}

		$root = self::base();

		if ($document = self::app('document'))
		{
			$document->addStyleSheet(rtrim(Request::base(true), '/') . $stylesheet . '?v=' . filemtime($root . $stylesheet));
		}
	}
1143635
public function loadSiteStyles()
    {
        $this->loadCdnStyles();

        $mainHandle = 'site';
        $this->loadMainStyleByHandle($mainHandle);

        $viewHandle = $this->getViewHandle();

        if (file_exists(sprintf('%s/css/views/%s.css', $this->paths->getThemeAssetsDir(), $viewHandle))) {
            $viewSrc = sprintf('%s/css/views/%s.css', $this->paths->getThemeAssetsUri(), $viewHandle);
            $this->loadStyle($viewHandle, $viewSrc, [$mainHandle]);
        }
    }
100125
public function getSheets()
    {
        $this->throwIfBookIsNotAvailable();

        $externalSheets = [];
        $worksheets = $this->getWorkbook()->getWorksheets();

        /** @var Common\Internal\WorksheetInterface $worksheet */
        foreach ($worksheets as $worksheet) {
            $externalSheets[] = $worksheet->getExternalSheet();
        }

        return $externalSheets;
    }
469733
function stylesheet() {
    var rulesList = rules();

    return {
      type: 'stylesheet',
      stylesheet: {
        source: options.source,
        rules: rulesList,
        parsingErrors: errorsList
      }
    };
  }
658046
function loadStylesheetsFallingBack(stylesheets) {
    var n = stylesheets.length;
    function load(i) {
      if (i === n) { return; }
      var link = doc.createElement('link');
      link.rel = 'stylesheet';
      link.type = 'text/css';
      if (i + 1 < n) {
        // http://pieisgood.org/test/script-link-events/ indicates that many
        // versions of IE do not support onerror on <link>s, though
        // http://msdn.microsoft.com/en-us/library/ie/ms535848(v=vs.85).aspx
        // indicates that recent IEs do support error.
        link.error = link.onerror = function () { load(i + 1); };
      }
      link.href = stylesheets[i];
      head.appendChild(link);
    }
    load(0);
  }
131543
def include_stylesheets(*packages)
      options = packages.extract_options!
      return html_safe(individual_stylesheets(packages, options)) unless should_package?
      disabled = (options.delete(:embed_assets) == false) || (options.delete(:embed_images) == false)
      return html_safe(packaged_stylesheets(packages, options)) if disabled || !Jammit.embed_assets
      return html_safe(embedded_image_stylesheets(packages, options))
    end
620384
def merge_stylesheets(Class, fn, *cssfns):
        
        stylesheet = Class(fn=fn)
        for cssfn in cssfns:
            css = Class(fn=cssfn)
            for sel in sorted(css.styles.keys()):
                if sel not in stylesheet.styles:
                    stylesheet.styles[sel] = css.styles[sel]
                else: 
                    for prop in [prop for prop in css.styles[sel] if prop not in stylesheet.styles[sel]]:
                        stylesheet.styles[sel][prop] = css.styles[sel][prop]
        return stylesheet
1083349
public function getStyleSheetsHtml()
    {
        $styleSheets = '';
        if (!isset($this->styles)) {
            return $styleSheets;
        }

        foreach ($this->styles as $s) {
            $styleSheets .= '<link rel="stylesheet" type="text/css" href="' . $s . '"/>' . "\n";
        }

        return $styleSheets;
    }
22538
public static function css($stylesheets = array(), $attr = array(), $group = NULL, $raw = false)
	{
		return static::instance()->css($stylesheets, $attr, $group, $raw);
	}
500230
function( css ) {
			css = [].concat( css );
			var item,
				retval = [];
			for ( var i = 0; i < css.length; i++ ) {
				if ( ( item = css[ i ] ) ) {
					// Is CSS style text ?
					if ( /@import|[{}]/.test( item ) )
						retval.push( '<style>' + item + '</style>' );
					else
						retval.push( '<link type="text/css" rel=stylesheet href="' + item + '">' );
				}
			}
			return retval.join( '' );
		}