styimat 1.5.0 → 1.6.0
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/README.md +13 -0
- package/package.json +1 -1
- package/styimat.js +1436 -1429
- package/styimat.min.js +126 -126
package/README.md
CHANGED
|
@@ -213,6 +213,19 @@ const mathResult = styimat.math.evaluate('100px / 2'); // "50px"
|
|
|
213
213
|
const rgbColor = styimat.colorUtils.labToRGB(54.7, 77.9, 80.1);
|
|
214
214
|
```
|
|
215
215
|
|
|
216
|
+
### 4. HTMLElement的新方法
|
|
217
|
+
HTMLElement由此库新增了`cssVar`属性,可以设置、获取css变量
|
|
218
|
+
|
|
219
|
+
```javascript
|
|
220
|
+
ele.cssVar(prop, value); // 设置prop变量为value
|
|
221
|
+
ele.cssVar.prop = value; // 设置prop变量为value
|
|
222
|
+
ele.cssVar[prop] = value; // 设置prop变量为value
|
|
223
|
+
ele.cssVar(prop); // 获取prop变量的值
|
|
224
|
+
ele.cssVar.prop; // 获取prop变量的值
|
|
225
|
+
ele.cssVar[prop] // 获取prop变量的值
|
|
226
|
+
|
|
227
|
+
```
|
|
228
|
+
|
|
216
229
|
### 4. 混合使用示例
|
|
217
230
|
|
|
218
231
|
```javascript
|