Builds the {@link FrameTree}, loads any CSS and applies the styles to
the {@link FrameTree}
507682
private function processHtml()
    {
        $this->tree->build_tree();

        $this->css->load_css_file(Stylesheet::getDefaultStylesheet(), Stylesheet::ORIG_UA);

        $acceptedmedia = Stylesheet::$ACCEPTED_GENERIC_MEDIA_TYPES;
        $acceptedmedia[] = $this->options->getDefaultMediaType();

        // <base href="" />
        $base_nodes = $this->dom->getElementsByTagName("base");
        if ($base_nodes->length && ($href = $base_nodes->item(0)->getAttribute("href"))) {
            list($this->protocol, $this->baseHost, $this->basePath) = Helpers::explode_url($href);
        }

        // Set the base path of the Stylesheet to that of the file being processed
        $this->css->set_protocol($this->protocol);
        $this->css->set_host($this->baseHost);
        $this->css->set_base_path($this->basePath);

        // Get all the stylesheets so that they are processed in document order
        $xpath = new DOMXPath($this->dom);
        $stylesheets = $xpath->query("//*[name() = 'link' or name() = 'style']");

        /** @var \DOMElement $tag */
        foreach ($stylesheets as $tag) {
            switch (strtolower($tag->nodeName)) {
                // load <link rel="STYLESHEET" ... /> tags
                case "link":
                    if (mb_strtolower(stripos($tag->getAttribute("rel"), "stylesheet") !== false) || // may be "appendix stylesheet"
                        mb_strtolower($tag->getAttribute("type")) === "text/css"
                    ) {
                        //Check if the css file is for an accepted media type
                        //media not given then always valid
                        $formedialist = preg_split("/[\s\n,]/", $tag->getAttribute("media"), -1, PREG_SPLIT_NO_EMPTY);
                        if (count($formedialist) > 0) {
                            $accept = false;
                            foreach ($formedialist as $type) {
                                if (in_array(mb_strtolower(trim($type)), $acceptedmedia)) {
                                    $accept = true;
                                    break;
                                }
                            }

                            if (!$accept) {
                                //found at least one mediatype, but none of the accepted ones
                                //Skip this css file.
                                break;
                            }
                        }

                        $url = $tag->getAttribute("href");
                        $url = Helpers::build_url($this->protocol, $this->baseHost, $this->basePath, $url);

                        $this->css->load_css_file($url, Stylesheet::ORIG_AUTHOR);
                    }
                    break;

                // load <style> tags
                case "style":
                    // Accept all <style> tags by default (note this is contrary to W3C
                    // HTML 4.0 spec:
                    // http://www.w3.org/TR/REC-html40/present/styles.html#adef-media
                    // which states that the default media type is 'screen'
                    if ($tag->hasAttributes() &&
                        ($media = $tag->getAttribute("media")) &&
                        !in_array($media, $acceptedmedia)
                    ) {
                        break;
                    }

                    $css = "";
                    if ($tag->hasChildNodes()) {
                        $child = $tag->firstChild;
                        while ($child) {
                            $css .= $child->nodeValue; // Handle <style><!-- blah --></style>
                            $child = $child->nextSibling;
                        }
                    } else {
                        $css = $tag->nodeValue;
                    }

                    $this->css->load_css($css, Stylesheet::ORIG_AUTHOR);
                    break;
            }
        }
    }
327799
function loadCss (css, name) {
  if (css) {
    cssLoader.insertStyleElement(document, document.head, css, name, false)
  }
}
668512
public static HtmlTree SPAN(String id, HtmlStyle styleClass, Content body) {
        HtmlTree htmltree = new HtmlTree(HtmlTag.SPAN, nullCheck(body));
        htmltree.addAttr(HtmlAttr.ID, nullCheck(id));
        if (styleClass != null)
            htmltree.addStyle(styleClass);
        return htmltree;
    }
121330
public void addClassContentTree(Content contentTree, Content classContentTree) {
        if (configuration.allowTag(HtmlTag.MAIN)) {
            mainTree.addContent(classContentTree);
            contentTree.addContent(mainTree);
        } else {
            contentTree.addContent(classContentTree);
        }
    }
1058584
def build_static(self):
        
        if not os.path.isdir(self.build_static_dir):
            os.makedirs(self.build_static_dir)
        copy_tree(self.static_dir, self.build_static_dir)
        if self.webassets_cmd:
            self.webassets_cmd.build()
