public static String convertIdent(CSSName cssName,String ident){
  if (ident.equals("inherit")) {
    return ident;
  }
  String val=ident;
  if (cssName == CSSName.FONT_SIZE) {
    String size=(String)FONT_SIZES.get(ident);
    val=(size == null ? ident : size);
  }
 else   if (cssName == CSSName.FONT_WEIGHT) {
    String size=(String)FONT_WEIGHTS.get(ident);
    val=(size == null ? ident : size);
  }
 else   if (cssName == CSSName.BACKGROUND_POSITION) {
    String pos=(String)BACKGROUND_POSITIONS.get(ident);
    val=(pos == null ? ident : pos);
  }
 else   if (cssName == CSSName.BORDER_BOTTOM_WIDTH || cssName == CSSName.BORDER_LEFT_WIDTH || cssName == CSSName.BORDER_RIGHT_WIDTH || cssName == CSSName.BORDER_WIDTH_SHORTHAND || cssName == CSSName.BORDER_TOP_WIDTH) {
    String size=(String)BORDER_WIDTHS.get(ident);
    val=(size == null ? ident : size);
  }
 else   if (cssName == CSSName.BORDER_BOTTOM_COLOR || cssName == CSSName.BORDER_LEFT_COLOR || cssName == CSSName.BORDER_RIGHT_COLOR || cssName == CSSName.BORDER_COLOR_SHORTHAND || cssName == CSSName.BORDER_TOP_COLOR || cssName == CSSName.BACKGROUND_COLOR || cssName == CSSName.COLOR || cssName == CSSName.OUTLINE_COLOR) {
    val=getColorHex(ident);
    if (val == null) {
      String fallback=CSSName.initialValue(cssName);
      if (fallback.startsWith("="))       fallback=CSSName.initialValue(CSSName.getByPropertyName(fallback.substring(1)));
      val=getColorHex(fallback);
    }
  }
  return val;
}

public static String convertIdent ( CSSName cssName , String ident ) { if ( ident . equals ( "inherit" ) ) { return ident ; } String val = ident ; if ( cssName == CSSName . FONT_SIZE ) { String size = ( String ) FONT_SIZES . get ( ident ) ; val = ( size == null ? ident : size ) ; } else if ( cssName == CSSName . FONT_WEIGHT ) { String size = ( String ) FONT_WEIGHTS . get ( ident ) ; val = ( size == null ? ident : size ) ; } else if ( cssName == CSSName . BACKGROUND_POSITION ) { String pos = ( String ) BACKGROUND_POSITIONS . get ( ident ) ; val = ( pos == null ? ident : pos ) ; } else if ( cssName == CSSName . BORDER_BOTTOM_WIDTH || cssName == CSSName . BORDER_LEFT_WIDTH || cssName == CSSName . BORDER_RIGHT_WIDTH || cssName == CSSName . BORDER_WIDTH_SHORTHAND || cssName == CSSName . BORDER_TOP_WIDTH ) { String size = ( String ) BORDER_WIDTHS . get ( ident ) ; val = ( size == null ? ident : size ) ; } else if ( cssName == CSSName . BORDER_BOTTOM_COLOR || cssName == CSSName . BORDER_LEFT_COLOR || cssName == CSSName . BORDER_RIGHT_COLOR || cssName == CSSName . BORDER_COLOR_SHORTHAND || cssName == CSSName . BORDER_TOP_COLOR || cssName == CSSName . BACKGROUND_COLOR || cssName == CSSName . COLOR || cssName == CSSName . OUTLINE_COLOR ) { val = getColorHex ( ident ) ; if ( val == null ) { String fallback = CSSName . initialValue ( cssName ) ; if ( fallback . startsWith ( "=" ) ) fallback = CSSName . initialValue ( CSSName . getByPropertyName ( fallback . substring ( 1 ) ) ) ; val = getColorHex ( fallback ) ; } } return val ; }
description of the method
