This repository demonstrates a bug where Tailwind CSS gradients don't render correctly when combined with certain layout or size classes. The gradient may be clipped or distorted, resulting in an unexpected visual appearance.
When using Tailwind's gradient classes (e.g., bg-gradient-to-r
) along with classes that affect the element's dimensions (like w-full
, h-screen
, or padding classes), the gradient might not render as expected. It could be clipped or appear distorted.
bug.html
in your browser.The solution involves carefully considering the order and combination of classes. Sometimes explicitly setting dimensions (e.g., using width
and height
instead of percentage-based classes) can help. Refer to bugSolution.html
for a corrected version.