return the selector for the given stylemap style
512831
def selector(C, style):
        """"""
        clas = C.classname(style.name)
        if style.type == 'paragraph':
            # heading outline levels are 0..7 internally, indicating h1..h8
            outlineLvl = int((style.properties.get('outlineLvl') or {}).get('val') or 8) + 1
            if outlineLvl < 9:
                tag = 'h%d' % outlineLvl
            else:
                tag = 'p'
        elif style.type == 'character':
            tag = 'span'
        elif style.type == 'table':
            tag = 'table'
        elif style.type == 'numbering':
            tag = 'ol'
        return "%s.%s" % (tag, clas)
1093717
def get_by_id(self, style_id, style_type = None):
        

        for st in self.styles.values():
            if st:
                if st.style_id == style_id:
                    return st

        if style_type:
            return self.styles.get(self.default_styles[style_type], None)
        return None
1165566
function getElementStyleSheet(element) {
  assertHTMLElement(element);
  return genericPropertyGet(
      Methods.SHEET_GETTER, element, 'sheet', function(sheet) {
        return sheet instanceof CSSStyleSheet;
      });
}
886300
def _styleof(expr, styles):
    """"""
    style = dict()
    for expr_filter, sty in styles:
        if expr_filter(expr):
            style.update(sty)
    return style
1048353
public static String getCurrentStyle(Element element, Style style) {

        return getStyleImpl().getCurrentStyle(element, style.toString());
    }
664171
function (cssCtxt) {
            var classpath = cssCtxt.tplClasspath;
            var associatedTo = this.__styleTagAssociation[classpath];

            if (associatedTo) {
                return associatedTo;
            }

            if (cssCtxt.isTemplate()) {
                associatedTo = "tpl";
            } else if (cssCtxt.isWidget()) {
                associatedTo = "wgt";
            } else {
                associatedTo = "pool" + this.__NEXT_TAG_INDEX;
                this.__NEXT_TAG_INDEX += 1;
            }

            return associatedTo;
        }
