create style object from css file content,which is raw string.
@param styles styles styles css file content
@param abspath project file path
@returns {{styles, imports: Array}}
964516
function createStylefromCode(styles, abspath) {
    //may import other file
    const arr = queryImport(styles)
    const baseRes = handleImportStyle(styles, abspath)
    const obj = {}
    const ast = csstree.parse(baseRes);
    csstree.walk(ast, {
        enter: function (node) {
            if (node.type === 'Rule' && node.prelude && node.prelude.type === 'SelectorList') {
                const clzName = []
                node.prelude.children.forEach(e => {
                    //we may handle each class selector here
                    let ans = selectorBlockHandler(e)
                    if (ans) {
                        //to save before value
                        obj[ans] = obj[ans] || {}
                        //save ans to log which to give value
                        clzName.push(ans)
                    }
                })
                const styleArray = []
                node.block.children.forEach(e => {
                    //handle with unit or function case
                    const styleItem = styleBlockHandler(e)
                    styleItem.length > 0 && styleArray.push(styleItem)
                })
                clzName.forEach(e => {
                    try {
                        const styleObject = transform(styleArray)
                        if (styleObject.fontWeight) {
                            //fontWeight must be string
                            styleObject.fontWeight = styleObject.fontWeight + ""
                        }
                        Object.assign(obj[e], styleObject)
                    } catch (e) {
                        console.error("convert ", abspath, " error:", e.message)
                    }

                })
            }
        },
    })
    return {styles: obj, imports: arr}
}
284234
private String internalGetUriStyleSheet(CmsObject cms, String editedResourcePath) {

        if (editedResourcePath == null) {
            return "";
        }
        String result = "";
        try {
            // determine the path of the template
            String templatePath = "";
            try {
                templatePath = cms.readPropertyObject(
                    editedResourcePath,
                    CmsPropertyDefinition.PROPERTY_TEMPLATE,
                    true).getValue("");
                if (CmsTemplateContextManager.isProvider(templatePath)) {
                    I_CmsTemplateContextProvider provider = OpenCms.getTemplateContextManager().getTemplateContextProvider(
                        templatePath);
                    if (provider != null) {
                        String providerResult = provider.getEditorStyleSheet(cms, editedResourcePath);
                        if (providerResult != null) {
                            return providerResult;
                        }
                    }
                }
            } catch (CmsException e) {
                if (LOG.isWarnEnabled()) {
                    LOG.warn(Messages.get().getBundle().key(Messages.LOG_READ_TEMPLATE_PROP_FAILED_0), e);
                }
            }
            if (CmsStringUtil.isNotEmpty(templatePath)) {
                // read the template property value from the template file where the absolute CSS path is (or should be) stored
                result = cms.readPropertyObject(templatePath, CmsPropertyDefinition.PROPERTY_TEMPLATE, false).getValue(
                    "");
            }
        } catch (CmsException e) {
            if (LOG.isWarnEnabled()) {
                LOG.warn(Messages.get().getBundle().key(Messages.LOG_READ_TEMPLATE_PROP_STYLESHEET_FAILED_0), e);
            }
        }
        return result;
    }
1193457
function Sakugawa(styles, options) {

  if (typeof styles !== 'string') {
    throw new Error('styles must be a string');
  }

  if (styles.length < 1) {
    throw new Error('styles must not be empty');
  }

  options = options || {};
  this.maxSelectors = options.maxSelectors || 4090;
  this.maxImports = options.maxImports || 4;
  this.mediaQueries = options.mediaQueries || 'normal';
  this.filename = options.filename || 'input.css';
  this.minSheets = options.minSheets || 1;

  this.ast = css.parse(styles);
}
1280536
public static HTML newHTML (String text, String... styles)
    {
        return setStyleNames(new HTML(text), styles);
    }
869473
def abspath(path, **kwargs):
    """"""
    import os.path
    return os.path.abspath(path, **kwargs)
944058
function(text) {
                // 
                if (isCss) {
                    if (resource.styleSheet) {
                        resource.styleSheet.cssText = text;
                    } else {
                        resource.appendChild(document.createTextNode(text));
                    }
                } else {
                    if (resource.innerText) {
                        resource.innerText = text;
                    } else {
                        resource.appendChild(document.createTextNode(text));
                    }
                }
                if (callback) {
                    callback(resourcePath, hashId);
                }
            }
1032966
public static boolean supportsStyle(String style) {
		String styleFileName = style;
		if (!styleFileName.endsWith(".csl")) {
			styleFileName = styleFileName + ".csl";
		}
		if (!styleFileName.startsWith("/")) {
			styleFileName = "/" + styleFileName;
		}
		URL url = CSL.class.getResource(styleFileName);
		return (url != null);
	}
