Skip to content

Why does the class "prose" shrink elements' widths? #13455

Answered by alex-krasikau
ooker777 asked this question in Help
Discussion options

You must be logged in to vote

Hey @ooker777!

By default, the prose plugin applies max-width: 65ch to a container. This is a good practice for improving the readability of text content.

To remove it, add max-w-none to the container.

- <main class="prose flex flex-row gap-3 w-full">
+ <main class="prose flex w-full flex-row gap-3 max-w-none">

You can also achieve the same results by updating the Typography Plugin configuration:

module.exports = {
  theme: {
    extend: {
      typography: {
        DEFAULT: {
          css: {
            maxWidth: 'none',
          },
        },
      },
    },
  },
  plugins: [require('@tailwindcss/typography')],
}

Here is the complete example: Play Tailwind - Typography Configuration.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ooker777
Comment options

@alex-krasikau
Comment options

Answer selected by ooker777
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants