This repository demonstrates a bug where a Tailwind CSS linear gradient is not rendering correctly. The expected gradient is not displayed, and only a plain background color is shown instead. The issue is likely related to the configuration of Tailwind CSS or how the gradient class is being used.
The gradient-to-r
class from Tailwind CSS, intended to create a linear gradient from left to right, is not working as expected. The component renders with the base background color instead of the gradient. This bug occurs consistently across different browsers.
The solution involves verifying the Tailwind CSS configuration and ensuring that the correct directives are included in your project's CSS file. This example also demonstrates the use of a fallback color in case the gradient fails to apply.
npm install
npm start
tailwind.config.js
and your CSS file where you import the generated styles.