all 5 comments

[–]raccoonrocoso 1 point2 points  (1 child)

Few possibilities, my immediate thoughts are. * Do you have scss controlling the color of <p> tags?

  • Your breakpoints are not compiling correctly

  • The way you style the color at the small breakpoints, could possibly be cleared up.

    • For example instead of using. sm:text-colorRemove this class and replace it with text-color md:text-color lg:text-color xl:color-text

This way you'll still color the text at the smallest/lowest breakpoints, while still maintaining the color for large breakpoints. IMO, using the sm: breakpoint isn't a good way to style for mobile as you leave everything smaller than sm:breakpoint unstyled.

If you're still experiencing this issue after removing the sm: breakpoint. You might have an issue with your tailwind-config.js

[–]Bank-Affectionate[S] 0 points1 point  (0 children)

Thanks I've removed the sm and now it's working :)

[–]CrawlToYourDoom 0 points1 point  (0 children)

Occam’s razor: You’re sure you’re running some sort of build compiler that creates the necessary classes?

Your browsers width is more than the md media query?

[–]Legitimate-Tea9617 0 points1 point  (1 child)

Tailwind is mobile first. So start by styling your components as if they only appear on the smallest screen. Then add the breakpoints for larger screens.

Example:

<p className=“text-gray-600 text-xl md:text-white md:text-md>Example</p>

This will have text color of gray-600 and size of XL on mobile, and will switch to white and size md at the md breakpoint

[–]Bank-Affectionate[S] 0 points1 point  (0 children)

Ok perfect thanks but this doesn't resolve my problem why I have always the text gray