Image object-position css value is added in the wrong order

Description:

When using the Cwicly inspector for an image and setting the Object Position via the interface, the CSS it outputs can be invalid for any values other than alignment keywords (e.g. px or %) as it outputs as object-position: top left; instead of object-position: left top;

Step-by-step reproduction instructions:

Please write the steps needed to reproduce the bug.

  1. Open the Post Editor/Site Editor
  2. Add an image
  3. Specify the image as object-fit: cover;
  4. Set vertical alignment to “top” and then set any numeric value with any valid unit for horizontal alignment
  5. View in the browser and inspect the image - note: it shows as invalid CSS due to top being first in the value instead of last.

Screenshots, screen recording, code snippet

Screenshot 2024-05-16 at 19.24.19

Environment info

  • WordPress version: 6.5.2
  • Cwicly Plugin version: 1.4.1.4

Hi @StrangeTech,

Thanks so much for this report.
I have been able to reproduce this issue and have added it to the bug tracker.

Best regards,
Johnny

2 Likes

Thank you @JohnD, very much appreciated.

Hi @StrangeTech,

Thanks for your patience.

We’ve fixed this issue in 1.4.1.6.
Please let us know if you are still experiencing issues.

Best regards,
Johnny

Thank you @JohnD,

We have tested this and confirm it is working correctly now.