/// <summary>Processes the finished At-rule block.</summary> /// <param name="atRule">the at rule</param> private void ProcessFinishedAtRuleBlock(CssNestedAtRule atRule) { if (nestedAtRules.Count != 0) { nestedAtRules.Peek().AddStatementToBody(atRule); } else { styleSheet.AddStatement(atRule); } }
/// <summary>Finish the At-rule block.</summary> internal void FinishAtRuleBlock() { IList <CssDeclaration> storedProps = storedPropertiesWithoutSelector.Pop(); CssNestedAtRule atRule = nestedAtRules.Pop(); if (isCurrentRuleSupported) { ProcessFinishedAtRuleBlock(atRule); if (!storedProps.IsEmpty()) { atRule.AddBodyCssDeclarations(storedProps); } } isCurrentRuleSupported = IsCurrentRuleSupported(); buffer.Length = 0; }