98962
public static String getCssCode(BandElement be, Map<String, Object> style, boolean needed) {

		StringBuilder css = new StringBuilder();
		if (needed) {
			if (style.containsKey(StyleFormatConstants.FONT_FAMILY_KEY)) {
				String val = (String) style.get(StyleFormatConstants.FONT_FAMILY_KEY);
				css.append(" font-family: ").append(val).append(" ;\n");
			}

			if (style.containsKey(StyleFormatConstants.FONT_SIZE)) {
				Float val = (Float) style.get(StyleFormatConstants.FONT_SIZE);
				css.append("font-size: ").append(val.intValue()).append("pt ;\n");
			}
		}
		
		if (style.containsKey(StyleFormatConstants.FONT_COLOR)) {
			Color val = (Color) style.get(StyleFormatConstants.FONT_COLOR);
			css.append("color: rgb(").append(val.getRed()).append(",").append(val.getGreen()).append(",").append(val.getBlue())
					.append(") ;\n");
		}
		if (style.containsKey(StyleFormatConstants.FONT_STYLE_KEY)) {
			if (StyleFormatConstants.FONT_STYLE_NORMAL.equals(style.get(StyleFormatConstants.FONT_STYLE_KEY))) {
				css.append("font-weight: normal ;\n");
				css.append("font-style: normal;  \n");
			}
			if (StyleFormatConstants.FONT_STYLE_BOLD.equals(style.get(StyleFormatConstants.FONT_STYLE_KEY))) {
				css.append("font-weight: bold; \n");
				css.append("font-style: normal;  \n");
			}
			if (StyleFormatConstants.FONT_STYLE_ITALIC.equals(style.get(StyleFormatConstants.FONT_STYLE_KEY))) {
				css.append("font-weight: normal; \n");
				css.append("font-style: italic;  \n");
			}
			if (StyleFormatConstants.FONT_STYLE_BOLDITALIC.equals(style.get(StyleFormatConstants.FONT_STYLE_KEY))) {
				css.append("font-weight: bold; \n");
				css.append("font-style: italic; \n");
			}
		}
		if (style.containsKey(StyleFormatConstants.BACKGROUND_COLOR)) {
			Color val = (Color) style.get(StyleFormatConstants.BACKGROUND_COLOR);
			if ((val.getRed() != 255) || (val.getGreen() != 255) || (val.getBlue() != 255)) {				
				css.append("background-color: rgb(").append(val.getRed()).append(",").append(val.getGreen()).append(",")
						.append(val.getBlue()).append(") ;\n");
			}
		}
		if (style.containsKey(StyleFormatConstants.HORIZONTAL_ALIGN_KEY)) {
			if (StyleFormatConstants.HORIZONTAL_ALIGN_LEFT.equals(style.get(StyleFormatConstants.HORIZONTAL_ALIGN_KEY))) {
				css.append("text-align:left; \n");
			}
			if (StyleFormatConstants.HORIZONTAL_ALIGN_RIGHT.equals(style.get(StyleFormatConstants.HORIZONTAL_ALIGN_KEY))) {
				css.append("text-align:right; \n");
			}
			if (StyleFormatConstants.HORIZONTAL_ALIGN_CENTER.equals(style.get(StyleFormatConstants.HORIZONTAL_ALIGN_KEY))) {
				css.append("text-align:center; \n");
			}
		}
		if (style.containsKey(StyleFormatConstants.VERTICAL_ALIGN_KEY)) {
			if (StyleFormatConstants.VERTICAL_ALIGN_MIDDLE.equals(style.get(StyleFormatConstants.VERTICAL_ALIGN_KEY))) {
				css.append("vertical-align:middle; \n");
			}
			if (StyleFormatConstants.VERTICAL_ALIGN_TOP.equals(style.get(StyleFormatConstants.VERTICAL_ALIGN_KEY))) {
				css.append("vertical-align:top; \n");
			}
			if (StyleFormatConstants.VERTICAL_ALIGN_BOTTOM.equals(style.get(StyleFormatConstants.VERTICAL_ALIGN_KEY))) {
				css.append("vertical-align:bottom; \n");
			}
		}
		if (style.containsKey(StyleFormatConstants.PADDING_LEFT)) {
			Float val = (Float) style.get(StyleFormatConstants.PADDING_LEFT);
			css.append("padding-left:").append(val).append("pt; \n");
		}
		if (style.containsKey(StyleFormatConstants.PADDING_RIGHT)) {
			Float val = (Float) style.get(StyleFormatConstants.PADDING_RIGHT);
			css.append("padding-right:").append(val).append("pt; \n");
		}
		if (style.containsKey(StyleFormatConstants.PADDING_TOP)) {
			Float val = (Float) style.get(StyleFormatConstants.PADDING_TOP);
			css.append("padding-top:").append(val).append("pt; \n");
		}
		if (style.containsKey(StyleFormatConstants.PADDING_BOTTOM)) {
			Float val = (Float) style.get(StyleFormatConstants.PADDING_BOTTOM);
			css.append("padding-bottom:").append(val).append("px; \n");
		}
		
		if (needed) {
			if (style.containsKey(StyleFormatConstants.BORDER_LEFT)) {
				Float val = (Float) style.get(StyleFormatConstants.BORDER_LEFT);
				css.append("border-left:").append(val.intValue()).append("px; \n");
				css.append("border-left-style:solid; \n");
				Color color = (Color) style.get(StyleFormatConstants.BORDER_LEFT_COLOR);
				css.append("border-left-color: ").append(Integer.toHexString(color.getRGB() & 0x00ffffff)).append(" ;\n");

			} else {
				css.append("border-left: none; \n");
			}
			if (style.containsKey(StyleFormatConstants.BORDER_RIGHT)) {
				Float val = (Float) style.get(StyleFormatConstants.BORDER_RIGHT);
				css.append("border-right:").append(val.intValue()).append("px; \n");
				css.append("border-right-style:solid; \n");
				Color color = (Color) style.get(StyleFormatConstants.BORDER_RIGHT_COLOR);
				css.append("border-right-color: ").append(Integer.toHexString(color.getRGB() & 0x00ffffff)).append(" ;\n");
			} else {
				css.append("border-right: none; \n");
			}
			if (style.containsKey(StyleFormatConstants.BORDER_TOP)) {
				Float val = (Float) style.get(StyleFormatConstants.BORDER_TOP);
				css.append("border-top:").append(val.intValue()).append("px; \n");
				css.append("border-top-style:solid; \n");
				Color color = (Color) style.get(StyleFormatConstants.BORDER_TOP_COLOR);
				css.append("border-top-color: ").append(Integer.toHexString(color.getRGB() & 0x00ffffff)).append(" ;\n");
			} else {
				css.append("border-top: none; \n");
			}
			if (style.containsKey(StyleFormatConstants.BORDER_BOTTOM)) {
				Float val = (Float) style.get(StyleFormatConstants.BORDER_BOTTOM);
				css.append("border-bottom:").append(val.intValue()).append("px; \n");
				css.append("border-bottom-style:solid; \n");
				Color color = (Color) style.get(StyleFormatConstants.BORDER_BOTTOM_COLOR);
				css.append("border-bottom-color: ").append(Integer.toHexString(color.getRGB() & 0x00ffffff)).append(" ;\n");
			} else {
				css.append("border-bottom: none; \n");
			}
		}
		if (be != null) {
			if (!be.isWrapText()) {
				css.append("white-space: nowrap; \n");
			} else {
				css.append("word-wrap: break-word; \n");
				css.append("line-height: " + be.getPercentLineSpacing() + "%; \n");
			}
			// if (be.getTextRotation() != 0) {
			// css.append(getRotationStyle(be.getTextRotation()));
			// }
		}

		return css.toString();

	}
