Skip to content

Suggestion: Add antialiased class to <body> in root layout template #6182

@emanoelims

Description

@emanoelims

Hi! 👋

I’d like to suggest adding the antialiased utility class from Tailwind CSS to the tag in the default root layout (phoenix_root.html.heex) used when generating new Phoenix projects.

💡 Reasoning

This small addition improves default font rendering across browsers—especially on macOS and iOS—by enabling subpixel text smoothing. It’s a widely adopted best practice in Tailwind CSS projects for better typography out of the box.

Since the generated Phoenix apps already include Tailwind by default, this feels like a natural and beneficial enhancement for developers using the default stack.

✅ Proposed change

<body>

To:

<body class="antialiased">

🔍 Notes

  • This class does not affect dark mode, accessibility, or other layout concerns.
  • It’s a subtle improvement, but one that many Tailwind projects include as a default baseline.

Thanks for the awesome work on Phoenix! ⚡️

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions