Creates a CSS stylesheet in the View

@method css
@param  {String} content CSS to put in a style tag
@param  {String} media   [Optional] Medias the stylesheet applies to
@return {Object}         Element created or undefined
176768
function ( content, media ) {
		var ss, css;

		ss = element.create( "style", {type: "text/css", media: media || "print, screen"}, utility.$( "head" )[0] );

		if ( ss.styleSheet ) {
			ss.styleSheet.cssText = content;
		}
		else {
			css = document.createTextNode( content );
			ss.appendChild( css );
		}

		return ss;
	}
581974
function (element, style) {
			var styleString = '';

			for (var key in style) {
				styleString += key + ': ' + style[key] + ';';
			}

			element.setAttribute('style', styleString);

			return element;
		}
756275
function(content) {
            this.content = content;
            if (this.content != null) this.generate = Q.fbind(_.template(this.content));
            return this;
        }
589338
function loadCss() {
        var linkElm, contentCss = editor.settings.codesample_content_css;

        if (editor.inline && addedInlineCss) {
          return;
        }

        if (!editor.inline && addedCss) {
          return;
        }

        if (editor.inline) {
          addedInlineCss = true;
        } else {
          addedCss = true;
        }

        if (contentCss !== false) {
          linkElm = editor.dom.create('link', {
            rel: 'stylesheet',
            href: contentCss ? contentCss : pluginUrl + '/css/prism.css'
          });

          editor.getDoc().getElementsByTagName('head')[0].appendChild(linkElm);
        }
      }
167869
function ( arg, media ) {
		return element.create( "link", {rel: "stylesheet", type: "text/css", href: arg, media: media || "print, screen"}, utility.$( "head" )[0] );
	}
1310140
function injectCss(cssList, content) {
        var css = cssList.reduce(function (prev, now) {
            var uri = now.uri;
            return prev + '<link rel="stylesheet" type="text/css" href="' + uri + '">\r\n';
        }, '');
        if (content.indexOf(settings.styleTag) !== -1) {
            content = content.replace(settings.styleTag, css);
        }
        else {
            content = content.replace(/<\/head>/, css + '\n$&');
        }
        return content;
    }
1053186
function appendStyle(style, doc) {
    if (!_.isString(style) || !doc) {
        console.log('invalid document or style string...', style, doc);
        return;
    }
    let docEl = (doc.getElementsByTagName('document')).item(0);
    let styleString = ['<style>', style, '</style>'].join('');
    let headTag = doc.getElementsByTagName('head');

    headTag = headTag && headTag.item(0);
    if (!headTag) {
        headTag = doc.createElement('head');
        docEl.insertBefore(headTag, docEl.firstChild);
    }
    headTag.innerHTML = styleString;
}
1225847
def from_css(Class, csstext, encoding=None, href=None, media=None, title=None, validate=None):
        
        styles = Class()
        cssStyleSheet = cssutils.parseString(csstext, encoding=encoding, href=href, media=media, title=title, validate=validate)
        for rule in cssStyleSheet.cssRules:
            if rule.type==cssutils.css.CSSRule.FONT_FACE_RULE:
                if styles.get('@font-face') is None: styles['@font-face'] = []
                styles['@font-face'].append(Class.styleProperties(rule.style))
            
            elif rule.type==cssutils.css.CSSRule.IMPORT_RULE:
                if styles.get('@import') is None: styles['@import'] = []
                styles['@import'].append("url(%s)" % rule.href)

            elif rule.type==cssutils.css.CSSRule.NAMESPACE_RULE:
                if styles.get('@namespace') is None: styles['@namespace'] = {}
                styles['@namespace'][rule.prefix] = rule.namespaceURI
            
            elif rule.type==cssutils.css.CSSRule.MEDIA_RULE:
                if styles.get('@media') is None: styles['@media'] = []
                styles['@media'].append(rule.cssText)
            
            elif rule.type==cssutils.css.CSSRule.PAGE_RULE:
                if styles.get('@page') is None: styles['@page'] = []
                styles['@page'].append(rule.cssText)

            elif rule.type==cssutils.css.CSSRule.STYLE_RULE:
                for selector in rule.selectorList:
                    sel = selector.selectorText
                    if sel not in styles:
                        styles[sel] = Class.styleProperties(rule.style)
            
            elif rule.type==cssutils.css.CSSRule.CHARSET_RULE:
                styles['@charset'] = rule.encoding

            elif rule.type==cssutils.css.CSSRule.COMMENT:   # comments are thrown away
                pass

            elif rule.type==cssutils.css.CSSRule.VARIABLES_RULE:
                pass
            
            else:
                log.warning("Unknown rule type: %r" % rule.cssText)

        return styles
