Skip to content

Commit 7bd39b6

Browse files
committed
update doc
1 parent 18d9eb5 commit 7bd39b6

File tree

242 files changed

+5268
-3493
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

242 files changed

+5268
-3493
lines changed

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,45 @@ console.debug(render(result.ast.chi[0].chi[1].chi[1], {withParents: true}));
365365

366366
```
367367

368+
### CSS Modules
369+
370+
CSS modules features are fully supported. refer to the [CSS modules](https://tbela99.github.io/css-parser/docs/documents/Guide.CSS_modules.html) documentation for more information.
371+
372+
```javascript
373+
import {transform} from '@tbela99/css-parser';
374+
375+
const css = `
376+
.table {
377+
border-collapse: collapse;
378+
width: 100%;
379+
}
380+
381+
.table td, .table th {
382+
border: 1px solid #ddd;
383+
padding: 8px;
384+
}
385+
386+
.table tr:nth-child(even){background-color: #f2f2f2;}
387+
388+
.table tr:hover {background-color: #ddd;}
389+
390+
.table th {
391+
padding-top: 12px;
392+
padding-bottom: 12px;
393+
text-align: left;
394+
background-color: #4CAF50;
395+
color: white;
396+
}
397+
`;
398+
399+
const result = await transform(css, {module: true});
400+
401+
// css code
402+
console.log(result.code);
403+
// css mapping
404+
console.log(result.mapping);
405+
```
406+
368407
### Convert colors
369408

370409
```javascript

docs/assets/highlight.css

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,28 +27,28 @@
2727
--dark-hl-12: #6A9955;
2828
--light-hl-13: #267F99;
2929
--dark-hl-13: #4EC9B0;
30-
--light-hl-14: #098658;
31-
--dark-hl-14: #B5CEA8;
32-
--light-hl-15: #800000;
33-
--dark-hl-15: #D7BA7D;
30+
--light-hl-14: #800000;
31+
--dark-hl-14: #D7BA7D;
32+
--light-hl-15: #0451A5;
33+
--dark-hl-15: #CE9178;
3434
--light-hl-16: #0451A5;
35-
--dark-hl-16: #CE9178;
36-
--light-hl-17: #CD3131;
37-
--dark-hl-17: #F44747;
38-
--light-hl-18: #811F3F;
39-
--dark-hl-18: #D16969;
40-
--light-hl-19: #D16969;
41-
--dark-hl-19: #CE9178;
42-
--light-hl-20: #000000;
43-
--dark-hl-20: #D7BA7D;
44-
--light-hl-21: #EE0000;
45-
--dark-hl-21: #D7BA7D;
46-
--light-hl-22: #EE0000;
47-
--dark-hl-22: #DCDCAA;
48-
--light-hl-23: #0451A5;
49-
--dark-hl-23: #9CDCFE;
50-
--light-hl-24: #000000;
51-
--dark-hl-24: #C8C8C8;
35+
--dark-hl-16: #9CDCFE;
36+
--light-hl-17: #000000;
37+
--dark-hl-17: #C8C8C8;
38+
--light-hl-18: #098658;
39+
--dark-hl-18: #B5CEA8;
40+
--light-hl-19: #CD3131;
41+
--dark-hl-19: #F44747;
42+
--light-hl-20: #811F3F;
43+
--dark-hl-20: #D16969;
44+
--light-hl-21: #D16969;
45+
--dark-hl-21: #CE9178;
46+
--light-hl-22: #000000;
47+
--dark-hl-22: #D7BA7D;
48+
--light-hl-23: #EE0000;
49+
--dark-hl-23: #D7BA7D;
50+
--light-hl-24: #EE0000;
51+
--dark-hl-24: #DCDCAA;
5252
--light-code-background: #FFFFFF;
5353
--dark-code-background: #1E1E1E;
5454
}

docs/assets/navigation.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/assets/search.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)