Skip to content

Commit 831641d

Browse files
authored
Merge pull request #10 from NervJS/feat/text-adapter
faet: 样式解析、 单位独立转换
2 parents a40fe13 + 92363f0 commit 831641d

28 files changed

+803
-483
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ once_cell = "1.18.0"
1919
selectors = "0.25.0"
2020
smallvec = "1.11.0"
2121
style = "0.1.0"
22+
regex = "1"
2223
swc_common = {version = "0.33.0", features = ["tty-emitter", "sourcemap"]}
2324
swc_ecma_ast = {version = "0.110.0"}
2425
swc_ecma_codegen = "0.146.0"

__test__/fixure/Mod.scss

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,12 @@
183183
align-self: center;
184184

185185
flex: 2 1 100px;
186-
flex-basis: 200px;
187186

188-
background-image: linear-gradient(30deg, #f00, #0ff, #00f);
189-
background-size: 100%;
187+
background-image: url('asdasdas');
188+
background-repeat: no-repeat;
189+
background-size: 100% 20px;
190190
background-color: #0ff00f;
191-
background-position: 30% bottom;
191+
background-position: 30px bottom;
192192

193193
transform: translate(20px, 30px) rotate(30deg);
194194

@@ -206,4 +206,11 @@
206206
border-top-color: #00f;
207207

208208
border-top-style: dashed;
209+
210+
line-height: 10px;
211+
text-align: center;
212+
213+
text-decoration: line-through;
214+
215+
font-weight: lighter;
209216
}

__test__/fixure/mod.jsx

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -84,44 +84,3 @@ export default class Mod extends React.Component {
8484
)
8585
}
8686
}
87-
88-
// function Mod() {
89-
// return (
90-
// <div className='mod' style={{ width: '500px', height: 800 }}>
91-
// <div className='cnt_row'>
92-
// <img
93-
// className='icon'
94-
// src='//img20.360buyimg.com/img/jfs/t1/166410/12/38783/3147/64f58062Fd7737e2b/5aaf0205cd1ce175.png'
95-
// ></img>
96-
// <span className='line1 instruction'>超能芭比 5分钟前查看团购</span>
97-
// </div>
98-
// <div className='cnt_row1'>
99-
// <img
100-
// className='img'
101-
// src='//img12.360buyimg.com/img/jfs/t1/100881/15/44805/18567/64f58062F1b45e0cb/caf065a7410087ce.png'
102-
// ></img>
103-
// <div className='cnt_col'>
104-
// <span className='line1 instruction1'>巴拉巴拉小魔仙</span>
105-
// <span className='line1 txt'>成员: 4000+</span>
106-
// </div>
107-
// <div className='cnt_row2'>
108-
// <img
109-
// className='icon1'
110-
// src='//img11.360buyimg.com/img/jfs/t1/175578/35/40256/1981/64f58062Fddaf1a21/f1111d9988a65ccc.png'
111-
// ></img>
112-
// <span className='instruction2'>slslsl-jsj</span>
113-
// <span className='txt1'>复制</span>
114-
// </div>
115-
// </div>
116-
// <div className='cnt_row3'>
117-
// <span className='line2 txt2'>
118-
// 团长介绍:售前售后进群售前售后进群售前售后进群售前售后进群VXklsidohh...
119-
// </span>
120-
// <img
121-
// className='img1'
122-
// src='//img14.360buyimg.com/img/jfs/t1/206378/24/25778/195/64eca527F378f17a2/c1623681708609fd.png'
123-
// ></img>
124-
// </div>
125-
// </div>
126-
// )
127-
// }

0 commit comments

Comments
 (0)