CssEmptyCellsProperty
Information can be found on MDN:
https://developer.mozilla.org/en-US/docs/Web/CSS/empty-cells
using AngleSharp.Css;
namespace AngleSharp.Dom.Css
{
internal sealed class CssEmptyCellsProperty : CssProperty, ICssEmptyCellsProperty, ICssProperty
{
internal static readonly IValueConverter<bool> Converter = Converters.Toggle(Keywords.Show, Keywords.Hide);
internal static readonly bool Default = true;
private bool _visible;
public bool IsVisible => _visible;
internal CssEmptyCellsProperty(CssStyleDeclaration rule)
: base(PropertyNames.EmptyCells, rule, PropertyFlags.Inherited)
{
Reset();
}
public void SetVisible(bool visible)
{
_visible = visible;
}
internal override void Reset()
{
_visible = Default;
}
protected override bool IsValid(ICssValue value)
{
return Converter.TryConvert(value, SetVisible);
}
}
}