Example #1
0
        private bool ParseSingleValueHexColor(string color)
        {
            HtmlColor htmlColor;

            if (HtmlColor.TryFromHex(color, out htmlColor))
            {
                return(AddTerm(htmlColor));
            }
            return(false);
        }
Example #2
0
        private bool ParseSingleValueHexColor(string color)
        {
            HtmlColor htmlColor;

            if (HtmlColor.TryFromHex(color, out htmlColor))
            {
                return(AddTerm(htmlColor));
            }
            else
            {
                // the value is invalid - remove the property to use the default value
                RemoveCurrentProperty();
            }

            return(true);
        }