u"""Sets the style attribute of a node to the dictionary ``styleMap``.
167177
def _setStyle(node, styleMap):
    """
    fixedStyle = ';'.join([prop + ':' + styleMap[prop] for prop in styleMap])
    if fixedStyle != '':
        node.setAttribute('style', fixedStyle)
    elif node.getAttribute('style'):
        node.removeAttribute('style')
    return node
374366
def decorate(svg, node, metadata):
    """"""
    if not metadata:
        return node
    xlink = metadata.get('xlink')
    if xlink:
        if not isinstance(xlink, dict):
            xlink = {'href': xlink, 'target': '_blank'}
        node = svg.node(node, 'a', **xlink)
        svg.node(
            node, 'desc', class_='xlink'
        ).text = to_unicode(xlink.get('href'))

    if 'tooltip' in metadata:
        svg.node(node, 'title').text = to_unicode(metadata['tooltip'])

    if 'color' in metadata:
        color = metadata.pop('color')
        node.attrib['style'] = 'fill: %s; stroke: %s' % (color, color)

    if 'style' in metadata:
        node.attrib['style'] = metadata.pop('style')

    if 'label' in metadata and metadata['label']:
        svg.node(
            node, 'desc', class_='label'
        ).text = to_unicode(metadata['label'])
    return node
597411
function setStyles(el, styles) {
         var which;

         for (which in styles) {
             if (styles.hasOwnProperty(which)) {
                 Dom.setStyle(el, which, styles[which]);
             }
         }
     }
648510
def call_set_attr(node: Node, key: str, value):
    """"""
    node.set_attr(key, value)
639618
@JRubyMethod(name = "style=")
    public static IRubyObject style_set(IRubyObject self, IRubyObject style) {
        org.yecht.Node node = (org.yecht.Node)self.dataGetStructChecked();
        Ruby runtime = self.getRuntime();
        Data.Map ds = (Data.Map)node.data;
        if(style == ((Node)self).x.inline) {
            ds.style = MapStyle.Inline;
        } else {
            ds.style = MapStyle.None;
        }

        ((RubyObject)self).fastSetInstanceVariable("@style", style);
        return self;
    }
599609
def styles(self, dictobj):
		
		for k in dictobj:
			self.chart_style[k] = dictobj[k]
446752
private void appendStyleMap(final XMLUtil util, final Appendable appendable) throws IOException {
        appendable.append("<style:map");
        util.appendEAttribute(appendable, "style:condition", "value()>=0");
        util.appendEAttribute(appendable, "style:apply-style-name", this.dataStyle.getName());
        appendable.append("/>");
    }
72072
function styleTDTH(elm, name, value) {
            if (elm.tagName === "TD" || elm.tagName === "TH") {
              dom.setStyle(elm, name, value);
            } else {
              if (elm.children) {
                for (var i = 0; i < elm.children.length; i++) {
                  styleTDTH(elm.children[i], name, value);
                }
              }
            }
          }
641641
def update_style(self, mapping):
        """"""
        default = {
            "presentation:background-visible": "true",
            "presentation:background-objects-visible": "true",
            "draw:fill": "solid",
            "draw:fill-color": "#772953",
            "draw:fill-image-width": "0cm",
            "draw:fill-image-height": "0cm",
            "presentation:display-footer": "true",
            "presentation:display-page-number": "false",
            "presentation:display-date-time": "true",
        }
        default.update(mapping)
        style = PageStyle(**default)
        node = style.style_node()
        # add style to automatic-style
        self.preso._auto_styles.append(node)
        # update page style-name
        # found in ._page
        self._page.set(ns("draw", "style-name"), node.attrib[ns("style", "name")])
14673
function(node, att, style) {
        style = style || node.style;
        var CUSTOM_STYLES = Y_DOM.CUSTOM_STYLES,
            val = '';

        if (style) {
            if (att in CUSTOM_STYLES) {
                if (CUSTOM_STYLES[att].get) {
                    return CUSTOM_STYLES[att].get(node, att, style); // NOTE: return
                } else if (typeof CUSTOM_STYLES[att] === 'string') {
                    att = CUSTOM_STYLES[att];
                }
            }
            val = style[att];
            if (val === '') { // TODO: is empty string sufficient?
                val = Y_DOM[GET_COMPUTED_STYLE](node, att);
            }
        }

        return val;
    }
142212
def styleToDict(styleStr):
        '''
            
        '''
        styleStr = styleStr.strip()
        styles = styleStr.split(';') # Won't work for strings containing semicolon..

        styleDict = OrderedDict()
        for item in styles:
            try:
                splitIdx = item.index(':')
                name = item[:splitIdx].strip().lower()
                value = item[splitIdx+1:].strip()
                styleDict[name] = value
            except:
                continue

        return styleDict
1248921
def set_style(self, style):
        
        style = SolarizedStyle  # get_style_by_name(style)
        self._style = style
        self._clear_caches()
1218199
def node_style(self, node, **kwargs):
        '''
        
        '''
        if node not in self.edges:
            self.edges[node] = {}
        self.nodes[node] = kwargs
941611
function setValueForStyles(node, styles, component) {
    var style = node.style;
    for (var styleName in styles) {
      if (!styles.hasOwnProperty(styleName)) {
        continue;
      }
      var styleValue = dangerousStyleValue(styleName, styles[styleName], component);
      if (styleName === 'float' || styleName === 'cssFloat') {
        styleName = styleFloatAccessor;
      }
      if (styleValue) {
        style[styleName] = styleValue;
      } else {
        var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName];
        if (expansion) {
          // Shorthand property that IE8 won't like unsetting, so unset each
          // component to placate it
          for (var individualStyleName in expansion) {
            style[individualStyleName] = '';
          }
        } else {
          style[styleName] = '';
        }
      }
    }
  }
30485
function setStyles(element, styles) {
  Object.keys(styles).forEach(function (prop) {
    var unit = '';
    // add unit if the value is numeric and is one of the following
    if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {
      unit = 'px';
    }
    element.style[prop] = styles[prop] + unit;
  });
}
560553
def styleattribute(self, element):
        
        css_text = element.get('style')
        if css_text:
            return cssutils.css.CSSStyleDeclaration(cssText=css_text)
        else:
            return None
6389
function(node, att, val, style) {
        style = style || node.style;
        var CUSTOM_STYLES = Y_DOM.CUSTOM_STYLES,
            current;

        if (style) {
            if (val === null || val === '') { // normalize unsetting
                val = '';
            } else if (!isNaN(new Number(val)) && re_unit.test(att)) { // number values may need a unit
                val += Y_DOM.DEFAULT_UNIT;
            }

            if (att in CUSTOM_STYLES) {
                if (CUSTOM_STYLES[att].set) {
                    CUSTOM_STYLES[att].set(node, val, style);
                    return; // NOTE: return
                } else if (typeof CUSTOM_STYLES[att] === 'string') {
                    att = CUSTOM_STYLES[att];
                }
            }
            style[att] = val; 
        }
    }