We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e6b4f90 + 8981589 commit 2b14dc2Copy full SHA for 2b14dc2
__test__/index.spec.mjs.md
@@ -241,7 +241,7 @@ Generated by [AVA](https://avajs.dev).
241
_flexShrink: 0,␊
242
_fontSize: convertNumber2PX(12),␊
243
_margin: {␊
244
- top: convertNumber2PX(12),␊
+ top: convertNumber2PX(-12),␊
245
right: convertNumber2PX(10),␊
246
bottom: convertNumber2PX(12),␊
247
left: convertNumber2PX(32)␊
@@ -566,7 +566,7 @@ Generated by [AVA](https://avajs.dev).
566
_fontWeight: 500,␊
567
_height: convertNumber2PX(800),␊
568
569
570
571
572
@@ -644,7 +644,7 @@ Generated by [AVA](https://avajs.dev).
644
645
646
647
648
649
650
__test__/index.spec.mjs.snap
1 Byte
src/utils.rs
@@ -67,7 +67,7 @@ pub fn prefix_style_key(s: &str) -> String {
67
68
pub fn convert_px_to_units(input: String) -> Expr {
69
// 定义匹配 '16px' 的正则表达式
70
- let re = Regex::new(r"(\d+)px").unwrap();
+ let re = Regex::new(r"(-?(\d+(\.\d*)?|\.\d+))px").unwrap();
71
// 使用正则表达式进行匹配
72
if let Some(captures) = re.captures(&input) {
73
// 提取匹配到的数字部分
0 commit comments