AngleSharp by Florian Rappl

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

.NET API 1,172,480 bytes

 CssBackgroundClipProperty

More information available at: https://developer.mozilla.org/en-US/docs/Web/CSS/background-clip
using AngleSharp.Css; using AngleSharp.Extensions; using System.Collections.Generic; namespace AngleSharp.Dom.Css { internal sealed class CssBackgroundClipProperty : CssProperty, ICssBackgroundClipProperty, ICssProperty { internal static readonly BoxModel Default = BoxModel.BorderBox; internal static readonly IValueConverter<BoxModel> SingleConverter = Map.BoxModels.ToConverter(); internal static readonly IValueConverter<BoxModel[]> Converter = SingleConverter.FromList(); private readonly List<BoxModel> _clips; public IEnumerable<BoxModel> Clips => _clips; internal CssBackgroundClipProperty(CssStyleDeclaration rule) : base(PropertyNames.BackgroundClip, rule, PropertyFlags.None) { _clips = new List<BoxModel>(); Reset(); } public void SetClips(IEnumerable<BoxModel> clips) { _clips.Clear(); _clips.AddRange(clips); } internal override void Reset() { _clips.Clear(); _clips.Add(Default); } protected override bool IsValid(ICssValue value) { return Converter.TryConvert(value, SetClips); } } }