Example #1
0
        public Int32 Insert(String ruleText, Int32 index)
        {
            var rule = Parser.ParseRule(ruleText);

            _rules.Insert(index, rule);
            return(index);
        }
Example #2
0
        /// <summary>
        /// Used to insert a new rule into the media block.
        /// </summary>
        /// <param name="rule">
        /// The parsable text representing the rule. For rule sets this contains
        /// both the selector and the style declaration. For at-rules, this
        /// specifies both the at-identifier and the rule content.
        /// </param>
        /// <param name="index">
        /// The index within the media block's rule collection of the rule before
        /// which to insert the specified rule.
        /// </param>
        /// <returns>
        /// The index within the media block's rule collection of the newly
        /// inserted rule.
        /// </returns>
        public Int32 Insert(String rule, Int32 index)
        {
            var value = Parser.ParseRule(rule);

            _rules.Insert(value, index, Owner, this);
            return(index);
        }
Example #3
0
        /// <summary>
        /// Inserts a new style rule into the current style sheet.
        /// </summary>
        /// <param name="rule">
        /// A string containing the rule to be inserted (selector and
        /// declaration).
        /// </param>
        /// <param name="index">
        /// The index representing the position to be inserted.
        /// </param>
        /// <returns>The current stylesheet.</returns>
        public Int32 Insert(String rule, Int32 index)
        {
            var value = _parser.ParseRule(rule);

            _rules.Insert(value, index, this, null);
            return(index);
        }
Example #4
0
        public Int32 Insert(String ruleText, Int32 index)
        {
            var rule = _parser.ParseRule(ruleText);

            rule.Owner = this;
            _rules.Insert(index, rule);
            return(index);
        }
Example #5
0
        /// <summary>
        /// Inserts a new keyframe rule into the current CSSKeyframesRule.
        /// </summary>
        /// <param name="rule">A string containing a keyframe in the same format as an entry of a @keyframes at-rule.</param>
        public void Add(String rule)
        {
            var value = Parser.ParseKeyframeRule(rule);

            _rules.Insert(value, _rules.Length, Owner, this);
        }