Skip to content

Commit 9aba058

Browse files
feat(spark_css): add CssTextShadow type support
Adds `CssTextShadow` sealed class implementation for typed `text-shadow` support. Includes support for single and multiple shadows, as well as `none`, `variable`, `raw`, and global keywords. Adds comprehensive unit tests in `packages/spark_css/test/css_text_shadow_test.dart`. Formatting has been applied to all files.
1 parent 3e7aa33 commit 9aba058

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

packages/spark_css/test/css_text_shadow_test.dart

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ void main() {
99
});
1010

1111
test('single shadow with x and y', () {
12-
final shadow = CssTextShadow(
13-
x: CssLength.px(1),
14-
y: CssLength.px(2),
15-
);
12+
final shadow = CssTextShadow(x: CssLength.px(1), y: CssLength.px(2));
1613
expect(shadow.toCss(), '1px 2px');
1714
});
1815

@@ -47,9 +44,15 @@ void main() {
4744
test('multiple shadows', () {
4845
final shadow = CssTextShadow.multiple([
4946
CssTextShadow(
50-
x: CssLength.px(1), y: CssLength.px(1), color: CssColor.red),
47+
x: CssLength.px(1),
48+
y: CssLength.px(1),
49+
color: CssColor.red,
50+
),
5151
CssTextShadow(
52-
x: CssLength.px(2), y: CssLength.px(2), color: CssColor.blue),
52+
x: CssLength.px(2),
53+
y: CssLength.px(2),
54+
color: CssColor.blue,
55+
),
5356
]);
5457
expect(shadow.toCss(), '1px 1px red, 2px 2px blue');
5558
});

0 commit comments

Comments
 (0)