1178990
function buildCss(isRtl) {
  const mdlSrcs = gulp.src('stylesheet/mdl.scss')
      .pipe(sass.sync().on('error', sass.logError))
      .pipe(cssInlineImages({
        webRoot: 'node_modules/material-design-lite/src',
      }));
  const dialogPolyfillSrcs = gulp.src(
      'node_modules/dialog-polyfill/dialog-polyfill.css');
  let firebaseSrcs = gulp.src('stylesheet/*.css');

  // Flip left/right, ltr/rtl for RTL languages.
  if (isRtl) {
    firebaseSrcs = firebaseSrcs.pipe(flip.gulp());
  }

  const outFile = isRtl ? 'firebaseui-rtl.css' : 'firebaseui.css';
  return streamqueue({objectMode: true},
      mdlSrcs, dialogPolyfillSrcs, firebaseSrcs)
      .pipe(concatCSS(outFile))
      .pipe(cleanCSS())
      .pipe(gulp.dest(DEST_DIR));
}
459501
def __generate_tree(self, top, src, resources, models, ctrls, views, utils):
        """"""
        res = self.__mkdir(top)
        for fn in (src, models, ctrls, views, utils): res = self.__mkpkg(fn) or res
        res = self.__mkdir(resources) or res
        res = self.__mkdir(os.path.join(resources, "ui", "builder")) or res
        res = self.__mkdir(os.path.join(resources, "ui", "styles")) or res
        res = self.__mkdir(os.path.join(resources, "external")) or res
        return res
403659
function buildCSS(src, filename, dest, applyHeader) {
  dest = dest || config.dist.cssPath;
  applyHeader = applyHeader || false;

  return gulp.src(src)
    .pipe(sass({
      includePaths: [config.src.scssPath, config.packagesPath]
    })
      .on('error', sass.logError))
    .pipe(cleanCSS())
    .pipe(autoprefixer({
      // Supported browsers added in package.json ("browserslist")
      cascade: false
    }))
    .pipe(gulpif(applyHeader, header(config.prj.header, {
      config: config
    })))
    // Remove charset rule (if present) and add to the first
    // line of the stylesheet (@charset must be on the first line)
    .pipe(replace('@charset "UTF-8";', ''))
    .pipe(header('@charset "UTF-8";\n'))
    .pipe(rename(filename))
    .pipe(gulp.dest(dest));
}
76090
function (onlyCSSDep) {
            var classes = this._cssClasses;
            if (!classes) {
                if (this._cfg.isRootTemplate) {
                    // PTR 05086835: load the global CSS here, and remember that it was loaded
                    var deps = ['aria.templates.GlobalStyle'];
                    if (aria.widgets && aria.widgets.AriaSkin) {
                        deps.push('aria.templates.LegacyGeneralStyle');
                    }
                    ariaTemplatesCSSMgr.loadWidgetDependencies('aria.templates.Template', deps);
                    this._globalCssDepsLoaded = true;
                }
                // Load the CSS dependencies, the style should be added before the html
                classes = ariaTemplatesCSSMgr.loadDependencies(this);
                this._cssClasses = classes; // save classes for later calls
            }
            if (onlyCSSDep) {
                return classes.join(" ");
            }
            var classNames = ["xTplContent"];
            // Add also the classes used by the CSS manager to scope a dependency
            if (classes.length) {
                classNames = classNames.concat(classes);
            }
            return ariaCoreTplClassLoader.addPrintOptions(classNames.join(" "), this._cfg.printOptions);
        }
180682
public HtmlTree getStyleSheetProperties() {
        String filename = configuration.stylesheetfile;
        DocPath stylesheet;
        if (filename.length() > 0) {
            DocFile file = DocFile.createFileForInput(configuration, filename);
            stylesheet = DocPath.create(file.getName());
        } else {
            stylesheet = DocPaths.STYLESHEET;
        }
        DocPath p = relativePath.resolve(stylesheet);
        HtmlTree link = HtmlTree.LINK("stylesheet", "text/css", p.getPath(), "Style");
        return link;
    }
