For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign in
DocsAPI ReferenceChangelog
DocsAPI ReferenceChangelog
  • Get started
    • Quickstart
    • Concepts
  • Guides
      • Builder is not loading
      • Builder messages
      • Layout shift
      • Tailwind styles being overridden
    • Environments
  • Reference
    • Product docs
    • Blog
    • Support
Sign in
LogoLogo
On this page
  • Problem
  • Solution
GuidesTroubleshooting

Tailwind styles are being overridden

Was this page helpful?
Previous

Layout shift on initial page load

Next

Environments

Built with

Resolve issues with Tailwind v4 or other @layer-based CSS frameworks being overridden by CSS resets

Problem

Starting from version 4, Tailwind CSS uses @layer rules to define its styles.

Makeswift by default includes a CSS reset from normalize.css. Because the built-in CSS reset is unlayered, it’ll override the Tailwind styles, even if the Tailwind styles are more specific.

From MDN @layer documentation: “Styles that are not defined in a layer always override styles declared in named and anonymous layers.”

Image: CSS layer cascade

Solution

Disable the built-in CSS reset by setting enableCssReset={false} on the RootStyleRegistry. If you followed the installation docs, this would be located in your lib/makeswift/provider.tsx or src/makeswift/provider.tsx file:

1<RootStyleRegistry enableCssReset={false}>
2 {children}
3</RootStyleRegistry>

Tailwind already ships with its own reset, so disabling the built-in reset prevents conflicts and preserves Tailwind’s styles.