wffweb/src/main/java/com/webfirmframework/wffweb/css/Font.java
public static boolean isValid(final String cssValue) {
        // TODO verify this method. the fontFamily cannot be validated so this
        // method may be invalid. remove after verified

        if (cssValue == null || StringUtil.isBlank(cssValue)) {
            return false;
        }

        final String[] cssValueParts = getExtractedSubCssValues(cssValue);

        FontStyle fontStyle = null;
        FontVariant fontVariant = null;
        FontWeight fontWeight = null;
        FontSize fontSize = null;
        LineHeight lineHeight = null;
        FontFamily fontFamily = null;

        for (final String eachPart : cssValueParts) {
            boolean invalid = true;
            if (fontStyle == null && FontStyle.isValid(eachPart)) {
                fontStyle = FontStyle.getThis(eachPart);
                invalid = false;
            } else if (fontVariant == null && FontVariant.isValid(eachPart)) {
                fontVariant = FontVariant.getThis(eachPart);
                invalid = false;
            } else if (fontWeight == null && FontWeight.isValid(eachPart)) {
                fontWeight = FontWeight.getThis(eachPart);
                invalid = false;
            } else if (fontSize == null && FontSize.isValid(eachPart)) {
                fontSize = new FontSize(eachPart);
                invalid = false;
            } else if (lineHeight == null && LineHeight.isValid(eachPart)) {
                lineHeight = new LineHeight(eachPart);
                invalid = false;
            } else if (fontFamily == null
                    && (!FontFamily.isValidateFontFamilyNameGlobally()
                            || FontFamily.isValid(eachPart))) {
                fontFamily = new FontFamily(eachPart);
                invalid = false;
            }
            if (invalid) {
                return false;
            }
        }

        return fontStyle != null || fontVariant != null || fontWeight != null
                || fontSize != null || lineHeight != null || fontFamily != null;
    }
public static boolean isValid(final String cssValue) {
        // TODO verify this method. the fontFamily cannot be validated so this
        // method may be invalid. remove after verified

        if (cssValue == null || StringUtil.isBlank(cssValue)) {
            return false;
        }

        final String[] cssValueParts = getExtractedSubCssValues(cssValue);

        FontStyle fontStyle = null;
        FontVariant fontVariant = null;
        FontWeight fontWeight = null;
        FontSize fontSize = null;
        LineHeight lineHeight = null;
        FontFamily fontFamily = null;

        for (final String eachPart : cssValueParts) {
            boolean invalid = true;
            if (fontStyle == null && FontStyle.isValid(eachPart)) {
                fontStyle = FontStyle.getThis(eachPart);
                invalid = false;
            } else if (fontVariant == null && FontVariant.isValid(eachPart)) {
                fontVariant = FontVariant.getThis(eachPart);
                invalid = false;
            } else if (fontWeight == null && FontWeight.isValid(eachPart)) {
                fontWeight = FontWeight.getThis(eachPart);
                invalid = false;
            } else if (fontSize == null && FontSize.isValid(eachPart)) {
                fontSize = new FontSize(eachPart);
                invalid = false;
            } else if (lineHeight == null && LineHeight.isValid(eachPart)) {
                lineHeight = new LineHeight(eachPart);
                invalid = false;
            } else if (fontFamily == null
                    && (!FontFamily.isValidateFontFamilyNameGlobally()
                            || FontFamily.isValid(eachPart))) {
                fontFamily = new FontFamily(eachPart);
                invalid = false;
            }
            if (invalid) {
                return false;
            }
        }

        return fontStyle != null || fontVariant != null || fontWeight != null
                || fontSize != null || lineHeight != null || fontFamily != null;
    }
checks the given css value is valid for this class. It does't do a strict
validation.

@param cssValue
@return
@since 1.0.0
@author WFF