/// <summary>
 /// Returns a CSS code representation of the rule.
 /// </summary>
 /// <returns>A string that contains the code.</returns>
 public override String ToCss()
 {
     return(_selectorText + " {" + Environment.NewLine + _style.ToCss() + "}");
 }
 /// <summary>
 /// Returns a CSS code representation of the rule.
 /// </summary>
 /// <returns>A string that contains the code.</returns>
 public override String ToCss()
 {
     return("@font-face {" + Environment.NewLine + _cssRules.ToCss() + "}");
 }
 /// <summary>
 /// Returns a CSS code representation of the rule.
 /// </summary>
 /// <returns>A string that contains the code.</returns>
 public override String ToCss()
 {
     return(String.Format("@page {0} {{{1}{2}}}", _selectorText, Environment.NewLine, _style.ToCss()));
 }
Beispiel #4
0
        /// <summary>
        /// Returns a CSS code representation of the rule.
        /// </summary>
        /// <returns>A string that contains the code.</returns>
        public override String ToCss()
        {
            var inner = String.Concat(" { ", _style.ToCss(), _style.Length > 0 ? " }" : "}");

            return(String.Concat("@page ", _selector.Text, inner));
        }
Beispiel #5
0
 /// <summary>
 /// Converts the list of CSS declarations to a CSS block string.
 /// </summary>
 /// <param name="style">The list of CSS declarations.</param>
 /// <returns>The block string representation.</returns>
 public static String ToCssBlock(this CSSStyleDeclaration style)
 {
     return(String.Concat("{ ", style.ToCss(), style.Length > 0 ? " }" : "}"));
 }