nuget server logo nuget api documents
↑

API Docs / Microsoft.VisualBasic.MIME.Html / CssParser

CssParser

Full name Microsoft.VisualBasic.MIME.Html.Language.CSS.CssParser Assembly Microsoft.VisualBasic.MIME.Html Members 7

Parser css code to add/remove or manage it.

00 Remarks

Jo-CSS-Parser

https://github.com/rizwan3d/Jo-CSS-Parser

Complete Css Parser Writen in C#

01 Syntax

Microsoft.VisualBasic.MIME.Html.Language.CSS.CssParser

02 Methods

NameOverloadsSummary
BuildSelector 1 创建元素选择器表达式
GetTagWithCSS 1 主要的CSS解析函数
ParseStyle 1 Parse the css style string for a given selector, example as: background-color: lightblue;
IndivisualTags 1 2017-10-1 原来的这个解析函数还没有考虑到注释的问题 当CSS之中存在注释的时候就无法正常工作了
GetProperty 1 将CSS字符串解析为键值对集合
IsNullOrEmpty 1

03 Fields

NameOverloadsSummary
CommentBlock 1 CSS的注释总是以/*起始,以*/结束的

04 Members

method BuildSelector #
BuildSelector(String, CSSSelectorTypes)

创建元素选择器表达式

Parameters
NameTypeDescription
nameString

-

typeCSSSelectorTypes

-

method GetTagWithCSS #
GetTagWithCSS(String, String)

主要的CSS解析函数

Remarks

对于从html标签的style属性中解析出来的样式字符串,会被直接赋值命名为*。

Parameters
NameTypeDescription
CSSString

CSS文本内容

method ParseStyle #
ParseStyle(String)

Parse the css style string for a given selector, example as: background-color: lightblue;

Remarks

all of the css property name is in lower case.

Parameters
NameTypeDescription
styleString

the style text inside an element node selector

method IndivisualTags #
IndivisualTags(String)
2017-10-1

原来的这个解析函数还没有考虑到注释的问题 当CSS之中存在注释的时候就无法正常工作了

Parameters
NameTypeDescription
inputString

-

method GetProperty #
GetProperty(String)

将CSS字符串解析为键值对集合

Parameters
NameTypeDescription
inputString

-

field CommentBlock #
CommentBlock

CSS的注释总是以/起始,以/结束的

method IsNullOrEmpty #
IsNullOrEmpty(CSSFile)