Skip to content

Visualize Your Ideas With Code

fix(2d): correct layout defaults (#442)

Jacobc116c355179b
diff --git a/packages/2d/src/components/Layout.ts b/packages/2d/src/components/Layout.ts
index 8666d553..52a1c735 100644
--- a/packages/2d/src/components/Layout.ts
+++ b/packages/2d/src/components/Layout.ts
@@ -146,16 +146,16 @@ export class Layout extends Node {
@signal()
public declare readonly wrap: SimpleSignal<FlexWrap, this>;
- @initial('normal')
+ @initial('start')
@signal()
public declare readonly justifyContent: SimpleSignal<FlexContent, this>;
@initial('normal')
@signal()
public declare readonly alignContent: SimpleSignal<FlexContent, this>;
- @initial('normal')
+ @initial('stretch')
@signal()
public declare readonly alignItems: SimpleSignal<FlexItems, this>;
- @initial('normal')
+ @initial('auto')
@signal()
public declare readonly alignSelf: SimpleSignal<FlexItems, this>;
@initial(0)
diff --git a/packages/2d/src/partials/types.ts b/packages/2d/src/partials/types.ts
index 06815267..7e21275d 100644
--- a/packages/2d/src/partials/types.ts
+++ b/packages/2d/src/partials/types.ts
@@ -15,7 +15,6 @@ export type FlexBasis =
| null;
export type FlexContent =
- | 'normal'
| 'center'
| 'start'
| 'end'
@@ -24,13 +23,7 @@ export type FlexContent =
| 'space-evenly'
| 'stretch';
-export type FlexItems =
- | 'normal'
- | 'center'
- | 'start'
- | 'end'
- | 'stretch'
- | 'baseline';
+export type FlexItems = 'center' | 'start' | 'end' | 'stretch' | 'baseline';
export type LetterSpacing = number | 'normal';