CssVerticalAlignProperty
Information can be found on MDN:
https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align
Gets the alignment of of the element's baseline at the given length
above the baseline of its parent or like absolute values, with the
percentage being a percent of the line-height property.
Gets the selected vertical alignment mode.
using AngleSharp.Css;
using AngleSharp.Extensions;
namespace AngleSharp.Dom.Css
{
internal sealed class CssVerticalAlignProperty : CssProperty
{
internal CssVerticalAlignProperty(CssStyleDeclaration rule)
: base(PropertyNames.VerticalAlign, rule, PropertyFlags.Animatable)
{
}
protected override object GetDefault(IElement element)
{
return VerticalAlignment.Baseline;
}
protected override object Compute(IElement element)
{
return Converters.VerticalAlignmentConverter.Convert(base.Value);
}
protected override bool IsValid(CssValue value)
{
if (!Converters.LengthOrPercentConverter.Validate(value))
return Converters.VerticalAlignmentConverter.Validate(value);
return true;
}
}
}