react-email icon indicating copy to clipboard operation
react-email copied to clipboard

Please support responsive design in Tailwind component.

Open MasterShu opened this issue 3 years ago • 2 comments

As the title say.

I found the Tailwind component could not support responsive design.

Such as sm:w-full, it will compile a strange style code in HTML tag. Seem like could not support responsive design.

And I think it will be difficult to achieve responsive design if we use inline style mode.

MasterShu avatar Feb 07 '23 16:02 MasterShu

@vinicoder can you take a look?

zenorocha avatar Feb 07 '23 16:02 zenorocha

Hey, guys! I'm currently working on a fix for this and should update here asap this week.

vinicoder avatar Feb 07 '23 16:02 vinicoder

Can you confirm whether the Text or Heading component support media queries? I tried to add this as a style to Text component, but it does not work.

const headingText = { color: "#121212", fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif", fontSize: "44px", lineHeight: "24px", textAlign: "left" as const, "@media (max-width: 767px)": { color: "#333", fontSize: "14px", }, };

Can you please help?

aravind-eng avatar Feb 10 '23 03:02 aravind-eng

Can you confirm whether the Text or Heading component support media queries? I tried to add this as a style to Text component, but it does not work.

const headingText = {

color: "#121212",

fontFamily:

"-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif",

fontSize: "44px",

lineHeight: "24px",

textAlign: "left" as const,

"@media (max-width: 767px)": `{

color: "#333",

fontSize: "14px",

}`,

};

Can you please help?

Media queries only work in the

In the update I'm currently working on, the media queries generated using Tailwind will be defined in the

vinicoder avatar Feb 10 '23 05:02 vinicoder

Thanks for the info @vinicoder . Looking forward for your changes. When can we expect those changes?

aravind-eng avatar Feb 10 '23 17:02 aravind-eng

Thanks for the info @vinicoder . Looking forward for your changes. When can we expect those changes?

My plan is to send a PR with the updates later this week.

vinicoder avatar Feb 12 '23 21:02 vinicoder

@vinicoder hi, when can we expect these changes?

kowalczyk-mateusz avatar Feb 20 '23 08:02 kowalczyk-mateusz

Hey @kowalczyk-mateusz ! Here's a PR with some fixes: https://github.com/resendlabs/react-email/pull/502

Thanks for waiting! The past few weeks have been hectic as I fell ill, and my daughter couldn't attend school.

vinicoder avatar Feb 24 '23 02:02 vinicoder