476678
function isAngularComponentStyles(path) {
  return isPathMatch(
    path,
    [
      node => node.type === "TemplateLiteral",
      (node, name) => node.type === "ArrayExpression" && name === "elements",
      (node, name) =>
        node.type === "Property" &&
        node.key.type === "Identifier" &&
        node.key.name === "styles" &&
        name === "value"
    ].concat(getAngularComponentObjectExpressionPredicates())
  );
}
566708
def css(app, env):
    
    srcdir = os.path.abspath(os.path.dirname(__file__))
    cssfile = 'bolditalic.css'
    csspath = os.path.join(srcdir, cssfile)
    buildpath = os.path.join(app.outdir, '_static')
    try:
        os.makedirs(buildpath)
    except OSError:
        if not os.path.isdir(buildpath):
            raise
    copy(csspath, buildpath)
    app.add_stylesheet(cssfile)
    return
159428
function(styles)
	{
		//we must jsonify this because Flash Player versions below 9.0.60 don't handle
		//complex ExternalInterface parsing correctly
		styles = YAHOO.lang.JSON.stringify(styles);
		this._swf.setStyles(styles);
	}
94527
def load_styles(path_or_doc):
    """"""
    if isinstance(path_or_doc, string_types):
        doc = load(path_or_doc)
    else:
        # Recover the OpenDocumentText instance.
        if isinstance(path_or_doc, ODFDocument):
            doc = path_or_doc._doc
        else:
            doc = path_or_doc
        assert isinstance(doc, OpenDocument), doc
    styles = {_style_name(style): style for style in doc.styles.childNodes}
    return styles
953116
function (styles) {
				if (styles) {
					var textStyles = {};
					styles = merge(styles); // create a copy to avoid altering the original object (#537)
					each(['fontSize', 'fontWeight', 'fontFamily', 'color', 'lineHeight', 'width', 'textDecoration', 'textShadow'], function (prop) {
						if (styles[prop] !== UNDEFINED) {
							textStyles[prop] = styles[prop];
							delete styles[prop];
						}
					});
					text.css(textStyles);
				}
				return baseCss.call(wrapper, styles);
			}
754117
static String pullFontPathFromTheme(Context context, int styleAttrId, int[] attributeId) {
        if (styleAttrId == -1 || attributeId == null)
            return null;

        final Resources.Theme theme = context.getTheme();
        final TypedValue value = new TypedValue();

        theme.resolveAttribute(styleAttrId, value, true);
        final TypedArray typedArray = theme.obtainStyledAttributes(value.resourceId, attributeId);
        try {
            String font = typedArray.getString(0);
            return font;
        } catch (Exception ignore) {
            // Failed for some reason.
            return null;
        } finally {
            typedArray.recycle();
        }
    }
297537
function stylelint() {
  return gulp.src([
      './src/**/*.css',
      '!./src/components/combination.css', // not following BEM
      '!./src/iphonex-support/**/*.css' // not following BEM
    ], cwdOption)
    .pipe(stylelintPlugin({
      failAfterError: false,
      reporters: [{formatter: 'string', console: true}],
      configFile: path.join(__dirname, 'stylelint.config.js') // uses css-components/stylelint.config.js even when run from main gulpfile
    }));
}
663540
function inlineStylesheet($, filepath) {
  $('link[rel=stylesheet][href]').each(function() {
    var el      = $(this);
    var href    = el.attr('href');
    if(ABS.test(href)) return;
    var relpath = /^\./.test(href) ? href : './' + href;
    var srcpath = resolve.sync(relpath, {
      basedir    : dirname(filepath),
      extensions : [extname(relpath)]
    })
    var content = read(srcpath);
    var style = whacko('<style>' + content + '</style>');
    style.attr(el.attr());
    style.attr('href', null);
    style.attr('rel', null);
    el.replaceWith(whacko.html(style));
  })
}
15484
private static void  parseStyle(SvgElementBase obj, String style)
   {
      TextScanner  scan = new TextScanner(style.replaceAll("/\\*.*?\\*/", ""));  // regex strips block comments

      while (true)
      {
         String  propertyName = scan.nextToken(':');
         scan.skipWhitespace();
         if (!scan.consume(':'))
            break;  // Syntax error. Stop processing CSS rules.
         scan.skipWhitespace();
         String  propertyValue = scan.nextTokenWithWhitespace(';');
         if (propertyValue == null)
            break;  // Syntax error
         scan.skipWhitespace();
         if (scan.empty() || scan.consume(';'))
         {
            if (obj.style == null)
               obj.style = new Style();
            processStyleProperty(obj.style, propertyName, propertyValue);
            scan.skipWhitespace();
         }
      }
   }
427518
function(styleName, path, format) {
    const uri = this.getStylePath(styleName, path, format);
    const scheme = this.getScheme(uri);

    if (PUBLIC === scheme || TEMPORARY === scheme) {
      return '/' + this.resolvePath(uri);
    }

    throw new Error('Scheme `' + scheme + '` not supported');
  }