1215837
function postcssToHTML(root, builder) {
	function toString(node) {
		if ('atrule' === node.type) {
			return atruleToString(node);
		} if ('rule' === node.type) {
			return ruleToString(node);
		} else if ('decl' === node.type) {
			return declToString(node);
		} else if ('comment' === node.type) {
			return commentToString(node);
		} else {
			return node.nodes ? node.nodes.map(childNodes => toString(childNodes)).join('') : '';
		}
	}

	function replaceVars(string) {
		return string
			.replace(/:?--[\w-]+/g, '<span class=css-var>$&</span>')
	}

	function replaceVarsAndFns(string) {
		return replaceVars(string)
			.replace(/(:?[\w-]+)\(/g, '<span class=css-function>$1</span>(')
			.replace(/"[^"]+"/g, '<span class=css-string>$&</span>')
	}

	function atruleToString(atrule) {
		return `${atrule.raws.before||''}<span class=css-atrule><span class=css-atrule-name>@${atrule.name}</span>${atrule.raws.afterName||''}<span class=css-atrule-params>${replaceVarsAndFns(atrule.params)}</span>${atrule.raws.between||''}${atrule.nodes?`<span class=css-block>{${atrule.nodes.map(node => toString(node)).join('')}${atrule.raws.after||''}}</span>`:';'}</span>`;
	}

	function ruleToString(rule) {
		return `${rule.raws.before||''}<span class=css-rule><span class=css-selector>${replaceVars(rule.selector)}</span>${rule.raws.between||''}<span class=css-block>{${rule.nodes.map(node => toString(node)).join('')}${rule.raws.after||''}}</span></span>`;
	}

	function declToString(decl) {
		return `${decl.raws.before || ''}<span class=css-declaration><span class=css-property>${decl.prop}</span>${decl.raws.between || ':'}<span class=css-value>${replaceVarsAndFns(decl.value)}</span>;</span>`;
	}

	function commentToString(comment) {
		return `${comment.raws.before}<span class=css-comment>/*${comment.raws.left}${comment.text}${comment.raws.right}*/</span>`;
	}

	builder(
		toString(root)
	);
}
1205374
public void build() {
        Preconditions.checkState(!isBuilt);

        if (pendingItemAdj.size() > 0) {
            for (InvoiceItem item : pendingItemAdj) {
                addExistingItem(item, true);
            }
            pendingItemAdj.clear();
        }
        for (SubscriptionItemTree tree : subscriptionItemTree.values()) {
            tree.build();
        }
        isBuilt = true;
    }
183922
function(tree, options) {
      if (!options) {
        options = {
          ext: '.css',
          importFormat: null, // to be initialized just bellow
          encoding: 'utf-8'
        };
      }

      if (!options.ext) {
        options.ext = '.css';
      }

      if (!options.importFormat) {
        if (options.ext === '.css') {
          options.importFormat = function(path) {
            return '@import "' + path + '";';
          };
        } else if (options.ext === '.less') {
          options.importFormat = function(path) {
            return '@import (less) "' + path + '";';
          };
        }
      }

      if (!options.encoding) {
        options.encoding = 'utf-8';
      }

      generate(tree, null, options);
    }
1305233
private void addClassFrameTag(Content contentTree) {
        HtmlTree frame = HtmlTree.IFRAME(configuration.topFile.getPath(), "classFrame",
                configuration.getText("doclet.Package_class_and_interface_descriptions"));
        frame.addStyle(HtmlStyle.rightIframe);
        contentTree.addContent(frame);
    }
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]);
        }
    }
1028558
protected void buildTree() {
		treeGrid.setWidth100();
		treeGrid.setHeight100();
		treeGrid.setShowHeader(false);
		treeGrid.setOverflow(Overflow.AUTO);
		tree = new RefreshableTree();
		final TreeNode nodeRoot = new TreeNode("ROOT");
		tree.setRoot(nodeRoot); // invisible ROOT node (ROOT node is required)

		ClientLayerTreeInfo layerTreeInfo = (ClientLayerTreeInfo) mapModel.getMapInfo().getWidgetInfo(
				ClientLayerTreeInfo.IDENTIFIER);
		tree.setRoot(nodeRoot); // invisible ROOT node (ROOT node is required)
		if (layerTreeInfo != null) {
			for (ClientAbstractNodeInfo node : layerTreeInfo.getTreeNode().getTreeNodes()) {
				processNode(node, nodeRoot, false);
			}
		}

		treeGrid.setData(tree);
		treeGrid.addLeafClickHandler(this);
		treeGrid.addFolderClickHandler(this);

		treeGrid.addFolderClickHandler(new FolderClickHandler() {
			@Override
			public void onFolderClick(FolderClickEvent folderClickEvent) {
				folderClickEvent.getSource();
			}
		});


		treeGrid.addFolderOpenedHandler(new FolderOpenedHandler() {
			@Override
			public void onFolderOpened(FolderOpenedEvent folderOpenedEvent) {
				folderOpenedEvent.getSource();
			}
		});

		tree.openFolder(nodeRoot);
		syncNodeState(false);
	}
840484
function buildStyles() {
  return Promise.resolve()
    // Create the dist folder if it doesn't exist
    .then(() => {
      if(!FS.existsSync(Path.join(__dirname, 'dist'))) {
        return FS.mkdirAsync(Path.join(__dirname, 'dist'));
      }
    })

    // Generate minified stylesheet
    .then(() => {
      let file = Path.join(__dirname, 'source/css/shoelace.css');
      let css = FS.readFileSync(file, 'utf8');

      return PostCSS([
        AtImport,
        CSSnext({
          features: {
            rem: false
          }
        }),
        CSSnano({
          autoprefixer: false,
          safe: true
        })
      ]).process(css, { from: file });
    })

    // Write stylesheet to dist
    .then((result) => {
      let file = Path.join(__dirname, 'dist/shoelace.css');

      // Update {{version}} in CSS since it's not processed with Handlebars
      result.css = result.css.replace(/\{\{version\}\}/g, __version);

      // Output a message
      console.log(Chalk.green('CSS processed: %s! 🦋'), Path.relative(__dirname, file));

      // Write output file
      return FS.writeFileAsync(file, result.css, 'utf8');
    });
}