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.7k stars 285 forks source link

Change div closing syntax #31

Closed kopotp closed 2 years ago

kopotp commented 3 years ago

Hi! Awesome plugin. Could you please modify generated <div .../> to <div ...></div>, so it will work in pure HTML without React in Chrome and other browsers

bernaferrari commented 3 years ago

I can, but that's from pure html itself, there is nothing to do with React. Maybe you are seeing something wrong?

kopotp commented 3 years ago

i mean Chrome interprets this behaviour as non-closed div tag

bernaferrari commented 3 years ago

Sorry for the (long) delay, I'm updating the plugin right now. Can you give an example that is rendered wrong in Chrome? I'm curious. If it is a real issue, I'll fix it.

DaleWebb commented 2 years ago
<div class="inline-flex space-x-6 items-start justify-start bg-white bg-opacity-0" style="width: 768px; height: 84px;">
    <div class="w-0.5 h-full bg-black"/>
    <p class="text-xl italic font-italic leading-7" style="width: 742px;">"Ipsum sit mattis nulla quam nulla. Gravida id gravida ac enim mauris id. Non pellentesque congue eget consectetur turpis. Sapien, dictum molestie sem tempor. Diam elit, orci, tincidunt aenean tempus."</p>
</div>

Will render as:

<div class="inline-flex space-x-6 items-start justify-start bg-white bg-opacity-0" style="width: 768px; height: 84px;">
    <div class="w-0.5 h-full bg-black">
        <p class="text-xl italic font-italic leading-7" style="width: 742px;">"Ipsum sit mattis nulla quam nulla. Gravida id gravida ac enim mauris id. Non pellentesque congue eget consectetur turpis. Sapien, dictum molestie sem tempor. Diam elit, orci, tincidunt aenean tempus."</p>
    </div>
</div>