I was working with some css sprites in a project. There was sprite with lot of small icons. It was difficult finding the position of icons inside the sprite. I used to open the sprite in Photoshop and find the X and Y position of the icon needed. And this position was used in the CSS class. To make the process simpler a tool was created where you can upload the sprite and using mouse draw a box around the icon. The tool will generate the CSS style for you. Please check it at https://getspritexy.netlify.com/ The source is available in GitHub, fork/clone and play with it
-
-
Convert JavaScript object to FormData
Scenario: I was using Formik in React. There was a need to convert formik values to FormData to send to API as post. This is how it was done.