CssMinWidthProperty
Information can be found on MDN:
https://developer.mozilla.org/en-US/docs/Web/CSS/min-width
using AngleSharp.Css;
namespace AngleSharp.Dom.Css
{
internal sealed class CssMinWidthProperty : CssProperty, ICssMinWidthProperty, ICssProperty
{
internal static readonly Length Default = Length.Zero;
internal static readonly IValueConverter<Length> Converter = Converters.LengthOrPercentConverter;
private Length _mode;
public Length? Limit => _mode;
internal CssMinWidthProperty(CssStyleDeclaration rule)
: base(PropertyNames.MinWidth, rule, PropertyFlags.Animatable)
{
Reset();
}
public void SetLimit(Length mode)
{
_mode = mode;
}
internal override void Reset()
{
_mode = Default;
}
protected override bool IsValid(ICssValue value)
{
return Converter.TryConvert(value, SetLimit);
}
}
}