103896
function (resourceID) {
            var self = this;
            var stylePath = self.findStatic(resourceID, TemplateHelper.settings.styleExt, self.mergeCss);
            logger.trace('resourceID: %s,\nfindStyle: %s', resourceID, stylePath);
            return stylePath;
        }
444884
public NamedStyleInfo getNamedStyleInfo(String name) {
		for (NamedStyleInfo info : namedStyleInfos) {
			if (info.getName().equals(name)) {
				return info;
			}
		}
		return null;
	}
1374940
function getStyle(dom, name, defaultValue) {
    try {
      if (window.getComputedStyle) {
        return window.getComputedStyle(dom, null)[name];
      }
      return dom.currentStyle[name];
    } catch (e) {
      if (!Util.isNil(defaultValue)) {
        return defaultValue;
      }
      return null;
    }
  }
780756
function(nodes, options) {
        // Only the default or "normal" part of the StyleMap is processed now
        // To do the select or "highlight" bit, we'd need to change lots more

        for(var i=0, len=nodes.length; i<len; i++) {
            var node = nodes[i];
            var pairs = this.getElementsByTagNameNS(node, "*", 
                            "Pair");

            var id = node.getAttribute("id");
            for (var j=0, jlen=pairs.length; j<jlen; j++) {
                var pair = pairs[j];
                // Use the shortcut in the SLD format to quickly retrieve the 
                // value of a node. Maybe it's good to have a method in 
                // Format.XML to do this
                var key = this.parseProperty(pair, "*", "key");
                var styleUrl = this.parseProperty(pair, "*", "styleUrl");

                if (styleUrl && key == "normal") {
                    this.styles[(options.styleBaseUrl || "") + "#" + id] =
                        this.styles[(options.styleBaseUrl || "") + styleUrl];
                }

                // TODO: implement the "select" part
                //if (styleUrl && key == "highlight") {
                //}

            }
        }

    }
959059
def style(name)
      style = Mapnik::Style.new
      yield style
      styles[name] = style
    end
369118
public final Optional<? extends Style> getStyle(final String styleName) {
        final String styleRef = this.styles.get(styleName);
        if (styleRef != null) {
            return this.styleParser.loadStyle(this, this.clientHttpRequestFactory, styleRef);
        } else {
            return Optional.empty();
        }


    }
1109793
function (selector, context) {
    if (typeof selector === 'string') {
      if (context) {
        var cont;
        if (context.jquery) {
          cont = context[0];
          if (!cont) {
            return context;
          }
        } else {
          cont = context;
        }
        return $(cont.querySelectorAll(selector));
      }

      return $(document.querySelectorAll(selector));
    }

    return $(selector, context);
  }
1057798
def _read_style(style):
    ''' '''

    if isinstance(style, string_types):
        style = [style]
    else:
        style = list(style)

    return style
80149
private ShapeStyle findVertexStyle(GeometryEditService editService, GeometryIndex index) {
		if (editService.getIndexStateService().isMarkedForDeletion(index)) {
			return styleProvider.getVertexMarkForDeletionStyle();
		} else if (!editService.getIndexStateService().isEnabled(index)) {
			return styleProvider.getVertexDisabledStyle();
		} else if (editService.getIndexStateService().isSnapped(index)) {
			return styleProvider.getVertexSnappedStyle();
		}

		boolean selected = editService.getIndexStateService().isSelected(index);
		boolean highlighted = editService.getIndexStateService().isHightlighted(index);
		if (selected && highlighted) {
			return styleProvider.getVertexSelectHoverStyle();
		} else if (selected) {
			return styleProvider.getVertexSelectStyle();
		} else if (highlighted) {
			return styleProvider.getVertexHoverStyle();
		}
		return styleProvider.getVertexStyle();
	}
1252317
def style_defs(cls):
        
        formatter = HtmlFormatter()
        formatter.style.highlight_color = cls.VIOLATION_COLOR
        return formatter.get_style_defs()