Skip to content

Upgrading tailwindcss 0.2 to 0.3

Breaking0.2.2 → 0.3.0Breaking4New13Changed5

BreakingUpgrade verdict

4 breaking changes.

  • Unordered and ordered lists no longer get browser default margins, so add margin classes if you relied on them.
  • The all-sides pin class no longer stretches elements to full size, so add w-full and h-full where needed.
  • SVGs are no longer automatically filled with the text color; use the fill-current class when you want that.
  • Two old undocumented CSS directives no longer work and must be replaced with the new `@variants` directive.
Top 3 of 4 that need code or config changes
Breaking4
Lists now have no margins by default in Preflight base styles.
ulol
The .pin utility no longer sets width and height to 100%.
.pin.pin{-side?}w-fullh-full
SVG fill no longer defaults to currentColor in Preflight styles.
svgfill-current
Removes the undocumented @hoverable and @focusable directives in favor of the new @variants directive.
@hoverable@focusable@variants