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 284 forks source link

Collect superscript and subscript texts from figma #103

Open KevynTD opened 3 months ago

KevynTD commented 3 months ago

Your extension is very good, thank you btw!!

In figma, the designers on my team use this functionality a lot to place the text with sub or sup text, but when I copy the text of it, it never works:

image

If you could export this on HTML, it would be amazing not to have to do the manual work of placing each of these by hand 😅

In HTML the tags used for this are <sub> and <sup>, and in CSS, the equivalent is to use the "vertical-align: sub;font-size: 0.9em;" and "vertical-align: super;font-size: 0.9em;" respectively.

bernaferrari commented 3 months ago

hmmm, maybe I can do that? Can you share a simple Figma layout of what you want? I'll take a look if it is possible to do what you want. If it is, I'll surely do it.

KevynTD commented 3 months ago

Apologies for the delay! I made a very simple example in this file, I'm new to creating things in figma In this file I put some examples of how I would like the text to be exported Sup and Sub Text Examples.zip

image

In the current export to html, the numbers and letters with sup/sub remain as normal text