Fetches and returns stylesheet file path or contents, for both
            print and screen contexts, depending if we want a standalone
            presentation or not.
960929
def get_css(self):
        
        css = {}

        print_css = os.path.join(self.theme_dir, 'css', 'print.css')

        if not os.path.exists(print_css):
            # Fall back to default theme
            print_css = os.path.join(THEMES_DIR, 'default', 'css', 'print.css')

            if not os.path.exists(print_css):
                raise IOError(u"Cannot find css/print.css in default theme")

        with codecs.open(print_css, encoding=self.encoding) as css_file:
            css['print'] = {
                'path_url': utils.get_path_url(print_css, self.relative),
                'contents': css_file.read(),
            }

        screen_css = os.path.join(self.theme_dir, 'css', 'screen.css')

        if (os.path.exists(screen_css)):
            with codecs.open(screen_css, encoding=self.encoding) as css_file:
                css['screen'] = {
                    'path_url': utils.get_path_url(screen_css, self.relative),
                    'contents': css_file.read(),
                }
        else:
            self.log(u"No screen stylesheet provided in current theme",
                      'warning')

        return css
302469
function getFilePaths(strPath = '', exts = ['.css']) {

		if (validUrl.isUri(strPath)){

			switch(exts[0]) {
				case '.css':
					tmpCSSPaths.push(strPath);
					break;
				case '.html':
				case '.htm':
					tmpHTMLPaths.push(strPath);
					break;
				case '.js':
					tmpJSPaths.push(strPath);
					break;
			}
		} else {

			try {
				// Query the entry
				fileStats = fs.lstatSync(strPath);

				// directory given
				if (fileStats.isDirectory()) {

					var dir = strPath;

					//traverse directory for .ext strPath
					try {

						fs.readdirSync(dir).forEach(filenameRead => {

							fileFound = false;

							for (m = 0, count = exts.length; m < count; ++m) {

								if (path.extname(filenameRead) == exts[m]) {
									fileFound = true;
								}
							}

							if (fileFound) {

								switch(exts[0]) {
									case '.css':
										tmpCSSPaths.push(dir + '/' + filenameRead);
										break;
									case '.html':
									case '.htm':
										tmpHTMLPaths.push(dir + '/' + filenameRead);
										break;
									case '.js':
										tmpJSPaths.push(dir + '/' + filenameRead);
										break;
								}

							} else if (path.extname(filenameRead) == '') {

								switch(exts[0]) {
									case '.css':
										getFilePaths(strPath+'/'+filenameRead, ['.css']);
										break;
									case '.html':
									case '.htm':
										getFilePaths(strPath+'/'+filenameRead, ['.html','.htm']);
										break;
									case '.js':
										getFilePaths(strPath+'/'+filenameRead, ['.js']);
										break;
								}

							}
						});



					} catch (e) {
						
						console.log(error("Directory read error: Something went wrong while reading the directory, check your [html] in " + configFileLocation + " and please try again."));
						console.log(e);
						process.exit(1);
					}

				} else if (fileStats.isFile()) { //filepath given

					if (exts.join(",").indexOf(strPath.substr(strPath.lastIndexOf('.') + 1)) != -1) {
						switch(exts[0]) {
							case '.css':
								tmpCSSPaths.push(strPath);
								break;
							case '.html':
							case '.htm':
								tmpHTMLPaths.push(strPath);
								break;
							case '.js':
								tmpJSPaths.push(strPath);
								break;
						}
					}
					
				}
			} catch (e) {
				
				console.log(error("CSS File read error: Something went wrong while reading the file(s), check your [html] in " + configFileLocation + " and please try again."));
				console.log(e);
				process.exit(1);
			}

		} //end of url check
	}
340869
def _parseAtPage(self, src):
        
        ctxsrc = src
        src = src[len('@page'):].lstrip()
        page, src = self._getIdent(src)
        if src[:1] == ':':
            pseudopage, src = self._getIdent(src[1:])
            page = page + '_' + pseudopage
        else:
            pseudopage = None

        #src, properties = self._parseDeclarationGroup(src.lstrip())

        # Containing @ where not found and parsed
        stylesheetElements = []
        src = src.lstrip()
        properties = []

        # XXX Extended for PDF use
        if not src.startswith('{'):
            raise self.ParseError('Ruleset opening \'{\' not found', src, ctxsrc)
        else:
            src = src[1:].lstrip()

        while src and not src.startswith('}'):
            if src.startswith('@'):
                # @media, @page, @font-face
                src, atResults = self._parseAtKeyword(src)
                if atResults is not None:
                    stylesheetElements.extend(atResults)
            else:
                src, nproperties = self._parseDeclarationGroup(src.lstrip(), braces=False)
                properties += nproperties
            src = src.lstrip()

        result = [self.cssBuilder.atPage(page, pseudopage, properties)]

        return src[1:].lstrip(), result
555748
function stylesheetOverride(stylesheet, props, themeData) {
  return {
    ...stylesheet,
    pointerBorder: { fill: themeData["tooltip.backgroundColor"] },
    pointerBody: { fill: themeData["tooltip.backgroundColor"] }
  };
}
715811
Stylesheet popStylesheet()
  {

    // The stylesheetLocatorStack needs to be popped because
    // a locator was pushed in for this stylesheet by the SAXparser by calling
    // setDocumentLocator().
    if (!m_stylesheetLocatorStack.isEmpty())
      m_stylesheetLocatorStack.pop();

    if (!m_stylesheets.isEmpty())
      m_lastPoppedStylesheet = (Stylesheet) m_stylesheets.pop();

    // Shouldn't this be null if stylesheets is empty?  -sb
    return m_lastPoppedStylesheet;
  }
