CssTextDecorationLineProperty
Information:
https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration-line
Gets the enumeration over all selected styles for text decoration
lines.
using AngleSharp.Css;
using AngleSharp.Extensions;
namespace AngleSharp.Dom.Css
{
internal sealed class CssTextDecorationLineProperty : CssProperty
{
private static readonly TextDecorationLine[] Default = new TextDecorationLine[0];
private static readonly IValueConverter<TextDecorationLine[]> SingleConverter = Map.TextDecorationLines.ToConverter().Many(1, 65535);
internal static readonly IValueConverter<TextDecorationLine[]> Converter = SingleConverter.Or(Keywords.None, Default);
internal CssTextDecorationLineProperty(CssStyleDeclaration rule)
: base(PropertyNames.TextDecorationLine, rule, PropertyFlags.None)
{
}
protected override object GetDefault(IElement element)
{
return Default;
}
protected override object Compute(IElement element)
{
return Converter.Convert(base.Value);
}
protected override bool IsValid(CssValue value)
{
return Converter.Validate(value);
}
}
}