public static IEnumerable<AttributeToCss> GetAllStyles(IDomObject domElement, StyleClass styleClass)
        {
	        var attributeCssList = new List<AttributeToCss>();

	        AddSpecialPremailerAttributes(attributeCssList, styleClass);

		   if (styleClass.Attributes.Count > 0)
			   attributeCssList.Add(new AttributeToCss { AttributeName = "style", CssValue = styleClass.ToString() });

		   attributeCssList.AddRange(CssStyleEquivalence.FindEquivalent(domElement, styleClass));

            return attributeCssList;
        }
Esempio n. 2
0
        public static IEnumerable <AttributeToCss> GetAllStyles(IDomObject domElement, StyleClass styleClass)
        {
            var attributeCssList = new List <AttributeToCss>
            {
                new AttributeToCss {
                    AttributeName = "style", CssValue = styleClass.ToString()
                }
            };

            attributeCssList.AddRange(CssStyleEquivalence.FindEquivalent(domElement, styleClass));

            return(attributeCssList);
        }
Esempio n. 3
0
        public static IEnumerable <AttributeToCss> GetAllStyles(IDomObject domElement, StyleClass styleClass)
        {
            var attributeCssList = new List <AttributeToCss>();

            AddSpecialPremailerAttributes(attributeCssList, styleClass);

            if (styleClass.Attributes.Count > 0)
            {
                attributeCssList.Add(new AttributeToCss {
                    AttributeName = "style", CssValue = styleClass.ToString()
                });
            }

            attributeCssList.AddRange(CssStyleEquivalence.FindEquivalent(domElement, styleClass));

            return(attributeCssList);
        }