CssTableLayoutProperty
Information can be found on MDN:
https://developer.mozilla.org/en-US/docs/Web/CSS/table-layout
using AngleSharp.Css;
namespace AngleSharp.Dom.Css
{
internal sealed class CssTableLayoutProperty : CssProperty, ICssTableLayoutProperty, ICssProperty
{
internal static readonly IValueConverter<bool> Converter = Converters.Toggle(Keywords.Fixed, Keywords.Auto);
internal static readonly bool Default = false;
private bool _fixed;
public bool IsFixed => _fixed;
internal CssTableLayoutProperty(CssStyleDeclaration rule)
: base(PropertyNames.TableLayout, rule, PropertyFlags.None)
{
Reset();
}
public void SetFixed(bool fixed)
{
_fixed = fixed;
}
internal override void Reset()
{
_fixed = Default;
}
protected override bool IsValid(ICssValue value)
{
return Converter.TryConvert(value, SetFixed);
}
}
}