Individual Scale/Rotate/Translate properties being overwritten by Transform
Link to issue in the LightningCSS playground.
Rotate, Scale, and Translate all have their own individual CSS properties now. However, Skew does not so it requires using transform:. If the transform is placed after any of the individual CSS transform properties, they are entirely ignored. If they are placed after, they are merged into the transform: property.
I should say, I don't think merging the individual properties into the transform is a good default behavior anyway. For instance, let's say we have this code:
.bar {
transition: scale 0.3s linear;
transform: skew(10deg);
scale: 1.5;
translate: 1em;
}
.bar:hover {
scale: 2;
}Lightning CSS turns this into:
.bar {
transition: scale .3s linear;
transform: skew(10deg)scale3d(1.5, 1.5, 1)translate3d(1em, 0, 0);
}
.bar:hover {
scale: 2;
}This completely breaks the functional benefits of having Scale/Rotate/Translate as their own individual properties. Here's a codepen showcasing how this functionality is harmful.
It would probably be best if Lightning CSS retained those original individual values by default.
Edit: I remembered that perspective does have its own property... so I fixed that brain fart.
Source: parcel-bundler/lightningcss