コード例 #1
0
 /// <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() + "}");
 }
コード例 #2
0
 /// <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() + "}");
 }
コード例 #3
0
 /// <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()));
 }
コード例 #4
0
ファイル: CSSPageRule.cs プロジェクト: h82258652/AngleSharp
        /// <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));
        }
コード例 #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 ? " }" : "}"));
 }