예제 #1
0
        /// <summary>
        /// 解析 CSS 样式属性
        /// </summary>
        /// <param name="styleExpression">CSS 样式设置表达式</param>
        /// <param name="specification">所需要采用的 CSS 规范</param>
        /// <returns>CSS 样式属性</returns>
        public static CssStyle ParseCssStyle(string styleExpression, CssStyleSpecificationBase specification = null)
        {
            var style = new CssStyle(specification ?? new Css21StyleSpecification());

            style.SetProperties(ParseProperties(styleExpression));
            return(style);
        }
예제 #2
0
파일: CssStyle.cs 프로젝트: zpzgone/Jumony
 /// <summary>
 /// 创建 CssStyle 对象
 /// </summary>
 /// <param name="specification">要遵循的 CSS 规范</param>
 public CssStyle(CssStyleSpecificationBase specification)
 {
     Specification = specification;
 }