bernaferrari / FigmaToCode

Generate responsive pages and apps on HTML, Tailwind, Flutter and SwiftUI.
https://www.figma.com/community/plugin/842128343887142055
GNU General Public License v3.0
3.8k stars 303 forks source link

Crude support for images in Tailwind #26

Closed colorfulfool closed 3 years ago

colorfulfool commented 3 years ago

Currently the images are exported as divs with no indication whatsoever that they are images — a bit disorienting, the user has to play detective to figure out where to put their assets.

This is my crude fix: treat images as a special case, emit an image tag with a placeholder of the right size. The result looks pretty helpful:

Снимок экрана 2021-02-16 в 22 38 18
bernaferrari commented 3 years ago

That's an excellent amazing idea. I had no idea that thing existed. Wonderful!

On Tue, Feb 16, 2021, 16:47 Anton Khamets notifications@github.com wrote:

Currently the images are exported as divs with no indication whatsoever that they are images — a bit disorienting, the user has to play detective to figure out where to put their assets.

This is my crude fix: treat images as a special case, emit an image tag with a placeholder of the right size. The result looks pretty helpful: [image: Снимок экрана 2021-02-16 в 22 38 18] https://user-images.githubusercontent.com/1292290/108113483-a4679300-70a8-11eb-9f99-aba61b69a716.png

You can view, comment on, or merge this pull request online at:

https://github.com/bernaferrari/FigmaToCode/pull/26 Commit Summary

  • Emit image tag in Tailwind as a special case

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bernaferrari/FigmaToCode/pull/26, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACVXFK4GGQEFMZJQAYIR6TS7LDW3ANCNFSM4XXBKF5Q .

bernaferrari commented 3 years ago

https://github.com/bernaferrari/FigmaToCode/commit/22639954de289f3c85910dfddfad44ae10f48a3d incorporates your changes, thanks!