962117
function createCssFile(target, cssContent) {
    var cssData = Buffer.from(cssContent);
    var writeFile$ = rxjs_1.bindNodeCallback(fs_1.writeFile);
    // Write css file to dist
    return writeFile$(target, cssData);
}
960325
function append(element, content) {
  if (isElement(content)) {
    element.appendChild(content);
  } else {
    const div = document.createElement('div');
    div.innerHTML = content || '';

    while (div.firstChild) {
      element.appendChild(div.firstChild);
    }
  }
}
1225610
function() {
		var doc = getDocument();

		// create the sheet to be re-used until limit is reached
		if (!CSSModule.cssCount) {
			CSSModule.currentStyleSheet = doc.createStyleSheet();
		}

		CSSModule.cssCount += 1;
		CSSModule.currentStyleSheet.cssText += this.source;

		// reset the count to force the creation of a new stylesheet
		if (CSSModule.cssCount === CSSModule.ie9MaxStyleSheets) {
			CSSModule.cssCount = 0;
		}
	}
620888
function provecss(string, options) {
  options             = options || {};
  this.browsers       = options.browsers;
  if (options.path) {
    this.import_path  = path.basename(options.path);
    this.import_base  = options.base || path.dirname(options.path);
  }
  this.import_filter  = options.import_filter;
  this.vars           = options.vars;
  this.media_match    = options.media_match;
  this.media_extract  = options.media_extract;

  //not run autoprefixer by default
  if (this.browsers) {
    string = prefixes(this.browsers).process(string).css;
  }

  //handle import inlining if any
  if (this.import_path) {
    var opts = {
      path: this.import_path,
      base: this.import_base,
      target: this.import_filter
    };
    string = rework(string).use(imprt(opts)).toString();
  }

  //filter media query if any
  if (this.media_match) {
    if (!this.media_match.width || !this.media_match.height) {
      throw new Error('Must provide device width and device height');
    }
    var extractOptions = {
      deviceOptions: {
        width: this.media_match.width,
        height: this.media_match.height,
        orientation: this.media_match.orientation || 'any'
      },
      extractQuery: this.media_extract
    };
    string = rework(string).use(move).use(extract(extractOptions)).toString();
  }

  if (this.vars) {
    string = rework(string).use(vars).toString();
  }

  return rework(string, options)
    .use(hex)
    .use(color)
    .use(calc)
    .toString(options);
}
796746
function (tagName) {

            // A pointer to the style might be already there or an element with the correct id might be there
            var tag = this.__styleTagPool[tagName];

            if (!tag) {
                var id = this.__TAG_PREFX + tagName;
                tag = ariaUtilsDom.getElementById(id);

                if (!tag) {
                    // If missing, create one
                    var document = Aria.$window.document;
                    var head = document.getElementsByTagName("head")[0];
                    tag = document.createElement("style");

                    tag.id = id;
                    tag.type = "text/css";
                    tag.media = "all"; // needed as the default media is screen in FF but all in IE

                    head.appendChild(tag);
                    tag = head.lastChild;
                }

                this.__styleTagPool[tagName] = tag;
            }
            return tag;
        }
1173105
function(document) {
      if (options.css) {
        util.importCss(options.css, document, options.cssId);
      }

      var child = host.toDom(document, options.html);
      domtemplate.template(child, options.data || {}, options.options || {});
      return child;
    }
986256
function() {

		// Create Dom element
		this._el.content_item   = TL.Dom.create("div", "tl-media-item tl-media-map tl-media-shadow", this._el.content);

		// Get Media ID
		this.media_id = this.data.url;

		// API Call
		this.mapframe = TL.Dom.create("iframe", "", this._el.content_item);
		window.stash = this;
		this.mapframe.width       = "100%";
		this.mapframe.height      = "100%";
		this.mapframe.frameBorder = "0";
		this.mapframe.src         = this.makeGoogleMapsEmbedURL(this.media_id, this.options.api_key_googlemaps);
		
		
		// After Loaded
		this.onLoaded();
	}
1343515
function $tag(tag, id, css) {
		var element = document.createElement(tag);

		if (id) {
			element.id = prefix + id;
		}

		if (css) {
			element.style.cssText = css;
		}

		return $(element);
    }
333887
function _process( content ) {
    var reg = /((?:\/\/.*?\n)|(?:\/\*[\s\S]*?\*\/))|(?:@import\s([\s\S]*?)(?:\n|$)(?!\s+[^{@]*\n))/ig;
    // var reg = /@import[\s\S]*?;/ig;
    var rUrl = /^url/i;
    var rEnd = /;$/;

    content = fixLineBreak( content );

    return content.replace( reg, function( all, comments, value ) {
        var files;

        value = value ? value.trim().replace( rEnd, '' ) : '';

        // If it's comments or If the @import has any media queries.
        if ( comments || /('|").*?\1\s+[^'"]+$/.exec(value) ) {
            return all;
        }

        files = value.split(/\s*,?\s+/m).map(function( value ) {
            var quote = '',
                match;

            value = value.trim();
            match = /^('|")(.*)\1$/.exec( value );

            if ( match ) {
                value = match[ 2 ];
                quote = match[ 1 ];
            }

            // If the file’s extension is .css.
            if ( /\.css$/i.exec( value ) ||

                // If the filename begins with http://.
                /^http/i.exec( value ) ||

                // If the filename is a url().
                /^url/i.exec( value ) ) {
                return '@import ' + quote + value + quote + ';';
            }

            return map.wrap( value );
        });

        return files.join('\n');
    });
}