Beispiel #1
0
        public CssBlock(SpecifierList specifiers)
        {
            Specifiers = specifiers;

            var specifiersArray = specifiers.ToArray();

            Head = Specifiers.ToCSS();
        }
Beispiel #2
0
        /// <summary>
        /// Get specifier list representation of given node
        /// </summary>
        /// <param name="specifiersNode">Node representing specifier list</param>
        /// <returns>Specifier list for given node</returns>
        private SpecifierList getSpecifiers(Node specifiersNode)
        {
            var result = new SpecifierList();

            foreach (var specifierNode in specifiersNode.ChildNodes)
            {
                var specifier = getSpecifier(specifierNode);

                result.Add(specifier);
            }

            return(result);
        }
Beispiel #3
0
        internal void SetParent(SpecifierList parent)
        {
            //TODO resolve placeholder sign

            var newSpecifiers = new List <string>();

            foreach (var prefix in parent._specifiers)
            {
                foreach (var suffix in _specifiers)
                {
                    var specifier = prefix + " " + suffix;
                    newSpecifiers.Add(specifier);
                }
            }

            _specifiers = newSpecifiers;
        }