CssTextIndentProperty
More information available at:
https://developer.mozilla.org/en-US/docs/Web/CSS/text-indent
Gets the indentation, which is either a percentage of the
containing block width or specified as fixed length. Negative
values are allowed.
using AngleSharp.Css;
using AngleSharp.Extensions;
namespace AngleSharp.Dom.Css
{
internal sealed class CssTextIndentProperty : CssProperty
{
internal CssTextIndentProperty(CssStyleDeclaration rule)
: base(PropertyNames.TextIndent, rule, PropertyFlags.Inherited | PropertyFlags.Animatable)
{
}
protected override object GetDefault(IElement element)
{
return Length.Zero;
}
protected override object Compute(IElement element)
{
return Converters.LengthOrPercentConverter.Convert(base.Value);
}
protected override bool IsValid(ICssValue value)
{
return Converters.LengthOrPercentConverter.Validate(value);
}
}
}