Returns list of styles on which specified style is based on.

    :Args:
      - document (:class:`ooxml.doc.Document`): Document object
      - style (:class:`ooxml.doc.Style`): Style object

    :Returns:
      List of style objects.
498562
def get_all_styles(document, style):
    

    classes = []

    while True:
        classes.insert(0, get_style_name(style))

        if style.based_on:
            style = document.styles.get_by_id(style.based_on)
        else:
            break

    return classes
1180696
private void applyStyles(Document doc) {
        Elements allStyledElements = doc.getElementsByAttribute(CSS_STYLE);

        for (Element e : allStyledElements) {
            String newStyle = e.attr(CSS_STYLE);
            String oldStyle = e.attr(STYLE_ATTR);
            e.attr(STYLE_ATTR, (newStyle + "; " + oldStyle).replace(";;", ";"));
            e.removeAttr(CSS_STYLE);
        }
    }
388046
def process_document(self, doc):
        

        raw = doc.select_segments("$.raw_content")[0]
        extractions = doc.extract(self.inferlink_extractor, raw)
        doc.store(extractions, "inferlink_extraction")
        return list()
843733
function styleDocument () {
  var headElement, styleElement, style;

  // Bail out if document has already been styled
  if (getRemarkStylesheet()) {
    return;
  }

  headElement = document.getElementsByTagName('head')[0];
  styleElement = document.createElement('style');
  styleElement.type = 'text/css';

  // Set title in order to enable lookup
  styleElement.title = 'remark';

  // Set document styles
  styleElement.innerHTML = resources.documentStyles;

  // Append highlighting styles
  for (style in highlighter.styles) {
    if (highlighter.styles.hasOwnProperty(style)) {
      styleElement.innerHTML = styleElement.innerHTML +
        highlighter.styles[style];
    }
  }

  // Put element first to prevent overriding user styles
  headElement.insertBefore(styleElement, headElement.firstChild);
}
149091
def document(cls):
    
    if cls.__doc__ is None:
        return cls

    baseclass_name = cls.mro()[-2].__name__

    try:
        return DOC_FUNCTIONS[baseclass_name](cls)
    except KeyError:
        return cls
539139
private static List<String> getElementsId(Document document) {
        List<String> result = new ArrayList<String>();

        List<Element> elementList = getElements(document);

        result = getElementsId(elementList);

        return result;
    }
936278
def get_properties(self, node):
        
        ret = {}
        # Try all the rules one by one
        for rule in self.rules:
            if rule.selector(node):
                ret.update(rule.properties)
        # Also search for direct 'style' arguments in the html doc
        for style_node in node.findParents(attrs={'style': True}):
            style = style_node.get('style')
            properties = self.parse_declarations(style)
            ret.update(properties)
        return ret
523248
private void applyStyles(Document doc) {
		Elements allStyledElements = doc.getElementsByAttribute(TEMP_STYLE_ATTR);

		for (Element e : allStyledElements) {
			String newStyle = e.attr(TEMP_STYLE_ATTR);
			String oldStyle = e.attr(STYLE_ATTR);
			e.attr(STYLE_ATTR, (newStyle + "; " + oldStyle).replaceAll(";+", ";").trim());
			e.removeAttr(TEMP_STYLE_ATTR);
		}
	}
1180391
def _document_by_attribute(self, kind, condition=None):
        
        doc = self.document
        if doc:
            for attr in doc.attributes:
                if isinstance(attr, kind):
                    if not condition or condition(attr):
                        return doc
                    return None
470121
def _get_styles(self, style_urls, asset_url_path):
        
        styles = []
        for style_url in style_urls:
            urls_inline = STYLE_ASSET_URLS_INLINE_FORMAT.format(
                asset_url_path.rstrip('/'))
            asset_content = self._download(style_url)
            content = re.sub(urls_inline, self._match_asset, asset_content)
            styles.append(content)

        return styles
69768
def document_style_by_id(id)
      root_object.document_styles.each do |style|
        return style if style.style_id == id
      end
      nil
    end
1068220
def select_styles(*styles)
      styles.tap(&:compact).flatten!
      if styles.empty? or styles.length == 1 && /\Anone\z/io.match(styles[0])
        return :NONE
      end
      styles.select { |s| FONT_STYLE.match(s) }
    end
1014367
def get_example_runner(document):
    
    runner = getattr(document, "click_example_runner", None)
    if runner is None:
        runner = document.click_example_runner = ExampleRunner()
    return runner
1331390
def from_dict(document):
        
        # Get the type name from the document
        type_name = document['name']
        if type_name == ATTR_TYPE_INT:
            return IntType()
        elif type_name == ATTR_TYPE_FLOAT:
            return FloatType()
        elif type_name == ATTR_TYPE_ENUM:
            return EnumType(document['values'])
        elif type_name == ATTR_TYPE_DICT:
            return DictType()
        elif type_name == ATTR_TYPE_LIST:
            return ListType()
        else:
            raise ValueError('invalid attribute type: ' + str(type_name))
264674
def parse(text: str, style: Style = Style.auto) -> Docstring:
    

    if style != Style.auto:
        return _styles[style](text)
    rets = []
    for parse_ in _styles.values():
        try:
            rets.append(parse_(text))
        except ParseError as e:
            exc = e
    if not rets:
        raise exc
    return sorted(rets, key=lambda d: len(d.meta), reverse=True)[0]
969447
function stylesDocs() {
  return gulp.src( 'docs/src/css/main.less' )
    .pipe( gulpLess( {
      paths: [ 'node_modules/cf-*/src/' ],
      compress: true
    } ) )
    .pipe( gulpPostcss( [
      autoprefixer( {
        browsers: BROWSER_LIST.LAST_2_PLUS_IE_8_AND_UP
      } )
    ] ) )
    .pipe( gulp.dest( 'docs/dist/css/' ) );
}
138038
def document_style_by_name(name)
      root_object.document_styles.each do |style|
        return style if style.name == name
      end
      nil
    end