This repository was archived by the owner on Nov 1, 2024. It is now read-only.
File tree 3 files changed +33
-4
lines changed
3 files changed +33
-4
lines changed Original file line number Diff line number Diff line change 1
1
## 1.0.1-wip
2
2
3
- - Require Dart 3.0
3
+ - Update ` ExpressionsProcessor.processFont ` to handle null expressions.
4
+ - Require Dart 3.0.
4
5
5
6
## 1.0.0
6
7
Original file line number Diff line number Diff line change @@ -2836,9 +2836,9 @@ class ExpressionsProcessor {
2836
2836
}
2837
2837
2838
2838
return FontExpression (_exprs.span,
2839
- size: fontSize! .font.size,
2840
- lineHeight: fontSize.font.lineHeight,
2841
- family: fontFamily! .font.family);
2839
+ size: fontSize? .font.size,
2840
+ lineHeight: fontSize? .font.lineHeight,
2841
+ family: fontFamily? .font.family);
2842
2842
}
2843
2843
}
2844
2844
Original file line number Diff line number Diff line change @@ -260,6 +260,33 @@ void testUnits() {
260
260
expect (prettyPrint (stylesheet), generated);
261
261
}
262
262
263
+ void testNoValues () {
264
+ var errors = < Message > [];
265
+ final input = r'''
266
+ .foo {
267
+ color: ;
268
+ }
269
+ .bar {
270
+ font:;
271
+ color: blue;
272
+ }
273
+ ''' ;
274
+
275
+ final generated = r'''
276
+ .foo {
277
+ color: ;
278
+ }
279
+ .bar {
280
+ font: ;
281
+ color: #00f;
282
+ }''' ;
283
+
284
+ var stylesheet = parseCss (input, errors: errors, opts: simpleOptions);
285
+
286
+ expect (errors.isEmpty, true , reason: errors.toString ());
287
+ expect (prettyPrint (stylesheet), generated);
288
+ }
289
+
263
290
void testUnicode () {
264
291
var errors = < Message > [];
265
292
final input = r'''
@@ -1435,6 +1462,7 @@ void main() {
1435
1462
test ('Identifiers' , testIdentifiers);
1436
1463
test ('Composites' , testComposites);
1437
1464
test ('Units' , testUnits);
1465
+ test ('No Values' , testNoValues);
1438
1466
test ('Unicode' , testUnicode);
1439
1467
test ('Newer CSS' , testNewerCss);
1440
1468
test ('Media Queries' , testMediaQueries);
You can’t perform that action at this time.
0 commit comments