Skip to content

Fix misuse of Landmark in margin/size by introducing scalar type#236

Open
arnavsharma990 wants to merge 2 commits intocreativescala:mainfrom
arnavsharma990:fix-layout-scalar
Open

Fix misuse of Landmark in margin/size by introducing scalar type#236
arnavsharma990 wants to merge 2 commits intocreativescala:mainfrom
arnavsharma990:fix-layout-scalar

Conversation

@arnavsharma990
Copy link
Copy Markdown
Contributor

Fix incorrect use of Landmark for margin and size semantics.

This change introduces a minimal layout-scoped scalar type (Layout.Scalar) to represent relative values (e.g. fractions of bounding box dimensions), while preserving existing Double-based APIs.

  • Adds Layout.Scalar (absolute and fractional values)
  • Updates layout algebra and syntax to use it
  • Evaluates relative values against bounding box dimensions
  • Keeps existing behavior unchanged

This approach is based on reviewer feedback in #222, where it was noted that a separate scalar magnitude type is required instead of using Landmark.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant