Created
June 20, 2025 19:29
-
-
Save sebastiano-guerriero/20a817aebd817c5d33db36cad18972d7 to your computer and use it in GitHub Desktop.
Text Formatting using Tailwind
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const Prose = ({ children }: { children: React.ReactNode }) => { | |
return ( | |
<div className="text-base leading-[1.6] *:mb-4 *:last:mb-0 lg:*:mb-6 **:[h1]:text-3xl lg:**:[h1]:text-4xl **:[h2]:text-2xl **:[h1,h2,h3,h4]:font-[700] **:[h1,h2,h3,h4]:text-pretty **:[h1,h2,h3,h4]:tracking-tight **:[h1,h2,h3,h4]:text-contrast-high **:[h1,h2,h3,h4]:mt-8 lg:**:[h1,h2,h3,h4]:mt-10 **:[ul,ol]:pl-[1em] **:[ol]:list-[decimal] **:[li]:marker:text-contrast-medium/25 **:[img]:rounded-md **:[img]:shadow-md **:[img]:ring-1 **:[img]:ring-black/2.5 **:[figcaption]:text-contrast-low **:[figcaption]:mt-3 **:[figcaption]:text-sm **:[figcaption]:leading-[1.4] **:[figcaption]:text-center **:[figcaption]:text-pretty **:[figure]:mb-5 lg:**:[figure]:mb-8 **:[a]:text-primary **:[a]:hover:underline" data-prose> | |
{children} | |
</div> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment