for adding fontFace
@param {string} key fontFace
@param {object} styles rules
347569
function (key, styles) {
    key = camelToKebab(key)
    let stylesText = ''
    for (const k in styles) {
      if (styles.hasOwnProperty(k)) {
        stylesText += camelToKebab(k) + ':' + styles[k] + ';'
      }
    }
    const styleText = `@${key}{${stylesText}}`
    appendCss(styleText, 'dom-added-rules')
  }
917588
public void add(T style)
    {
        Integer cnt = styles.get(style);
        if (cnt == null)
            styles.put(style, 1);
        else
            styles.put(style, cnt+1);
    }
1238941
private void addCharPreds(String key, char c, List<String> preds) {
    preds.add(key + "=" + c);
    if (Character.isLetter(c)) {
      preds.add(key + "_alpha");
      if (Character.isUpperCase(c)) {
        preds.add(key + "_caps");
      }
    } else if (Character.isDigit(c)) {
      preds.add(key + "_num");
    } else if (StringUtil.isWhitespace(c)) {
      preds.add(key + "_ws");
    } else {
      if (c == '.' || c == '?' || c == '!') {
        preds.add(key + "_eos");
      } else if (c == ',' || c == ';' || c == ':') {
        preds.add(key + "_reos");
      } else if (c == '`' || c == '"' || c == '\'') {
        preds.add(key + "_quote");
      } else if (c == '[' || c == '{' || c == '(') {
        preds.add(key + "_lp");
      } else if (c == ']' || c == '}' || c == ')') {
        preds.add(key + "_rp");
      }
    }
  }
464790
function css(key, val) {
  var style, props;
  if(!this.length) {
    return this;
  }

  if(key && typeof key === 'object') {
    props = key;
  }else if(key && val) {
    props = {};
    props[key] = val;
  }

  // get style object
  if(key === undefined) {
    style = window.getComputedStyle(this.dom[0], null);
    // TODO: convert to plain object map?
    // for the moment return CSSStyleDeclaration
    return style;
  // get single style property value
  }else if(typeof key === 'string' && !val) {
    style = window.getComputedStyle(this.dom[0], null);
    return style.getPropertyValue(key);
  }

  // set inline styles
  this.each(function(el) {
    el.style = el.style;
    for(var z in props) {
      el.style[z] = '' + props[z];
    }
  });
  return this;
}
675568
function(settings, styles) {
  if (_.isArray(styles) && styles.length > 0) {
    _.each(styles, function(obj) {
      if (!_.has(obj, 'name')) {
        return;
      }
      var style = _.findWhere(settings.styles, { name: obj.name });
      if (!_.isUndefined(style)) {
        style.configure(obj);
      } else {
        settings.styles.push( toGrawlixStyle(obj) );
      }
    });
  }
  return settings;
}
465287
public void add(SeqPattern style) {
    style.setGenerator(this);
    patterns.put(style.getLevel(), style);
  }
471140
function styles(obj) {
  var str = '';
  for(var key in obj) {
    str += key + ':' + obj[key] + ';';
  }
  return str;
}
877741
public static void styleEditable(@NonNull Context ctx,
                                     @Nullable HashMap<String, ITypeface> fonts,
                                     @NonNull Editable textSpanned,
                                     @Nullable List<CharacterStyle> styles,
                                     @Nullable HashMap<String, List<CharacterStyle>> stylesFor) {
        fonts = init(ctx, fonts);

        //find all icons which should be replaced with the iconFont
        List<StyleContainer> styleContainers = IconicsUtils.findIconsFromEditable(textSpanned, fonts);

        //set all the icons and styles
        IconicsUtils.applyStyles(ctx, textSpanned, styleContainers, styles, stylesFor);
    }
1193514
public void addFont(Font font) {
        if (font.getBaseFont() != null) {
            fonts.add(font);
            return;
        }
        BaseFont bf = font.getCalculatedBaseFont(true);
        Font f2 = new Font(bf, font.getSize(), font.getCalculatedStyle(), font.getColor());
        fonts.add(f2);
    }
1010676
public function isLoadedFont($fontKey)
    {
        if (isset($this->fonts[$fontKey])) {
            return true;
        }

        if (isset($this->CoreFonts[$fontKey])) {
            return true;
        }

        return false;
    }
794206
function setupStyleguide(options) {
  let cwd = !!options && !!options.cwd ? options.cwd : process.cwd()
  success('Styleguide.new:', 'initialize styleguide ...')
  return new Styleguide()
    .initialize(cwd)
    .then(function (styleguide) {
      success('Styleguide.new:', 'initialize finished')
      if (!options || !options.prepare) {
        success('Styleguide.prepare:', 'preparing the styleguide target ...')
        return styleguide.prepare()
      } else {
        return Promise.resolve(styleguide)
      }
    })
}
46245
function parseStyles(inlineStyles) {
  var styles = {};

  if(_.isUndefined(inlineStyles)) {
    return styles;
  }
  var styleRules = inlineStyles.split(';');
  _(styleRules).each(function(style) {
    var keyValue = style.split(':');
    if(keyValue.length == 2) {
      styles[keyValue[0].replace(/[\s]/g, '')] = keyValue[1];
    }
  });
  return styles;
}
1094921
def font_attribute(styles={})
      return nil if styles.nil?
      value = styles[:font]
      return nil unless value && value.is_a?(UIFont)
      value
    end
914154
function (styles) {
        const symbol = this._getInternalSymbol();
        const stylesToAnimate = {};
        for (const p in styles) {
            if (styles.hasOwnProperty(p)) {
                const v = styles[p];
                if (p !== 'translate' && p !== 'symbol') {
                    //this.getRadius() / this.getWidth(), etc.
                    const fnName = 'get' + p[0].toUpperCase() + p.substring(1);
                    const current = this[fnName]();
                    stylesToAnimate[p] = [current, v];
                } else if (p === 'symbol') {
                    let symbolToAnimate;
                    if (Array.isArray(styles['symbol'])) {
                        if (!Array.isArray(symbol)) {
                            throw new Error('geometry\'symbol isn\'t a composite symbol, while the symbol in styles is.');
                        }
                        symbolToAnimate = [];
                        const symbolInStyles = styles['symbol'];
                        for (let i = 0; i < symbolInStyles.length; i++) {
                            if (!symbolInStyles[i]) {
                                symbolToAnimate.push(null);
                                continue;
                            }
                            const a = {};
                            for (const sp in symbolInStyles[i]) {
                                if (symbolInStyles[i].hasOwnProperty(sp)) {
                                    a[sp] = [symbol[i][sp], symbolInStyles[i][sp]];
                                }
                            }
                            symbolToAnimate.push(a);
                        }
                    } else {
                        if (Array.isArray(symbol)) {
                            throw new Error('geometry\'symbol is a composite symbol, while the symbol in styles isn\'t.');
                        }
                        symbolToAnimate = {};
                        for (const sp in v) {
                            if (v.hasOwnProperty(sp)) {
                                symbolToAnimate[sp] = [symbol[sp], v[sp]];
                            }
                        }
                    }
                    stylesToAnimate['symbol'] = symbolToAnimate;
                } else if (p === 'translate') {
                    stylesToAnimate['translate'] = new Coordinate(v);
                }
            }
        }
        return stylesToAnimate;
    }
1118236
def font(row, col, sheet = nil)
      key = normalize(row, col)
      definition_index = safe_send(sheet_for(sheet).cells[key], :style)
      styles.definitions[definition_index] if definition_index
    end
275911
function buildStyleAttribute(styleMap) {
  var styleAttribute = [];
  for (var property in styleMap) {
    styleAttribute.push(property + ': ' + styleMap[property] + ';');
  }
  return styleAttribute.join(' ');
}
604624
function ( obj, key, value ) {
		key = string.toCamelCase( key );

		if ( value !== undefined ) {
			obj.style[key] = value;
			return obj;
		}
		else {
			return obj.style[key];
		}
	}