Skip to content

Commit d8d81b2

Browse files
committed
Update README.md
1 parent 707a3f4 commit d8d81b2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ cssobj.external(style => {
5252
// parsed external style!
5353
console.log(style)
5454
})
55+
56+
// static stylesheet
57+
cssobj.static(".blob { background-color: #d7d7d7; }", style => {
58+
// parsed static style
59+
console.log(style)
60+
})
5561
```
5662

5763
or use alias `CSSObj` to **CSSObject** instance:
@@ -60,6 +66,7 @@ or use alias `CSSObj` to **CSSObject** instance:
6066
CSSObj.options({load_min: false})
6167
.local(style => console.log(style))
6268
.external(style => console.log(style))
69+
.static(".blob { background-color: #d7d7d7; }", style => console.log(style))
6370
```
6471

6572
<!-- Usage with full code -->
@@ -147,6 +154,7 @@ CSSObject:
147154
IMedia.js
148155
ISelector.js
149156
IPseudo.js
157+
IUnit.js
150158
parser: # files responsible for data processing
151159
BlocksParser.js
152160
CommentBlock.js
@@ -198,6 +206,7 @@ See below, the objects and their properties that are returned
198206
```yml
199207
CSSObject:
200208
options(options: object)
209+
static(text: string, callback: function)
201210
local(callback: function, all: boolean?)
202211
external(callback: function) # callback in promise
203212

@@ -212,6 +221,7 @@ Stylesheet:
212221
comments: CommentBlock[]
213222
blocks: BlockRule[]
214223
variables: VariableRule[]
224+
filename: string | null
215225
statments: {
216226
charsets: CharsetRule[],
217227
imports: ImportRule[],

0 commit comments

Comments
 (0)