Esempio n. 1
0
 /// <summary>
 /// Interprets the string as CSS source code and returns new CSSStyleSheet
 /// with the CSS-OM representation.
 /// </summary>
 /// <param name="content">The string to use as source code.</param>
 /// <param name="configuration">[Optional] Custom options to use for the document generation.</param>
 /// <returns>The CSS stylesheet.</returns>
 public static ICssStyleSheet ParseCss(this String content, IConfiguration configuration = null)
 {
     return(DocumentBuilder.Css(content, configuration));
 }
Esempio n. 2
0
 /// <summary>
 /// Uses the URL to download the content, parse it as CSS and returning
 /// a new CSSStyleSheet with the CSS-OM representation.
 /// </summary>
 /// <param name="uri">The source of the CSS content.</param>
 /// <param name="configuration">[Optional] Custom options to use for the document generation.</param>
 /// <returns>The CSS stylesheet.</returns>
 public static ICssStyleSheet GetCss(this Uri uri, IConfiguration configuration = null)
 {
     return(DocumentBuilder.Css(uri, configuration));
 }
 /// <summary>
 /// Builds a new CSSStyleSheet with the given source code string.
 /// </summary>
 /// <param name="configuration">Options to use for the document generation.</param>
 /// <param name="sourceCode">The string to use as source code.</param>
 /// <param name="url">[Optional] The base URL of the document.</param>
 /// <returns>The constructed CSS stylesheet.</returns>
 public static ICssStyleSheet ParseCss(this IConfiguration configuration, String sourceCode, String url = null)
 {
     return(DocumentBuilder.Css(sourceCode, configuration, url));
 }