AngleSharp by AngleSharp

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

.NET API 1,244,160 bytes

 DeclarationCondition

using AngleSharp.Extensions; namespace AngleSharp.Dom.Css { internal sealed class DeclarationCondition : CssNode, IConditionFunction, ICssNode, IStyleFormattable { private readonly CssProperty _property; private readonly CssValue _value; public DeclarationCondition(CssProperty property, CssValue value) { _property = property; _value = value; } public bool Check() { if (!(_property is CssUnknownProperty)) return _property.TrySetValue(_value); return false; } public override string ToCss(IStyleFormatter formatter) { string argument = formatter.Declaration(_property.Name, _value.CssText, _property.IsImportant); return string.Empty.CssFunction(argument); } } }