question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`optimizeUniversalDefaults` make borders black in TailwindPlay too but only at development time!

See original GitHub issue

What version of Tailwind CSS are you using?

2.2.19

What build tool (or framework if it abstracts the build tool) are you using?

SvelteKit (Vite) with “postcss”: “8.3.11”

What version of Node.js are you using?

node 16.13.0

What browser are you using?

Chrome

What operating system are you using?

Windows

Reproduction URL

https://play.tailwindcss.com/NSyUv6w2Ad?file=config

Describe your issue

If you open the reproduction URL you’ll see the border color “GRAY”, not black like in the screenshot below.

image

If you start a new TailwindPlayground project and write that config before and then write the html the border is “BLACK”!

This is what is happening in my develop environment.

I was using Tailwind without optimizeUniversalDefaults until today.

But I had a problem because after build the class after:-translate-x-1/2 was not working (in dev yes). The code is here.

After optimizeUniversalDefaults the code works but in development I have those black borders all around!

Can you please help understand me what is wrong?

Thanks!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
adamwathancommented, Nov 21, 2021

Here’s a demo showing that the borders are fixed (for good) as soon as you do something that triggers a fresh build (like changing the config or changing your CSS file):

https://user-images.githubusercontent.com/4323180/142765605-75dc5a52-2dca-41f7-8d88-2dfa01b1cc85.mov

Not sure how this would happen in a development environment but if you can actually provide the development environment I am happy to look into it. As it stands I have no idea if you are using Tailwind CLI, postcss-cli, webpack, Rollup, Vite, or what you are using for the actual web server so it’s very hard to provide any help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Just-in-Time Mode - Tailwind CSS
Tailwind CSS v2.1 introduces a new just-in-time compiler for Tailwind CSS that generates your ... Your CSS is identical in development and production....
Read more >
TailwindCSS: Adds complexity, does nothing.
If a specific client demands you brand their pages, then add a color palette for their brand, and make sure those components switch...
Read more >
Tailwind CSS tutorial & examples. Get started in 13 minutes
Tailwind CSS supports all popular CSS attributes and has many CSS classes to handle each of them. Shadows, borders, grids, flexboxes, ...
Read more >
print-color-adjust - CSS: Cascading Style Sheets | MDN
By default, the browser is allowed to make any adjustments to the ... and to adjust text colors to be sure the contrast...
Read more >
Tailwind css border color not working on web page
Like you see in inspector, you defined only border color but not border width. Because it is 0px, it is invisible ;).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found