Parser css code to add/remove or manage it.
CssParser
00 Remarks
01 Syntax
Microsoft.VisualBasic.MIME.Html.Language.CSS.CssParser
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| 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
| Name | Overloads | Summary |
|---|---|---|
| CommentBlock | 1 | CSS的注释总是以/*起始,以*/结束的 |
04 Members
BuildSelector(
String, CSSSelectorTypes)创建元素选择器表达式
Parameters
| Name | Type | Description |
|---|---|---|
name | String | - |
type | CSSSelectorTypes | - |
GetTagWithCSS(
String, String)主要的CSS解析函数
Remarks
对于从html标签的style属性中解析出来的样式字符串,会被直接赋值命名为*。
Parameters
| Name | Type | Description |
|---|---|---|
CSS | String | CSS文本内容 |
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
| Name | Type | Description |
|---|---|---|
style | String | the style text inside an element node selector |
IndivisualTags(
String)2017-10-1
原来的这个解析函数还没有考虑到注释的问题 当CSS之中存在注释的时候就无法正常工作了
Parameters
| Name | Type | Description |
|---|---|---|
input | String | - |
GetProperty(
String)将CSS字符串解析为键值对集合
Parameters
| Name | Type | Description |
|---|---|---|
input | String | - |
CommentBlock
CSS的注释总是以/起始,以/结束的
IsNullOrEmpty(CSSFile)