Skip to content

Conversation

@RobinMalfait
Copy link
Member

We were injecting the always on @tailwind defaults layer at the beginning of
the file. However, if a @tailwind base layer is available, then that
will now be injected after the defaults layer. The base layer does
contain some reset that are now overriding the defaults we set.

So now we will:

  • Insert the @tailwind defaults layer at the beginning of the file
    if there is no @tailwind base
  • Insert the @tailwind defaults layer after the @tailwind base layer
    if it exists.

Fixes: #6524

We were injecting the always on `@tailwind defaults` layer at the beginning of
the file. However, if a `@tailwind base` layer is available, then that
will now be injected _after_ the defaults layer. The base layer does
contain some reset that are now overriding the defaults we set.

So now we will:
- Insert the `@tailwind defaults` layer at the beginning of the file
  _if_ there is no `@tailwind base`
- Insert the `@tailwind defaults` layer after the `@tailwind base` layer
  if it exists.
@RobinMalfait RobinMalfait merged commit 083bca3 into master Dec 15, 2021
@RobinMalfait RobinMalfait deleted the fix-6524 branch December 15, 2021 11:34
@productdevbook
Copy link

productdevbook commented Dec 15, 2021

 Error: Can't find stylesheet to import.
    ╷
  1 │ @import "tailwindcss/defaults";
    │         ^^^^^^^^^^^^^^^^^^^^^^
    ╵
    src/assets/main.scss 1:9  root stylesheet

@import "tailwindcss/defaults";
@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";

@RobinMalfait
Copy link
Member Author

Hey @productdevbook ! Thank you for your bug report!
Much appreciated! 🙏

But, this is a private API and you shouldn't use it yourself. If you remove it again then everything should keep working as expected.
What is the reason that you've added this?

@reinink reinink changed the title Insert always on defaults layer in correct spot Insert always-on defaults layer in correct spot Dec 15, 2021
@productdevbook
Copy link

Hey @productdevbook ! Thank you for your bug report! Much appreciated! 🙏

But, this is a private API and you shouldn't use it yourself. If you remove it again then everything should keep working as expected. What is the reason that you've added this?

😅 When I read the description, I thought we should add it too. Yes, it works when you remove it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

From 3.0.2 to 3.0.3 borders color in config is lost

3 participants