Find style by it's descriptive name.

        :Returns:
          Returns found style of type :class:`ooxml.doc.Style`.
431559
def get_by_name(self, name, style_type = None):
        
        for st in self.styles.values():
            if st:
                if st.name == name:
                    return st

        if style_type and not st:
            st = self.styles.get(self.default_styles[style_type], None)            
        return st
993814
def has_style?(style_name)
      selected.each do |view|
        return false unless view.rmq_data.has_style?(style_name)
      end
      true
    end
534813
def parse_style(document, xmlcontent):
    

    styles = etree.fromstring(xmlcontent)

    _r = styles.xpath('.//w:rPrDefault', namespaces=NAMESPACES)

    if len(_r) > 0:
        rpr = _r[0].find(_name('{{{w}}}rPr'))

        if rpr is not None:
            st = doc.Style()
            parse_previous_properties(document, st, rpr)
            document.default_style = st

    # rest of the styles
    for style in styles.xpath('.//w:style', namespaces=NAMESPACES):
        st = doc.Style()

        st.style_id = style.attrib[_name('{{{w}}}styleId')]

        style_type = style.attrib[_name('{{{w}}}type')]
        if style_type is not None:
            st.style_type = style_type

        if _name('{{{w}}}default') in style.attrib:
            is_default = style.attrib[_name('{{{w}}}default')]
            if is_default is not None:
                st.is_default = is_default == '1'

        name = style.find(_name('{{{w}}}name'))
        if name is not None:
            st.name = name.attrib[_name('{{{w}}}val')]

        based_on = style.find(_name('{{{w}}}basedOn'))

        if based_on is not None:
            st.based_on = based_on.attrib[_name('{{{w}}}val')]

        document.styles.styles[st.style_id] = st

        if st.is_default:
            document.styles.default_styles[st.style_type] = st.style_id

        rpr = style.find(_name('{{{w}}}rPr'))

        if rpr is not None:
            parse_previous_properties(document, st, rpr)

        ppr = style.find(_name('{{{w}}}pPr'))

        if ppr is not None:
            parse_paragraph_properties(document, st, ppr)
1150518
function getComputedCSS(styleName) {
  if (this.ownerDocument.defaultView && this.ownerDocument.defaultView.opener) {
    return this.ownerDocument.defaultView.getComputedStyle(this)[styleName];
  }
  return window.getComputedStyle(this)[styleName];
}
886300
def _styleof(expr, styles):
    """"""
    style = dict()
    for expr_filter, sty in styles:
        if expr_filter(expr):
            style.update(sty)
    return style
16638
def base_style(self):
        
        basedOn = self.basedOn
        if basedOn is None:
            return None
        styles = self.getparent()
        base_style = styles.get_by_id(basedOn.val)
        if base_style is None:
            return None
        return base_style
806775
def style(self, style):
        
        if style is None:
            self._remove_pStyle()
            return
        pStyle = self.get_or_add_pStyle()
        pStyle.val = style
69768
def document_style_by_id(id)
      root_object.document_styles.each do |style|
        return style if style.style_id == id
      end
      nil
    end
680489
def get_style_defs(self, arg=''):
        
        cp = self.commandprefix
        styles = []
        for name, definition in iteritems(self.cmd2def):
            styles.append(r'\expandafter\def\csname %s@tok@%s\endcsname{%s}' %
                          (cp, name, definition))
        return STYLE_TEMPLATE % {'cp': self.commandprefix,
                                 'styles': '\n'.join(styles)}
599675
private String fetchStyles(Document doc) {
        Elements els = doc.select(STYLE_TAG);
        StringBuilder styles = new StringBuilder();
        for (Element e : els) {
            if (e.attr("data-inline").equals("true")) {
                styles.append(e.data());
                e.remove();
            }
        }
        return styles.toString();
    }
853066
def add_style_of_type(self, name, style_type, builtin):
        
        style = self.add_style()
        style.type = style_type
        style.customStyle = None if builtin else True
        style.styleId = styleId_from_name(name)
        style.name_val = name
        return style
859013
def style(font):
  """"""
  from fontbakery.constants import STATIC_STYLE_NAMES
  filename = os.path.basename(font)
  if '-' in filename:
    stylename = os.path.splitext(filename)[0].split('-')[1]
    if stylename in [name.replace(' ', '') for name in STATIC_STYLE_NAMES]:
      return stylename
  return None
977978
def get_by_id(self, style_id, style_type):
        
        if style_id is None:
            return self.default(style_type)
        return self._get_by_id(style_id, style_type)
910639
def get(self,style):
        
        level = len(self.stack) -1
        while level >= 0:
            if style in self.stack[level]:
                return self.stack[level][style]
            else:
                level = level - 1
        return None
444884
public NamedStyleInfo getNamedStyleInfo(String name) {
		for (NamedStyleInfo info : namedStyleInfos) {
			if (info.getName().equals(name)) {
				return info;
			}
		}
		return null;
	}
793649
public String getStyle() {
        final Object result = getStateHelper().eval(PropertyKeys.style, null);
        if (result == null) {
            return null;
        }
        return result.toString();
    }
560553
def styleattribute(self, element):
        
        css_text = element.get('style')
        if css_text:
            return cssutils.css.CSSStyleDeclaration(cssText=css_text)
        else:
            return None