One line of CSS for better typography

One line of CSS for better typography

Kevin Powell

1 год назад

50,203 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@IamPAYSO
@IamPAYSO - 12.09.2023 05:43

just an FYI, this is called an orphan for anyone curious.

Ответить
@niner8275
@niner8275 - 04.08.2023 19:07

Cool new feature! This will make so many Art Directors happy whon you had to tell: "Sorry, we can't guarantee nice line-breaks".
Would also be nice if it was a bit more configurable, like how much it should be balanced. Maybe a value from 0% (not at all) to 100% (the actual reverse, first line as short as possible) and 50% what currently is "balanced".

Ответить
@schatten105
@schatten105 - 15.07.2023 06:12

Zwangsfinanzierter Müllcontent

Ответить
@dancehalllyrics1303
@dancehalllyrics1303 - 03.07.2023 17:37

So what’s the exact difference between this and the already existing “white-space” property that seems to do the same when set to “no-wrap”?

Ответить
@theReal_WKD
@theReal_WKD - 21.06.2023 15:20

For those who get a warning using the property, you have to replace it by 'white-space'. This is essentialy the same and the value is still 'balance'.

Ответить
@TheBoysMemes123
@TheBoysMemes123 - 21.06.2023 11:47

You are awesome. But CSS is also OP

Ответить
@DasBauer
@DasBauer - 20.06.2023 23:39

Is there a css setting for defining a symbol for the split of a wrapped word?

Ответить
@Lingatsu
@Lingatsu - 19.06.2023 02:05

Interesting

Ответить
@ShiloBuff
@ShiloBuff - 18.06.2023 13:53

As someoen who's a perfectionist and my UI always has to be aligned, this is one of the coolest additions. Even better is that defaulting to the normal behavior isnt a deal breaker with the lack of support.

Ответить
@jstfd
@jstfd - 18.06.2023 05:58

so cool! had no idea this existed until today, thanks for sharing

Ответить
@Alex_Eicher
@Alex_Eicher - 17.06.2023 20:42

This is very
impressive!

Ответить
@ModifiedMusicYT
@ModifiedMusicYT - 16.06.2023 20:58

I like this. I like this ALOT

Ответить
@thecoolnewsguy
@thecoolnewsguy - 16.06.2023 02:27

Can't just postcss take care of the browser support?

Ответить
@alkadoHs
@alkadoHs - 15.06.2023 22:52

I always find useful css tips to your channel that's annoying to css. Thank you kev, keep it up Your contents is Gold

Ответить
@santoshparker8681
@santoshparker8681 - 15.06.2023 18:59

Thx the king of css ❤

Ответить
@alirezayoom
@alirezayoom - 15.06.2023 16:32

بسیار عالی

Ответить
@photostudioapp8189
@photostudioapp8189 - 15.06.2023 15:51

Best change I have seen all year!

Ответить
@PixelKhaos
@PixelKhaos - 15.06.2023 11:40

Oh nice, this popped up in autocompletion and hadnt heard of it but noticed how well it worked in responsive grids

Ответить
@comicboyssSIGASIS4855
@comicboyssSIGASIS4855 - 15.06.2023 11:23

Nice😊🎉❤

Ответить
@endlacer
@endlacer - 15.06.2023 09:54

you also can try to reduce word-spacing or letter-spacing when you're just a few pixels top wide

Ответить
@GR_BackingTracks
@GR_BackingTracks - 15.06.2023 08:28

Thank you!

Ответить
@andreh.9300
@andreh.9300 - 15.06.2023 06:28

Finally! Those little overflows are so irritating.

Ответить
@musteemustang3439
@musteemustang3439 - 15.06.2023 03:43

Can I use: No you can't 😝

Ответить
@shaunpatrick8345
@shaunpatrick8345 - 15.06.2023 00:27

But it doesn't
look good like
that.

Ответить
@thebytespider
@thebytespider - 14.06.2023 23:51

I used this recently on a project, so thanks for this tip Kevin

Ответить
@alext5497
@alext5497 - 14.06.2023 22:57

how do you even keep up with this stuff,

Ответить
@DKSubconscious
@DKSubconscious - 14.06.2023 22:05

Fantastic! They need to have css that counters designers crazy decisions as well 😂

Ответить
@artu-hnrq
@artu-hnrq - 14.06.2023 21:43

It's nice to be up to date with these news!

Ответить
@SquareballoonCoUk
@SquareballoonCoUk - 14.06.2023 19:25

Argghhhh such a long term problem and they come up with a solution like this? How frustrating. The principles of "widows" and "orphans" has been around in typography for years. Why don't they just follow the design rules that have existed for years. This would be a fair addition, but we could solve this with a div width. This now means we'll have headings that are different widths based on the number of words. That's just going to look weird. Especially for outlaying examples like a 3 word heading and a 12 word heading.

Ответить
@Martinsgundi
@Martinsgundi - 14.06.2023 19:21

Saw this in your most recent video it’s amazing.

Thanks Kev!

Ответить
@hikari1690
@hikari1690 - 14.06.2023 18:52

Omg! Where was this when I had to deal with those long titles on my websites?!

Ответить
@emmanuelotamendi9583
@emmanuelotamendi9583 - 14.06.2023 18:39

OMQ I was just struggling with this trying to Frankenstein it through min-max and stuff

Ответить
@turolretar
@turolretar - 14.06.2023 18:35

I’m shocked that Tex (old as it is) does this balanced wrapping, and css is only now supporting it

Ответить
@DampeS8N
@DampeS8N - 14.06.2023 18:21

Want another good typography tip? Explicitly set line-height and letter-spacing (in relative units). Just the act of setting it will make you think about what they should be, which means you'll end up with something better than the default.

Ответить
@Sofia-ts6gy
@Sofia-ts6gy - 14.06.2023 18:19

i also thought this was called an orphan but after googling apparently it’s actually called a runt 😭

Ответить
@Siger522
@Siger522 - 14.06.2023 18:16

I usually use special Unicode characters for that, like Non-Breaking Space and Non‑Breaking Hyphen.

Ответить
@kaustubhkale6598
@kaustubhkale6598 - 14.06.2023 18:06

❤ from India CSS Guru 🙏

Ответить
@sawilliams
@sawilliams - 14.06.2023 17:54

It’s called an orphan

Ответить
@ArsonDPI
@ArsonDPI - 14.06.2023 17:41

* ...an "orphan" in typography

Ответить
@JohnCamacho
@JohnCamacho - 14.06.2023 17:19

Would be even better if you could tweak it so that the first line is around 60%

Ответить
@enespinar9711
@enespinar9711 - 14.06.2023 16:49

Life saver!!!

Ответить
@malek6058
@malek6058 - 14.06.2023 16:36

also we could do better approach. with white-space:nowrap. it will stay on one line and we could make the font smaller little bit

Ответить
@AndrewSmithDev
@AndrewSmithDev - 14.06.2023 16:33

I think it looks worse lol

Ответить
@kacperkonieczny7333
@kacperkonieczny7333 - 14.06.2023 16:31

Cool.

Ответить