/// <summary> /// Determines if the given value represents a valid state of this property. /// </summary> /// <param name="value">The state that should be used.</param> /// <returns>True if the state is valid, otherwise false.</returns> protected override Boolean IsValid(CSSValue value) { FontSize?size; var distance = value.ToDistance(); if (distance != null) { _size = distance; _mode = FontSize.Custom; } else if ((size = value.ToFontSize()).HasValue) { var mode = size.Value; _size = mode.ToDistance(); _mode = mode; } else { return(false); } return(true); }