846523
def generate_stylesheets
      return @contents = Jammit.packager.pack_stylesheets(@package, @variant) unless @variant == :mhtml
      @mtime      = Time.now
      request_url = prefix_url(request.fullpath)
      cached_url  = prefix_url(Jammit.asset_url(@package, @extension, @variant, @mtime))
      css         = Jammit.packager.pack_stylesheets(@package, @variant, request_url)
      @contents   = css.gsub(request_url, cached_url) if perform_caching
      css
    end
1073380
def get_js(self):
        
        js_file = os.path.join(self.theme_dir, 'js', 'slides.js')

        if not os.path.exists(js_file):
            js_file = os.path.join(THEMES_DIR, 'default', 'js', 'slides.js')

            if not os.path.exists(js_file):
                raise IOError(u"Cannot find slides.js in default theme")
        with codecs.open(js_file, encoding=self.encoding) as js_file_obj:
            return {
                'path_url': utils.get_path_url(js_file, self.relative),
                'contents': js_file_obj.read(),
            }
53465
@HtmlSafe
	public String getStylesheetHtml()
	{
		Space space = gpUtil.getSpaceManager().getSpace(getSpaceKey());
		return String.format("<style>\n%s\n</style>\n<base href=\"%s\"/>\n",
							 StyleSheetExtractorFactory.getInstance().renderStyleSheet(space), gpUtil.getBaseUrl());
	}
368031
def get_screen():
    """"""
    img_title = 'screen_' + g.client_id + '.png'
    image_path = STATIC_FILES_PATH + img_title
    if g.driver_status != WhatsAPIDriverStatus.LoggedIn:
        try:
            g.driver.get_qr(image_path)
            return send_file(image_path, mimetype='image/png')
        except Exception as err:
            pass
    g.driver.screenshot(image_path)
    return send_file(image_path, mimetype='image/png')
1213055
def load_stylesheet_pyqt5():
    
    # Smart import of the rc file
    import qdarkstyle.pyqt5_style_rc

    # Load the stylesheet content from resources
    from PyQt5.QtCore import QFile, QTextStream

    f = QFile(":qdarkstyle/style.qss")
    if not f.exists():
        _logger().error("Unable to load stylesheet, file not found in "
                        "resources")
        return ""
    else:
        f.open(QFile.ReadOnly | QFile.Text)
        ts = QTextStream(f)
        stylesheet = ts.readAll()
        if platform.system().lower() == 'darwin':  # see issue #12 on github
            mac_fix = '''
            QDockWidget::title
            {
                background-color: #31363b;
                text-align: center;
                height: 12px;
            }
            '''
            stylesheet += mac_fix
        return stylesheet
780030
def render_theming_css():
    
    css = getattr(settings, 'ADMIN_TOOLS_THEMING_CSS', False)
    if not css:
        css = '/'.join(['admin_tools', 'css', 'theming.css'])
    return mark_safe(
        '<link rel="stylesheet" type="text/css" media="screen" href="%s" />' %
        staticfiles_storage.url(css)
    )
1251179
function getThemeByFile(file) {
        var path = file._path;
        return _.find(loadedThemes, function (item) {
            return item.file._path === path;
        });
    }
603213
function processStylesheetContent(text) {
        // @NOTE: There is a bug in IE that causes the text layer to
        // not render the font when loaded for a second time (i.e.,
        // destroy and recreate a viewer for the same document), so
        // namespace the font-family so there is no collision
        if (browser.ie) {
            text = text.replace(/font-family:[\s\"\']*([\w-]+)\b/g,
                '$0-' + config.id);
        }

        return text;
    }
1233421
def get_src_or_dst_prompt(mode):
    
    _words = {"read": "from", "write": "to"}
    # print(os.getcwd())
    prompt = "Where would you like to {} your file(s) {}?\n" \
             "1. Desktop ({})\n" \
             "2. Downloads ({})\n" \
             "3. Current ({})\n" \
             "4. Browse".format(mode, _words[mode],
                                  os.path.expanduser('~/Desktop'),
                                    os.path.expanduser('~/Downloads'),
                                    os.getcwd())
    return prompt
700543
async function getCustomMediaFromCSSFile(from) {
	const css = await readFile(from);
	const root = postcss.parse(css, { from });

	return getCustomMedia(root, { preserve: true });
}
474609
def bundle_stylesheets(context: Context):
    
    args = [
        '--output', context.app.scss_build_path,
        '--output-style', 'compressed',
    ]
    if context.verbosity == 0:
        args.append('--quiet')
    if not context.use_colour:
        args.append('--no-color')
    for path in context.app.scss_include_paths:
        args.append('--include-path')
        args.append(path)
    return_code = 0
    for source_file in context.app.scss_source_file_set.paths_for_shell(separator=None):
        return_code = context.node_tool('node-sass', *args + [source_file]) or return_code
    return return_code
1163613
function stylesheets(options) {
    return this.stylesheets.reduce(function reduce(links, sheet) {
      return links + options.fn(sheet);
    }, '');
  }