AngleSharp by Florian Rappl

<PackageReference Include="AngleSharp" Version="0.8.0" />

.NET API 1,171,968 bytes

 CssColumnsProperty

More information available at: https://developer.mozilla.org/en-US/docs/Web/CSS/columns
using AngleSharp.Css; using AngleSharp.Extensions; using System; using System.Collections.Generic; namespace AngleSharp.Dom.Css { internal sealed class CssColumnsProperty : CssShorthandProperty, ICssColumnsProperty, ICssProperty, ICssColumnWidthProperty, ICssColumnCountProperty { internal static readonly IValueConverter<Tuple<Length?, int?>> Converter = Converters.WithAny(CssColumnWidthProperty.Converter.Option(CssColumnWidthProperty.Default), CssColumnCountProperty.Converter.Option(CssColumnCountProperty.Default)); private readonly CssColumnCountProperty _count; private readonly CssColumnWidthProperty _width; public Length? Width => _width.Width; public int? Count => _count.Count; internal CssColumnsProperty(CssStyleDeclaration rule) : base(PropertyNames.Columns, rule, PropertyFlags.Animatable) { _count = Get<CssColumnCountProperty>(); _width = Get<CssColumnWidthProperty>(); } protected override bool IsValid(ICssValue value) { return Converter.TryConvert(value, delegate(Tuple<Length?, int?> m) { _width.SetWidth(m.Item1); _count.SetCount(m.Item2); }); } internal override string SerializeValue(IEnumerable<CssProperty> properties) { if (!IsComplete(properties)) return string.Empty; return _width.SerializeValue() + " " + _count.SerializeValue(); } } }