Angehefteter Tweet

Sam Selikoff (@samselikoff) talks about 5 new exciting utilities with real-world use cases during Tailwind Connect keynote (@tailwindcss).
You can watch the talk (link in the thread) or read the notes below ↓
1) Accent Color
- new `accent-...` class (e. g. `accent-liime-400`) that lets you choose colors for (otherwise blue by default) native HTML elements like checkboxes or sliders
- you can add it to a parent `div` and then all its children elements respect that
- under the hood, it sets the (new) `accent-color` property
- Tailwind does a great job at staying up-to-date w/ modern CSS and can educate you about what’s possible and can be used safely w/ reasonable browser support
2) Fluid Typography
- you can use arbitrary value syntax with `-[...]` syntax
- for example, to implement fluid typography, `text-[min(19vw,130px)]` will make sure a heading fill up the entire width of the viewport but doesn’t get too large (tweak the exact values based on your specific page and desired font size)
3) Text balance
- you heading can have orphan words (if there’s just one word after a line break) and is not balanced uniformly
- new `text-balance` feature coming to Tailwind (uses `text-wrap: balance`) which is a new CSS feature
- if your browser doesn’t support it, nothing breaks, you text isn’t just gonna be as pretty 🙂
continues below ↓




English
















