Normalizes stylesheet property
356691
private function normalizeStylesheetsProperty()
    {
        if (empty($this->pluginOptions['stylesheets']))
            $this->pluginOptions['stylesheets'] = array();
        else if (is_array($this->pluginOptions['stylesheets']))
            $this->pluginOptions['stylesheets'] = array_filter($this->pluginOptions['stylesheets'], 'is_string');
        else if (is_string($this->pluginOptions['stylesheets']))
            $this->pluginOptions['stylesheets'] = array($this->pluginOptions['stylesheets']);
        else
            $this->pluginOptions['stylesheets'] = array();
    }
1077883
function normalizeCssText( unparsedCssText, nativeNormalize )
	{
		var styleText;
		if ( nativeNormalize !== false )
		{
			// Injects the style in a temporary span object, so the browser parses it,
			// retrieving its final format.
			var temp = new CKEDITOR.dom.element( 'span' );
			temp.setAttribute( 'style', unparsedCssText );
			styleText = temp.getAttribute( 'style' ) || '';
		}
		else
			styleText = unparsedCssText;

		// Normalize font-family property, ignore quotes and being case insensitive. (#7322)
		// http://www.w3.org/TR/css3-fonts/#font-family-the-font-family-property
		styleText = styleText.replace( /(font-family:)(.*?)(?=;|$)/, function ( match, prop, val )
		{
			var names = val.split( ',' );
			for ( var i = 0; i < names.length; i++ )
				names[ i ] = CKEDITOR.tools.trim( names[ i ].replace( /["']/g, '' ) );
			return prop + names.join( ',' );
		});

		// Shrinking white-spaces around colon and semi-colon (#4147).
		// Compensate tail semi-colon.
		return styleText.replace( /\s*([;:])\s*/, '$1' )
							 .replace( /([^\s;])$/, '$1;')
				 			// Trimming spaces after comma(#4107),
				 			// remove quotations(#6403),
				 			// mostly for differences on "font-family".
							 .replace( /,\s+/g, ',' )
							 .replace( /\"/g,'' )
							 .toLowerCase();
	}
135926
def stylesheet(self, fn=None, unit=CSS.rem, pt_per_em=None, decimals=2, font_factor=1/2., space_factor=1/20.):
        """"""
        styles = self.stylemap(definitions=True, all=True, cache=False)
        used_styles = self.stylemap(definitions=False, all=False, cache=False)
        css = CSS(fn=fn or (self.fn and self.fn.replace('.docx', '.css')) or None)
        if pt_per_em is None:
            # use the size of the "Normal" font as 1.0em by definition
            normal = [styles[k] for k in styles if styles[k].name=='Normal'][0]
            if normal.properties.get('sz') is not None:
                pt_per_em = float(normal.properties['sz'].val) * font_factor
            else:
                pt_per_em = 12.
        for styleName in used_styles:
            style = styles[styleName]
            sel = self.selector(style)
            css.styles[sel] = self.style_properties(styles, styleName, unit=unit, pt_per_em=pt_per_em, decimals=decimals, font_factor=font_factor, space_factor=space_factor)
            LOG.debug("%s %r" % (sel, css.styles[sel]))

        return css
461056
function(styles_string) {

		styles_string = styles_string.trim();

		var styles = styles_string.split(/[\;]+/),
			result = {},
			parts,
			i = 0,
			count = styles.length,
			resultCount = 0;

		if (styles_string) {

			for (; i < count; i++) {

				styles[i] = styles[i].trim();

				if (styles[i]) {

					parts = styles[i].split(':');

					if (parts.length == 2) {

						parts[0] = parts[0].trim();
						parts[1] = parts[1].trim();
						result[parts[0]] = parts[1];
						resultCount++;

					} else {

						Lava.t("Unable to parse the style attribute");

					}

				}

			}

		}

		return resultCount ? result : null;

	}
387332
function(property, camelCase) {
		var prefixed = self.prefix + property;

		return camelCase? StyleFix.camelCase(prefixed) : prefixed;
	}
633969
function hstyle(st) {
			// Prepare string
			var s = '';
			for (var key in st) {
				s += '<' + key;
				for (var attr in st[key]) {
					s += ' ';
					if (attr.substr(0, 2) == 'x:') {
						s += attr;
					} else {
						s += 'ss:';
					}
					s += attr + '="' + st[key][attr] + '"';
				}
				s += '/>';
			}

			var hh = hash(s);
			// Store in hash
			if (styles[hh]) {
			} else {
				styles[hh] = {styleid: stylesn};
				s2 += '<Style ss:ID="s' + stylesn + '">';
				s2 += s;
				s2 += '</Style>';
				stylesn++;
			}
			return 's' + styles[hh].styleid;
		}
1042999
function resolveStylesheet(file, pathes) {
    var filePath = file.path,
        linkStr = '';

    for(var i = 0, len = pathes.length; i < len; i ++) {
        linkStr += '<link rel="stylesheet" href="' + path.relative(path.dirname(filePath), pathes[i]) + '"/>\r\n';
    }

    return linkStr;
}
769256
function getCSSRules(doc) {
    var styles = doc.getElementsByTagName('style'),
        allRules = { },
        rules;

    // very crude parsing of style contents
    for (var i = 0, len = styles.length; i < len; i++) {
      var styleContents = styles[0].textContent;

      // remove comments
      styleContents = styleContents.replace(/\/\*[\s\S]*?\*\//g, '');

      rules = styleContents.match(/[^{]*\{[\s\S]*?\}/g);
      rules = rules.map(function(rule) { return rule.trim() });

      rules.forEach(function(rule) {
        var match = rule.match(/([\s\S]*?)\s*\{([^}]*)\}/),
            rule = match[1],
            declaration = match[2].trim(),
            propertyValuePairs = declaration.replace(/;$/, '').split(/\s*;\s*/);

        if (!allRules[rule]) {
          allRules[rule] = { };
        }

        for (var i = 0, len = propertyValuePairs.length; i < len; i++) {
          var pair = propertyValuePairs[i].split(/\s*:\s*/),
              property = pair[0],
              value = pair[1];

          allRules[rule][property] = value;
        }
      });
    }

    return allRules;
  }
1104950
function patchStyle(n, o) {
	var ns =     (n.attrs || emptyObj).style;
	var os = o ? (o.attrs || emptyObj).style : null;

	// replace or remove in full
	if (ns == null || isVal(ns))
		{ n.el.style.cssText = ns; }
	else {
		for (var nn in ns) {
			var nv = ns[nn];

			if (os == null || nv != null && nv !== os[nn])
				{ n.el.style[nn] = autoPx(nn, nv); }
		}

		// clean old
		if (os) {
			for (var on in os) {
				if (ns[on] == null)
					{ n.el.style[on] = ""; }
			}
		}
	}
}
308624
function(el, styleProperty){
            if(el.currentStyle){
                return el.currentStyle[styleProperty];
            }else if(window.getComputedStyle){
                var cssProperty = styleProperty.replace(/([A-Z])/g, "-$1").toLowerCase();
                var computedStyle = window.getComputedStyle(el, "");
                return computedStyle.getPropertyValue(cssProperty);
            }else{
                return "";
            }
        }
946685
function normalizeStyleData (data) {
  var style = normalizeStyleBinding(data.style);
  // static style is pre-processed into an object during compilation
  // and is always a fresh object, so it's safe to merge into it
  return data.staticStyle
    ? extend(data.staticStyle, style)
    : style
}
941447
function($from, $to, properties) {
		var i, n, styles = {};
		if (properties) {
			for (i = 0, n = properties.length; i < n; i++) {
				styles[properties[i]] = $from.css(properties[i]);
			}
		} else {
			styles = $from.css();
		}
		$to.css(styles);
	}
990674
function css(property) {
        if (cssCache[property] === undefined) {
            var domProperty = property.
                replace(/(-[\s\S])/g, function(c) { return c.charAt(1).toUpperCase(); });
            var prefixedDom = style(domProperty);
            cssCache[property] = domToCss(prefixedDom);
        }
        return cssCache[property];
    }
608363
function( property ){
      var ele = this[0];

      if( ele ){
        var renstyle = ele.cy().style().getRenderedStyle( ele );

        if( property === undefined ){
          return renstyle;
        } else {
          return renstyle[ property ];
        }
      }
    }
1164917
function normalizeProperty(element, slotName) {
    var type, normalized;

    if (slotName in element) {
      normalized = slotName;
      type = 'prop';
    } else {
      var lower = slotName.toLowerCase();
      if (lower in element) {
        type = 'prop';
        normalized = lower;
      } else {
        type = 'attr';
        normalized = slotName;
      }
    }

    if (type === 'prop' && (normalized.toLowerCase() === 'style' || preferAttr(element.tagName, normalized))) {
      type = 'attr';
    }

    return { normalized: normalized, type: type };
  }
787150
function normalizeStyleBinding (bindingStyle) {
  if (Array.isArray(bindingStyle)) {
    return toObject(bindingStyle)
  }
  if (typeof bindingStyle === 'string') {
    return parseStyleText(bindingStyle)
  }
  return bindingStyle
}
655270
function parseStyleAttribute(element) {
    var oStyle = { },
        style = element.getAttribute('style');
    if (style) {
      if (typeof style == 'string') {
        style = style.replace(/;$/, '').split(';').forEach(function (current) {
            var attr = current.split(':');
            oStyle[normalizeAttr(attr[0].trim().toLowerCase())] = attr[1].trim();
        });
      } else {
        for (var prop in style) {
          if (typeof style[prop] !== 'undefined') {
            oStyle[normalizeAttr(prop.toLowerCase())] = style[prop];
          }
        }
      }
    }
    return oStyle;
  }