CssWidowsProperty
Information can be found on MDN:
https://developer.mozilla.org/en-US/docs/Web/CSS/widows
using AngleSharp.Css;
namespace AngleSharp.Dom.Css
{
internal sealed class CssWidowsProperty : CssProperty, ICssWidowsProperty, ICssProperty
{
internal static readonly int Default = 2;
private int _count;
public int Count => _count;
internal CssWidowsProperty(CssStyleDeclaration rule)
: base(PropertyNames.Widows, rule, PropertyFlags.Inherited)
{
Reset();
}
public void SetCount(int value)
{
_count = value;
}
internal override void Reset()
{
_count = Default;
}
protected override bool IsValid(ICssValue value)
{
return Converters.IntegerConverter.TryConvert(value, SetCount);
}
}
}