CssOrphansProperty
Information can be found on MDN:
https://developer.mozilla.org/en-US/docs/Web/CSS/orphans
Gets the minimum number of lines in a block container
that must be left at the bottom of the page.
using AngleSharp.Css;
using AngleSharp.Extensions;
namespace AngleSharp.Dom.Css
{
internal sealed class CssOrphansProperty : CssProperty
{
internal CssOrphansProperty(CssStyleDeclaration rule)
: base(PropertyNames.Orphans, rule, PropertyFlags.Inherited)
{
}
protected override object GetDefault(IElement element)
{
return 2;
}
protected override object Compute(IElement element)
{
return Converters.PositiveIntegerConverter.Convert(base.Value);
}
protected override bool IsValid(CssValue value)
{
return Converters.PositiveIntegerConverter.Validate(value);
}
}
}