Another good option is to add the character where you would like the word to break. In this case you could have awesome. It adds a hyphen if the word doesn't fit, but otherwise it's invisible
But then you're coupling markup with presentation. We shouldn't have to pollute the content like this to account for or workaround limitations in the UI.
@@dripcaraybbx I get your point but it's a trade-off imho. It would be better if the browser understood the language well enough to make the decision where to break the word on it's own, but we're not there yet. In the mean time, you can help things along by giving the browser suggestions. You're saying: I don't know what the presentation will be exactly, but if you ever need to break this word, this is where to do it.
This problem occurs many times in my projects and i don't how, but somehow Kevin always manage to predict what we need and what's most useful for us one by one.I really appreciate these super juicy knowledge you are sharing with us Kevin. You are filling that 20% knowledge gap which makes the difference between an intermediate, advance and Professional developers.
I know this is a JavaScript solution, but I had one project where I finally gave up trying to deal with word wrapping on wildly varying length of text in some headings that I wrote a javascript function and attached a listener to page load that calculated the height of the element and if it was 2 times the line height it would reduce the font size by a percentage and recalculate until the element height was equal to or less than the line height. It was a little clumsy since a page would load with a heading that occupied more than one line and then users could see the heading change sizes really quickly and realign the element flow accordingly. So it was probably bad for page speed and other seo metrics. But it fixed that immediate problem at least.
Hey Kevin, I couldn't get this to post in your TH-cam ideas section. Here recently I was trying to answer a question on how to set a margin on a item in a navbar that uses bootstrap classes, but when I got to looking at the documentation I got confused. I was wondering if you could make a video on the topic. I'm sure people n would want to watch it. Thanks again for the b work you do. It's appreciated.
very cool techniques. i watch your videos all the time and admire the solution. Unfortunately, just that I don't understand English very well ))) Because I am from Ukraine. But I try to learn English !) Thanks for the video!
Perhaps you should make an algorithm of your choice or so a poll on what improvements would be the easy way for ways to make it much easier to make a website/s. The whole CSS eco system seems very un-human-friendly and overly complicated. I'm sure you have some great ideas on ways to make the job much straight down.
Careful with some of those. For WCAG 2,1 the user must be able to achieve 200% bigger font sizes without loss. Clamp can torpedo that as just one example.
@@KevinPowell there's some lovely work by Adrian Roselli on this is you care to deep-dive. Just thought I'd add the note for others because there are definite cases where issues exist.
Hi Kevin! Can you do a short/video on how to create a flexbox container (with a max width and content centered) where a flex item (image) bleeds to the right of the viewport?
Why is hyphen a problem? I use hyphen: auto; and it seems really usefull. I am just looking for a way to avoid a line before an email (that i dont wanna break) to be too spaced out (due to justified content)
I know, I mentioned that browser support isn't great before going into how it works, and they're about to put it into Firefox Nightly, so it shouldn't be *too* much longer
Another good option is to add the character where you would like the word to break. In this case you could have awesome. It adds a hyphen if the word doesn't fit, but otherwise it's invisible
woow!
Equiv of (word break opportunity).
That’s so cool
But then you're coupling markup with presentation. We shouldn't have to pollute the content like this to account for or workaround limitations in the UI.
@@dripcaraybbx I get your point but it's a trade-off imho. It would be better if the browser understood the language well enough to make the decision where to break the word on it's own, but we're not there yet. In the mean time, you can help things along by giving the browser suggestions. You're saying: I don't know what the presentation will be exactly, but if you ever need to break this word, this is where to do it.
This problem occurs many times in my projects and i don't how, but somehow Kevin always manage to predict what we need and what's most useful for us one by one.I really appreciate these super juicy knowledge you are sharing with us Kevin.
You are filling that 20% knowledge gap which makes the difference between an intermediate, advance and Professional developers.
That last bit about @container explains what container queries is better than some other videos I’ve seen on TH-cam.
Really great to see 'all' the options available! Thanks, Kevin!
Dude! you are a CSS GOD!!! You should have a billion subscribers!
This channel has so many tips and tricks, it is insane. KP, lord of html and css.
i just know CSS is awesome cause you are awesome
without your valuable videos, i can't find out the beauty of CSS
Can't wait for container stuff to be more supported, it is like a dream come true.
This is a sort of "Memebuster: css edition". As you seen on TV.... love it!
you this video is very effective for beginner.
I am speaking from Bangladesh.❤
Thank you so much Kevin for making css easier for us to understand
Hope you're having a great day! thank you for all the awesome videos
i feel excited while watching your videos and get some thing i didn't know
I know this is a JavaScript solution, but I had one project where I finally gave up trying to deal with word wrapping on wildly varying length of text in some headings that I wrote a javascript function and attached a listener to page load that calculated the height of the element and if it was 2 times the line height it would reduce the font size by a percentage and recalculate until the element height was equal to or less than the line height. It was a little clumsy since a page would load with a heading that occupied more than one line and then users could see the heading change sizes really quickly and realign the element flow accordingly. So it was probably bad for page speed and other seo metrics. But it fixed that immediate problem at least.
i like this .title {
overflow: hidden;
text-overflow: ellipsis;
}
❤man it helped me a lot thank you God bless
I really Helpfull for your video,Thank you soo Much
I love your channel your energy makes the videos enjoyable regardless if I need the information right away ill watch it anyway for fun 😊😊
Overflow: ellipsis, Am I a joke to you?
Hey Kevin, I couldn't get this to post in your TH-cam ideas section. Here recently I was trying to answer a question on how to set a margin on a item in a navbar that uses bootstrap classes, but when I got to looking at the documentation I got confused. I was wondering if you could make a video on the topic. I'm sure people n would want to watch it. Thanks again for the b work you do. It's appreciated.
I love CSS thanks Kevin!
very cool techniques. i watch your videos all the time and admire the solution. Unfortunately, just that I don't understand English very well ))) Because I am from Ukraine. But I try to learn English !) Thanks for the video!
your video pop-up when I want solution for my project .
This is awesome,
Thank you Kevin
Perhaps you should make an algorithm of your choice or so a poll on what improvements would be the easy way for ways to make it much easier to make a website/s. The whole CSS eco system seems very un-human-friendly and overly complicated. I'm sure you have some great ideas on ways to make the job much straight down.
3:40 that some god level shit
beautiful, simple! keep it up ;)
you saved me thank you soooo much man
wow, that container thing is awesome
your awesome bro. U r very cool ma man. Keep it up
White spacing , word break... this is one of the things I always have to look up.
And Chrome, please we are waiting for cq!
They are in Chrome :D
We're just waiting for Firefox now, and it's about to go into Nightly from what I understand!
really nice thumbnail btw!!
i currently have this problem in a project, Thanks
Another good video. Would shrinking font size be ok on mobile? Can you do more with container queries? Can It be used as an Articles container.
Careful with some of those. For WCAG 2,1 the user must be able to achieve 200% bigger font sizes without loss. Clamp can torpedo that as just one example.
If font-sizes are set in rem (and the middle value in the clamp() includes a + rem value), it shouldn't cause any issues... I think 🤔
@@KevinPowell there's some lovely work by Adrian Roselli on this is you care to deep-dive. Just thought I'd add the note for others because there are definite cases where issues exist.
@@n_mckean I'll definitely look into it 👍
Is it possible to add flexbox into an already existing code and modify the code accordingly?
Yo Kevin you just hit 666k subs, congrats
Hi Kevin! Can you do a short/video on how to create a flexbox container (with a max width and content centered) where a flex item (image) bleeds to the right of the viewport?
That cqi is a game changer
Great and informative
Super content!
Thank you ❤️
Thanks for sharing
Why is hyphen a problem? I use hyphen: auto; and it seems really usefull. I am just looking for a way to avoid a line before an email (that i dont wanna break) to be too spaced out (due to justified content)
Hey Kevin,
Can we know the SCSS course launch date please 🙏
how can i keep track of your content. Is there a code pen available for this?
HeyKevin.. Waiting for Css Rocks
thanks!
another very useful content sir, thanks!
I forgot your name and searched for css king
hi can you please make a design system with scss and make a website using that design system also use react
0:51 problem right here, but the problem is in the left. oh you are talking about yourself. "kidding😂😂😂😂"
Please make a video how to make our page smooth scroll after adding heavy animations
I use
Soft hyphen in HTML
I'm actually looking for how to deal with overflowing borders
i always use Tailwand for my css
am i noob ?
@1:41 Ciao!
Please who can help me out with how to deal with overflow in carousel or slide images.
there is a fifth approach to solve this problem: use a *shorter word!* Also not perfect But hey it's a solution!
happy thanksgiving 🎃🎃
I've definitely done that before, lol
i would just give span to that word and I am good to go. :)
Congratulations with 666k subs)))
am i dumb or what nothing works on me :(
I will never understand why the SHY tag didn't get any real support in html.
css: container-type is yet not supported by Firefox........
I know, I mentioned that browser support isn't great before going into how it works, and they're about to put it into Firefox Nightly, so it shouldn't be *too* much longer
wouldve been if you showed how to make the word cut of with a ... eg: This is too lo...
❤️❤️👍
p {display: “none”}
First! Hi Kevin
22nd commenter ^^
.kevin-powell { overflow: awesome; } 👈🤓