Closed martin-kolinek closed 8 years ago
Hmmm, I need to have a think on the consequences of breaking compatibility.
Sure. There is also the option of introducing type classes for the different types of sizes. Then it's possible to keep Size Abs
and Size Rel
. However, pct
would still need its own size type, as it can be used in different contexts as the sizes with other units. If you like this approach better, I can try to come up with something.
Another option would be to untroduce a new pct2
(or something) function with a new size type, but that's quite ugly.
You know what, I'm down with this, I'd be surprised if those changes actually affected a lot of people.
CSS doesn't seem to differentiate between relative and absolute units. It does, however, differentiate between lengths and percentages. I'm basing this on MDN.
The way clay does sizes prevents users from specifying e.g. a border width of 1em. They also could specify opacity of 1em, which shouldn't be possible.
For this reason I replaced
Size Rel
andSize Abs
withSize Percentage
andSize LengthUnit
. Do you think the naming is good?I also changed translate to allow usage of percentages for X and Y coordinates.
Also, the changes will not be really backwards comaptible, but the use cases which would work with CSS should also work after this change.