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.
Files changed (4) hide show
  1. package/README.md +13 -0
  2. package/package.json +1 -1
  3. package/styimat.js +1436 -1429
  4. 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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "styimat",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "一个高效的CSS变量预处理库,支持Lab/LCH颜色空间自动转换、嵌套选择器和Display P3广色域,让现代CSS开发更简洁强大。",
5
5
  "keywords": [
6
6
  "css",