Skip to content

Tailwind core/reset file added after other css files in astro build #4614

Description

@lukewatts

What version of astro are you using?

1.1.3

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

yarn

What operating system are you using?

Windows

Describe the Bug

Tailwind CSS files in build are being added last (or second last), causing tailwind reset file to override scoped (in file) CSS.

To replicate...

  1. install the Blog template
  2. Run astro add tailwind
  3. Run astro build
  4. Go to any page other than Home and check the order of the CSS files. Tailwind is last or second last which breaks the styles

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-vymz2e?file=tsconfig.json,astro.config.mjs,tailwind.config.cjs,package.json,src%2Fconfig.ts,src%2Fenv.d.ts,src%2Fpages%2Fblog.astro,src%2Flayouts%2FBlogPost.astro,dist%2Findex.html&on=stackblitz

Participation

  • I am willing to submit a pull request for this issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

- P4: importantViolate documented behavior or significantly impacts performance (priority)feat: stylingRelated to styles (scope)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions