Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

🔥 3 CSS tips for styling <textarea> you probably didn't know about

111,645 Aufrufe • vor 2 Jahren •via X (Twitter)

10 Kommentare

Profilbild von Wes Bos
Wes Bosvor 2 Jahren

ask and ye shall receive tailwind

Profilbild von Abdellah Ht
Abdellah Htvor 2 Jahren

new CSS unit unlocked: ex

Profilbild von Wes Bos
Wes Bosvor 2 Jahren

@_hariti Ex gonna give it to ya

Profilbild von CSS by T. Afif
CSS by T. Afifvor 2 Jahren

You can reset the box-sizing to content-box so you don't have to deal with padding inside the height calculation. By the way, what about using "1cap" instead of "1ex"?

Profilbild von Wes Bos
Wes Bosvor 2 Jahren

yeah, but then you are doing a calculation for with the width to account for the padding. width: auto; works, but the other setting of field-sizing: content; causes it to shrink as soon as you type i it

Profilbild von Brandon McConnell
Brandon McConnellvor 2 Jahren

Oooo that 1lh-1ex value sounds really handy for things like this. Do you think a new unit would make sense here that literally? 👀

Profilbild von Wes Bos
Wes Bosvor 2 Jahren

Im not sure Ive ever needed it before today, so probably not, but ill see if it pops up again

Profilbild von Kjetil H
Kjetil Hvor 2 Jahren

This is so cool and nerdy. Love it 🙌 Don’t want to make this about Tailwind but it’s one of the things you miss out on (unless you use really long arbitrary values..?)

Profilbild von Jack Harner 🚀 Web Dev For Hire
Jack Harner 🚀 Web Dev For Hirevor 2 Jahren

I've been working with CSS for over a decade and I'm constantly learning new things you can do with it. 😅

Profilbild von Mehdi Babapour
Mehdi Babapourvor 2 Jahren

For the first time, I watched a video with the title X tips for … and actually learned 2X things 😅

Ähnliche Videos