@tbela99/css-parser 1.3.1 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.3.3
4
+
5
+ - [x] relative color computation bug #105
6
+ - [x] allow duplicated declarations of whitelisted properties #106
7
+
8
+ ## v1.3.2
9
+
10
+ - [x] add missing return type
11
+
3
12
  ## v1.3.1
4
13
 
5
14
  - [x] generate documentation
package/README.md CHANGED
@@ -41,6 +41,10 @@ $ deno add @tbela99/css-parser
41
41
  - flatten @import rules
42
42
  - experimental CSS prefix removal
43
43
 
44
+ ## Online documentation
45
+
46
+ See the full documentation at the [CSS Parser](https://tbela99.github.io/css-parser/docs) documentation site
47
+
44
48
  ## Playground
45
49
 
46
50
  Try it [online](https://tbela99.github.io/css-parser/playground/)
@@ -97,8 +101,7 @@ Javascript module from cdn
97
101
 
98
102
  <script type="module">
99
103
 
100
- import {transform} from 'https://esm.sh/@tbela99/css-parser@1.3.1/web';
101
-
104
+ import {transform} from 'https://esm.sh/@tbela99/css-parser@1.3.3/web';
102
105
 
103
106
  const css = `
104
107
  .s {
@@ -119,11 +122,44 @@ Javascript module
119
122
  <script src="dist/web.js" type="module"></script>
120
123
  ```
121
124
 
122
- Single Javascript file
125
+ Javascript umd module from cdn
123
126
 
124
- ```javascript
127
+ ```html
128
+
129
+ <script src="https://unpkg.com/@tbela99/css-parser@1.3.2/dist/index-umd-web.js"></script>
130
+ <script>
131
+
132
+ (async () => {
133
+
134
+ const css = `
135
+
136
+ .table {
137
+ border-collapse: collapse;
138
+ width: 100%;
139
+ }
125
140
 
126
- <script src="dist/index-umd-web.js"></script>
141
+ .table td, .table th {
142
+ border: 1px solid #ddd;
143
+ padding: 8px;
144
+ }
145
+
146
+ .table tr:nth-child(even){background-color: #f2f2f2;}
147
+
148
+ .table tr:hover {background-color: #ddd;}
149
+
150
+ .table th {
151
+ padding-top: 12px;
152
+ padding-bottom: 12px;
153
+ text-align: left;
154
+ background-color: #4CAF50;
155
+ color: white;
156
+ }
157
+ `;
158
+
159
+ console.debug(await CSSParser.transform(css, {beautify: true, convertColor: CSSParser.ColorType.OKLCH}).then(r => r.code));
160
+ })();
161
+
162
+ </script>
127
163
  ```
128
164
 
129
165
  ## Transform