Комментарии:
in reality you just dont render element
ОтветитьAnd this is why Kevin is the best
ОтветитьMay God bless, very nice!
ОтветитьYes, yes CSS Pope
ОтветитьWhy is css becoming more complex then JavaScript?😂😂
ОтветитьYou are truly the King of CSS. Enjoy your throne King.
ОтветитьWhat is Little Girl's middle name, Plus, you are the best! Edit: What's the code anyways
ОтветитьThis video is epic.
ОтветитьOmg!! Had no idea css could do this
ОтветитьInteresting but if it’s coded with an JS librairie like react, JavaScript is simplier
Ответитьi spent an hour yesterday writing functions for capitalizing words, then found the equality of data not being the same cuz i capitalized some variables and not the others.. then realized I could have just literally capitalized in the css. fucking retard moment to say the least
ОтветитьNot sure that's great for screen readers? Just remove the excess mark up from the dom
ОтветитьWhen you zoomed in on the "Little Girl" part, I laughed. Thank you.
ОтветитьThis makes me wonder what the best approach would be when I'm using WordPress and custom fields to display content. I usually use PHP if/else statements to only show html/field content if the field has data/content, otherwise show nothing. Now I wonder if this CSS option is better.
ОтветитьVery bad idea to do it too broad. You'll often WANT empty elements for styling so using a very specific selector instead is probably actually the best option
ОтветитьThis is cool kevin
ОтветитьStop making my job easier!
ОтветитьOrrrr you build your app in php, problem solved easy
ОтветитьI just learn’t this today!!!
ОтветитьWe surely have messed up with so much of javascript that makes the websites slow. Writing pure css is very satisfying
ОтветитьBUENÍSIMO
Ответитьor you just remove that snippet.
ОтветитьNext css will can do logic
ОтветитьThank you for this video. JS is WAY too overused these days
ОтветитьPlease make this an ongoing series. There are so many cases where people reach for JS when there are way better ways to accomplish easily with CSS
ОтветитьGreat, but still seems like it's JavaScript's job do that. Let CSS do the styling, let JavaScript handle logic of whether to render it or not based on the value. Sure this technique may come in handy for some other scenarios.
ОтветитьYou're the best
ОтветитьKids fault not mine. Stoopid child needs to get a job.
ОтветитьWow, it's incredibly simple and very useful! Before this i was having to make "if" statements in my templates to properly remove empty elements, but now it's mush more simple
ОтветитьDidn't know about the empty selector
ОтветитьOr you can, you know, not render the empty element in the first place
ОтветитьBased on my experience, in real life, you wouldn't solve this issue with JavaScript
ОтветитьI would love to know how to make a good 0 JS drop-down. It would be nice to have
ОтветитьI wish any browsers supported the way the empty selector is supposed to match elements with only white space.
Ответить🎶for now🎶
ОтветитьIt is very counter intuitive though... not everyone thinks of looking up css for such behavior. Personally i would still prefer JS for this
ОтветитьThat"s a nice way to solve. But I guess, that's validation problem for me. I would either put a regex pattern to the imput to prevent it or add the role class conditionally. But then again it's less code to write 🤷♂️
Ответить❤👐
ОтветитьJust don't "render" the element
ОтветитьYou must be an idiot to put some of your business logci onto frontend....
Better to do it on be as replacement, much more efficient
(That's not about the autrhor of the vid :), it's great)
This makes me want to NOT learn JS and just focus on HTML and CSS instead, lol.
ОтветитьYou are just amazing!!!
Ответитьgreat introduction for little girl
ОтветитьThank you 😊
ОтветитьBreak unexpected things with this one simple trick!
ОтветитьNice! New knowledge! Thanks Kevin
ОтветитьOr just don't put a p there, well, I get that this has other applications
ОтветитьMan i love you , you share every important small detail for free ...
You're amazing
Good solution to a bad design
Ответить