Skip to content

Conversation

ogoffart
Copy link
Member

@ogoffart ogoffart commented Sep 25, 2025

  • Rename scale-* to transform-scale-* (second commit)
  • Add a transform-scale property, make it the default for the -x and -y variant (first commit)
  • Also update the examples to use the transform-scale

@ogoffart
Copy link
Member Author

The CI is failing because the home automation demo declares a property scale.
And it is likely that other people have done that so it's a breaking change unfortunately.

</SlintProperty>

#### scale
<SlintProperty propName="scale" typeName="float" defaultValue='100%'>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this be a percent property or is it supposed to be float? I see you changed scale-x and scale-y to float, but the default value here is still 100%.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

percent is not a "normal" type and exist only for the purpose of distinguishing some things that would otherwise have some other units (eg, for width and height or for the value of a color in the rgb function)
But otherwise, this is a float and % values automatically convert to float such that 100% is 1.0

Anyway, this is just a documentation thing in this case. But the true type of these property is float and their default value is 1 which is the same as 100%

`scale-x` and `scale-y` defaults to that
@ogoffart ogoffart changed the title Add a scale property to all elements Add a transform-scale property to all elements and rename scale-x and scale-y Oct 7, 2025
@ogoffart
Copy link
Member Author

ogoffart commented Oct 7, 2025

Updated the PR based on what was discussed at the API review.

@tronical tronical mentioned this pull request Oct 7, 2025
This is to avoid reserving the `scale` property on every element which
is a common property name
@ogoffart ogoffart merged commit 8ce8a94 into master Oct 7, 2025
121 of 141 checks passed
@ogoffart ogoffart deleted the olivier/scale branch October 7, 2025 14:15
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.

3 participants