The Modern Way To Push That Footer Down - JUST 3 Lines Of CSS

Поділитися
Вставка
  • Опубліковано 5 вер 2024

КОМЕНТАРІ • 170

  • @mikeploythai
    @mikeploythai Місяць тому +92

    good fix! i personally use flex flex-col and min-h-screen on the parent, and apply flex-1 to the main child to let it expand. effectively the same thing though lol

    • @dipesh722
      @dipesh722 Місяць тому +1

      I use justify-between, so it pushes the footer at bottom. is it correct 😅

    • @frontendfyi
      @frontendfyi  Місяць тому +19

      Yes very similar indeed! Only “downside” is that you need to add styles to children too instead of only the parent. Makes it that this logic is split over multiple elements. But yeah, nothing wrong with it and very similar approach 😁

    • @liu-river
      @liu-river Місяць тому

      @@frontendfyi I agree. I have been using flex also before I watched this and I think this is a better solution since the parent controls everything and it is much clearer. Imagine your child component gets imported than the style will have to be in another file.

    • @DavetheRave52
      @DavetheRave52 Місяць тому +1

      I prefer the grid method because the control is central. For personal projects I always go with it.
      Grid can require more maintenance though. For example a site with third party widgets that you can't control injection points for - the main el might not always be the second row. I've found the flex method to require less maintenance in these cases

    • @JS_Jordan
      @JS_Jordan Місяць тому

      +1 this

  • @hclyrics
    @hclyrics Місяць тому +14

    Please write Tailwind in the video title instead of CSS.

  • @MacGamper
    @MacGamper Місяць тому +67

    Why not use plain HTML/CSS to explain HTML /CSS?

    • @frontendfyi
      @frontendfyi  Місяць тому +16

      It’s a thing I’m constantly struggling with. I see upsides and downsides to both and I haven’t made a final decision yet. Did a poll on the channel recently and the majority voted for tailwind. Love to hear opinions though, so feel free to share more of your thoughts!
      This is also why I tried to show the css equivalent for every step.

    • @robertholtz
      @robertholtz Місяць тому +16

      @@frontendfyiIt’s more like 3 lines of Tailwind markup than 3 lines of CSS.

    • @justinmiller3349
      @justinmiller3349 Місяць тому +10

      ​@frontendfyi I think vanilla css makes it easier to understand the underlying concept. Those that want to use a library will still be able to apply it. As someone who's used bootstrap and tailwind in the past I think vanilla css is getting better and better over time to the point where I'm not sure I'd choose a library for a new project unless I just wanted some decent default styling to start with

    • @MC_DarkMaster
      @MC_DarkMaster Місяць тому +10

      If you understand HTML/CSS then you can adopt it to the framework you like. If you explain it in Tailwind I skip that video because I don't use that framework and don't want to find out what the things are actually doing or how it is working.

    • @topnatop
      @topnatop Місяць тому

      It’s about the concept that anyone who understands CSS can grasp this clip without needing to know Tailwind at all. However, some viewers start complaining as soon as they see the word "Tailwind." Maybe using pure CSS might be better.

  • @_whatistruth
    @_whatistruth Місяць тому +5

    it can be done with flex, such as using display:flex;flex-direction:column; and then applying flex: 0 0 auto to header and footer. and applying flex:auto; to main.

    • @adeemmmm
      @adeemmmm 28 днів тому

      I would do flex grow to main

    • @hoxtygen
      @hoxtygen 19 днів тому

      Worth noting that you still have to set min-height to 100dvh for this to work.

  • @alexpanteli3651
    @alexpanteli3651 Місяць тому +4

    Your videos are best by far. Please post more of a cool CSS, Js stuff. Greetings from Cyprus!

    • @frontendfyi
      @frontendfyi  Місяць тому

      Thank you so much! Glad you like the videos, an appreciate you commenting ❤️

  • @tejasshekar
    @tejasshekar Місяць тому +5

    Me trying to find solution for a similar problem. Opened UA-cam first. Got this suggested. Hmm. Not even searched the issue anywhere yet. Looks like phone has moved on from listening to mind reading

    • @frontendfyi
      @frontendfyi  Місяць тому +2

      Hahaha this is great! Hope the video was indeed useful to you!

    • @mykolatheprogramer
      @mykolatheprogramer Місяць тому

      The same situation😅

  • @thedelanyo
    @thedelanyo Місяць тому +9

    I stopped watching the video because "in just 3 lines of CSS" turns to be so many inline of Tailwind

    • @frontendfyi
      @frontendfyi  Місяць тому +2

      Or you just skip to the summary chapter and see that it's indeed just 3 lines you have to add 😉

    • @MutantNinjaDonut
      @MutantNinjaDonut Місяць тому

      🥱

    • @tictac1020
      @tictac1020 Місяць тому

      I also hate Tailwind but since Tailwind is just a means of applying CSS, you can still grok the actual CSS rules to apply. Also, he mentions what the actual rules are at the end. Display grid, min height 100dvh, grid template rows auto 1fr auto.

  • @blackneocs
    @blackneocs Місяць тому +4

    You also can apply flex and flex col to the parent and margin top auto (mt-auto) on the child footer. So it will push it to the bottom.

    • @frontendfyi
      @frontendfyi  Місяць тому +1

      This is true!

    • @danielwilkowski5899
      @danielwilkowski5899 Місяць тому

      @@frontendfyi So I guess 100vh and grid template columns isn't the ONLY option like the title says. Perhaps you should change the title?

    • @frontendfyi
      @frontendfyi  Місяць тому

      @danielwilkowski5899 I get what you’re saying. With “only” in this case I mean: the only way I think you should do it. But that would make the title way too long.

    • @danielwilkowski5899
      @danielwilkowski5899 Місяць тому

      @@frontendfyi current title is clickbait

    • @frontendfyi
      @frontendfyi  Місяць тому

      @danielwilkowski5899 okay

  • @AlexMarcoDAngelo
    @AlexMarcoDAngelo Місяць тому +1

    Great fix! I fixed mine by using this code in that wrapper div:
    I am gonna test to see if the two options behave the same way. Oh and of course header is 'fixed' and footer is 'sticky' in my case :)

    • @frontendfyi
      @frontendfyi  Місяць тому

      The result will be fairly similar! Main benefit to grid as soon as you have more than 2 elements is that you only need to set styles (grid rows) on the parent element rather than multiple elements. But that’s literally the only “benefit” I can think of 😁

  • @bobhamilton6760
    @bobhamilton6760 Місяць тому +1

    Love this... Clean, intuitive, localized. Nice work!

    • @frontendfyi
      @frontendfyi  Місяць тому

      Thank you! Glad you enjoyed it!

  • @stahlmandesign
    @stahlmandesign Місяць тому

    Very useful, and well explained with the grid fragment expanding. Sticky header with top is a bonus. I put -top-24 to only hide a portion of my header when scrolling

  • @ste-fa-no
    @ste-fa-no Місяць тому +1

    That's my chosen approach 👍 although I try and use body directly. If there's injected code, even if I wrap things, they would break the design, and maybe the footer won't be the last item at the bottom anyway.

    • @frontendfyi
      @frontendfyi  Місяць тому +1

      Yeah nothing wrong with using the body indeed! Just need to be aware that things can be injected in the body indeed.

  • @charliesta.abc123
    @charliesta.abc123 Місяць тому

    Thank you so much! You have no idea the messy workaround I used 😅. The frontend will never be my friend but as I look for independence I need to learn catch-up. Tailwind is great help

    • @frontendfyi
      @frontendfyi  Місяць тому

      Glad it was helpful for you!

  • @Inumaru3
    @Inumaru3 Місяць тому +2

    A better alternative to what I am used to, using flex instead of grid

  • @treyjapan
    @treyjapan Місяць тому +1

    Works like charm. Thank you, Jeroen!

  • @fusedqyou
    @fusedqyou Місяць тому

    Nice tutorial. I personally prefer having a main contain with `min-h-dvh` and using flex to grow the main content container and take priority in height. This way the footer is aligned to the bottom, and any extra height required by the main content is properly accounted for. Has always worked like a charm.

  • @nazzanuk
    @nazzanuk Місяць тому +16

    Just be upfront about Tailwind in the title next time so i can skip the video.

    • @frontendfyi
      @frontendfyi  Місяць тому +1

      I would love to hear though what you don’t like about the few lines of tailwind I add, since I explain every css property you need. I think you will still gain the same knowledge. Would love to hear why you decide to skip. Thanks!

    • @ducanh95
      @ducanh95 Місяць тому +1

      ​@@frontendfyi i guess because obviously not everyone is using or prefers using tailwind.
      You will reach a far bigger audience when showing and teaching things in plain css

    • @frontendfyi
      @frontendfyi  Місяць тому +1

      I think you’re right. My latest video and the one dropping this week will be fully CSS only. Let me know what you think!

    • @HappyDancerInPink
      @HappyDancerInPink Місяць тому +1

      Skill issue - just read the CSS when he hovers on the tailwind

    • @BoogeyMan-fu5yn
      @BoogeyMan-fu5yn Місяць тому

      skill issue

  • @tonydrake462
    @tonydrake462 Місяць тому

    OK - I'm a 40 year dev, who has finally embraced the front end by building an angular SPA (live with customers for 4 years without me knowing any of the CSS magic that make it look cool other than copy/paste examples) - so now I'm forcing myself to finally embrace CSS - and loving it...(I don't know what I was so frightneded!!) - I worked with WPF like 20 years ago, so many of the same concepts, but your tips just knock me into another zone.. thanks.

    • @frontendfyi
      @frontendfyi  Місяць тому

      This is so great to hear! Happy that I’m able to help you so much! Thank you so much for sharing this with me.
      Since you’re just starting out with CSS, I’d like to ask you something I’m doubting a bit about for a while now: Do you think it’s confusing that I’m mainly explaining CSS through Tailwind, even though I try to show the css equivalent and what Tailwind rendered in the end? Do you think the videos would be easier to follow or even more useful to you if I wrote plain css?
      Thanks!

  • @biovawan
    @biovawan Місяць тому +2

    What about
    #app, script {display: contents}
    ?
    Now the body can be styled as you wish. The less nesting, the less troubles to style

    • @frontendfyi
      @frontendfyi  Місяць тому

      What would this do to push the footer down? Could you explain it a bit more?

    • @biovawan
      @biovawan Місяць тому

      ​@@frontendfyi display contents makes elements themselves disappear while keeping its children in the document flow. This allows the child elements to be displayed as if they were direct children.
      Now you can apply grid rows (auto 1fr auto) to body: nav + main + footer.
      Also maintain the scrollbar of the main and the basic layout is ready

    • @frontendfyi
      @frontendfyi  Місяць тому

      @biovawan oooh that’s what you mean! Interesting approach yeah. I’m honestly not sure if there would be any downside to it. Plus you gotta make sure you apply it to any element that you want to hide in that case. For example random JavaScript html snippets injected.

    • @RT-.
      @RT-. 28 днів тому

      display: contents is pretty new and only the latest browser versions have support

  • @chrisicotec7652
    @chrisicotec7652 Місяць тому

    i thought i would get a solution to something that really irritates when creating blank layouts for clients.... but it tailwind so im still gonna have to persevere with what im trying to do... i never use frameworks unless a client specifically wants it, but you got yourself a new follower anyway

    • @frontendfyi
      @frontendfyi  Місяць тому

      I tried to show the css equivalents too - that wasn’t helpful for you either?
      Since, I’ve switched to make new videos with vanilla css by the way. Thanks for commenting!

  • @LePhenixGD
    @LePhenixGD Місяць тому

    I prefer this solution conpared to other ones, it's simple and really understandable!

  • @DeepTitanic
    @DeepTitanic Місяць тому +2

    I nearly subscribed but then I realised you're using TailWind

    • @frontendfyi
      @frontendfyi  Місяць тому

      Highly debating whether I want to stick with that though. I’m aware that it’s an abstraction layer that some people don’t like, and even to quite some can be confusing. Thanks for your honesty.

  • @MohamedRabi
    @MohamedRabi 8 днів тому

    Great fix! thank you 👍

  • @djryanashton
    @djryanashton Місяць тому

    With open source, as a developer, I can also look into the code and see exactly what is happening, exactly how my personal data is being used. It is being saved to a secure database? Is it being distributed to third party advertisers? I think this is the primary reason people love open source.

  • @emreaydn-gc1om
    @emreaydn-gc1om 17 днів тому

    cool video! can you tell me what font and theme are you using on vscode?

  • @kamill34
    @kamill34 Місяць тому +4

    there is a several solution for this, eg flex or calc, but the grid wasn't on my daily solution so is something new - thanks!

    • @frontendfyi
      @frontendfyi  Місяць тому +1

      There’s definitely more solutions to this indeed! Glad you like this one though!

  • @nan68
    @nan68 Місяць тому +1

    They have a builtin util for 100dhv already so you can just do min-h-dvh

    • @frontendfyi
      @frontendfyi  Місяць тому

      Oh!! Didn’t see they added this! Thanks for mentioning 🙏

  • @ajimbong1623
    @ajimbong1623 Місяць тому

    Thanks for the great great video, I'm looking forward to the tailwind course 🤞

  • @didemkucukkaraaslan7373
    @didemkucukkaraaslan7373 7 днів тому

    Amazing tip as always!

    • @frontendfyi
      @frontendfyi  7 днів тому +1

      Thank you Didem! Nice to see you in the comments again 😁

    • @didemkucukkaraaslan7373
      @didemkucukkaraaslan7373 6 днів тому

      @@frontendfyi :D finally I have time for improvement of my skills

  • @vasyaqwe2087
    @vasyaqwe2087 Місяць тому

    This is awesome! Will be using that. BTW, latest tailwind has min-h-dvh, svh and lvh classes :)

    • @frontendfyi
      @frontendfyi  Місяць тому +1

      Someone else mentioned it too! Didn’t know that yet. Thanks 😁 Also happy you enjoyed the video!

  • @rayhanislam7518
    @rayhanislam7518 Місяць тому

    another fix is wrapper div "flex flex-col w-full min-h-dvh" and the middle section just add "flex-1 flex-grow"

    • @frontendfyi
      @frontendfyi  Місяць тому

      Yes this definitely works too! Only reason I prefer grid is so I only have to set styles on a single element rather than on the children too. But yeah, that’s literally the only difference I think 😁

  • @user-qj4rr1rm8i
    @user-qj4rr1rm8i Місяць тому

    Thank you. That was my pain in the ass for decade!!

    • @frontendfyi
      @frontendfyi  Місяць тому

      It is right!! Glad you got the solution now 😁

  • @manojpudasaini1565
    @manojpudasaini1565 Місяць тому

    Absolutely the thing that I have been dealing with why h-full is not working for inner pages inside the layout for my project in Nextjs. Than you 👏🏻🙏🏻
    Also, can you share your vscode theme and font name, it looks awesome and cool 😎🎉

    • @liu-river
      @liu-river Місяць тому +1

      Yes, this solved the problem. With flex-1 on the parent, the children does not know what the height is.

    • @frontendfyi
      @frontendfyi  28 днів тому +1

      It's called Arc, from the Bearded Theme collection: github.com/BeardedBear/bearded-theme
      The font is called Recursive Mono Casual Static

  • @RahulShrivastava31
    @RahulShrivastava31 Місяць тому

    Can you share your VS Code Settings? Or at least help with the theme and font name? Really liked your setup and thanks for making these videos

  • @chmod4000
    @chmod4000 Місяць тому

    have the parent flex and give the footer a margin-top: auto.. Thats all you need. Also, tailwind has min-h-dvh included since a couple of versions now, just so you know!

  • @DenizGazitepe
    @DenizGazitepe Місяць тому +2

    This video must be a gift of god, because I was trying to find the best way to do this for the last 5 hours! Thank you so much

    • @frontendfyi
      @frontendfyi  Місяць тому

      I love hearing this! Glad the algorithm decided to show it to you!

  • @sourabhhaldar5091
    @sourabhhaldar5091 Місяць тому +3

    hey. can you tell what font family are you using in your vscode

  • @mehmetbagci3447
    @mehmetbagci3447 Місяць тому

    Finally the guide i need :) thanks

  • @joshua.hintze
    @joshua.hintze Місяць тому

    What would you do if your footer needs to always be visible. For example it’s a tab bar at the bottom and the main content needs to scroll?

    • @frontendfyi
      @frontendfyi  Місяць тому

      If it’s always visible then I think position fixed for the footer makes most sense.

  • @FlaviusCalinTofan
    @FlaviusCalinTofan Місяць тому +3

    Misleading TITLE! This IS NOT CSS, it is a framework ( tailwind ) . You don’t mention anywhere you are using tailwind css,
    This is the worst tutorial I ever saw …

    • @frontendfyi
      @frontendfyi  Місяць тому +1

      Tailwind is CSS my friend. I even show the css properties to make it even clearer. But thanks for your constructive feedback.

  • @al3vs
    @al3vs 29 днів тому

    Nice video!! What is the font you use?

    • @frontendfyi
      @frontendfyi  28 днів тому +1

      Thank you!
      The font is called Recursive Mono Casual Static

    • @al3vs
      @al3vs 28 днів тому

      @@frontendfyi If it's not too much to ask, what vscode theme do you use? I really like your configuration.

  • @nouridev
    @nouridev Місяць тому

    Thank you so much!

    • @frontendfyi
      @frontendfyi  28 днів тому

      You're welcome! Glad you enjoyed the video!

  • @ilan117
    @ilan117 Місяць тому

    Very much looking for the framer motion course ❤

    • @frontendfyi
      @frontendfyi  Місяць тому

      Quite some modules are already released! Did you see that? 😁 www.frontend.fyi/course/framer-motion

  • @adarshdhital007
    @adarshdhital007 Місяць тому

    Wow that's so amazing, thankyou sir!

  • @lenickramone
    @lenickramone 27 днів тому

    06:05 does someone know what font is this?

  • @ahmedkhabar
    @ahmedkhabar Місяць тому

    I worked with this aproch for a long time, but I face a problem with it, when I have a table and I want to make it overflow-x-scroll in small devices, I got an overflow in X direction for the entire layout, you can try it to understand what I mean.

    • @frontendfyi
      @frontendfyi  Місяць тому +1

      Try adding grid-template-columns: minmax(0, 1fr); too. I think what you’re experiencing is called grid blowout.

    • @ahmedkhabar
      @ahmedkhabar Місяць тому

      @@frontendfyi I was so dump, instead of adding a table inside a div with overflow-x-auto, I give overflow-x-auto directly to the table.

    • @liu-river
      @liu-river Місяць тому

      @@frontendfyi This is a must if you ever need to do overflow scrolling in any of the children element

  • @balaclava351
    @balaclava351 Місяць тому +1

    FYI, fr is fraction not fragment

  • @KrishT0
    @KrishT0 Місяць тому +1

    your vs code theme name?

    • @frontendfyi
      @frontendfyi  28 днів тому +1

      It's called Arc, from the Bearded Theme collection: github.com/BeardedBear/bearded-theme
      The font is called Recursive Mono Casual Static

  • @diegognoatto590
    @diegognoatto590 Місяць тому

    100svh is better in my tests, good grid aproach tho

  • @wolfscoding
    @wolfscoding Місяць тому

    Or u could use "mt-auto" so the footer get pushed to the bottom of the page. Would me in 1 line of CSS. But still thanks.

  • @isaidstream4547
    @isaidstream4547 Місяць тому

    Framework nightmares..

  • @zeusuofm
    @zeusuofm Місяць тому

    What about a header pinned to the top?

    • @frontendfyi
      @frontendfyi  Місяць тому

      There’s a part at the end where I show exactly this 😁

  • @jamesgulland
    @jamesgulland Місяць тому

    “mb-auto” is all you need. You’re welcome 😂

    • @frontendfyi
      @frontendfyi  Місяць тому

      You at least need to add a min-height to your body then. You’re welcome 😉

  • @dealerpriest
    @dealerpriest Місяць тому +1

    *fraction

    • @frontendfyi
      @frontendfyi  Місяць тому

      Fraction?

    • @dealerpriest
      @dealerpriest Місяць тому +1

      @@frontendfyi the fr css unit is short for fraction. Not fragment. If I'm not mistaken👍

    • @frontendfyi
      @frontendfyi  Місяць тому +1

      @dealerpriest oooh, oops you’re totally right. Haha. Sorry for keep making the same mistake over and over in the video 😂

  • @lxc3909
    @lxc3909 Місяць тому +1

    Tailwind is hideous.

    • @frontendfyi
      @frontendfyi  Місяць тому

      It looks horrible yes, it is so great to work with though. Although I tried 100 times before I finally converted 😂

  • @kale_bhai
    @kale_bhai Місяць тому +1

    I use Flex and Flex grow because I tend to think that as 1D only, so I don't use Gird System.

    • @NicoHeinrich
      @NicoHeinrich Місяць тому

      The main difference is that you can style only the parent with grid. With flex-box you have to style the child as well.

  • @FalconiZzare
    @FalconiZzare 23 дні тому

    This becomes a bit problematic when the header has position: fixed

    • @frontendfyi
      @frontendfyi  23 дні тому

      This is true! In most cases position sticky will give you the same result though.

    • @FalconiZzare
      @FalconiZzare 22 дні тому

      @@frontendfyi sticky has some downsides. However, If header is fixed, we can say that it's not really part of the GRID anymore. So [1fr_auto] may help.

  • @mvargasmoran
    @mvargasmoran Місяць тому +2

    Whenever someone pushes the Grid cart, I'm happy to knowing that I'm not alone.

  • @PeterStJ
    @PeterStJ Місяць тому

    fr is a 'fraction', not a 'fragment'... 🤦🏻

    • @frontendfyi
      @frontendfyi  Місяць тому

      Yup.. I misspoke each and every time 😂 my bad.

  • @chrismcconnell7058
    @chrismcconnell7058 Місяць тому

    Very good fix 👏🏻 also mind sharing your editor font?

  • @jasper2virtual
    @jasper2virtual Місяць тому

    Flex col is much simpler and understandable

  • @rootoxygen5403
    @rootoxygen5403 Місяць тому

    Good but u made it more complex than dvh 100,,,😂

    • @frontendfyi
      @frontendfyi  Місяць тому +1

      Yes! I didn’t know that it was added, so I learned something new by making this video too. Hahaha

  • @Ditellirate
    @Ditellirate Місяць тому

    3 lines of code and 7.5 mins video. Gg

    • @frontendfyi
      @frontendfyi  Місяць тому +1

      Haha. Yeah the difference between wanting the answer and wanting to know the why, right?

  • @tommysmith5479
    @tommysmith5479 Місяць тому

    A big thumbs down from me. People coming to this video didn't expect the added complication of React and Tailwind - there's no mention of those in the title. I'll stick to Kevin Powell - and everyone else should too.

    • @frontendfyi
      @frontendfyi  Місяць тому

      I love the way people share feedback on the internet 😂 I guess you should try starting your own youtube channel.
      And yes, Kevin makes great content, people should indeed follow him.

    • @tommysmith5479
      @tommysmith5479 Місяць тому

      @@frontendfyi I don't need to start a YT channel.

    • @frontendfyi
      @frontendfyi  Місяць тому

      That is correct.

  • @ahm0xc
    @ahm0xc Місяць тому

    what font are you using in vs code ? it looks smooth. I would like to try that too.

    • @frontendfyi
      @frontendfyi  28 днів тому

      The theme called Arc, from the Bearded Theme collection: github.com/BeardedBear/bearded-theme
      The font is called Recursive Mono Casual Static

  • @WojciechZdziejowski
    @WojciechZdziejowski Місяць тому

    Now go to w3c and test this solution. Next look to good practics for SEO.
    Bad advice bro.

    • @frontendfyi
      @frontendfyi  Місяць тому

      Curious to hear how this impacts seo, because I don’t think it does.

  • @cafelutsa_
    @cafelutsa_ Місяць тому +1

    bending over backwards just to use grid. horrible approach

    • @frontendfyi
      @frontendfyi  Місяць тому

      Which solution do you like more - honestly wanna know?
      I really like this the best, didn’t bent over ‘cause that would break my back.

    • @cafelutsa_
      @cafelutsa_ Місяць тому

      ​@@frontendfyi displaying the parent of all the content as flex, setting the flex direction to column, and then targeting the footer and setting margin-top to auto. this would scale the best way. changing the layout of the website would be extremely easy this way. think of every time you would want to change something, maybe delete the footer or the header entirely. you would need to change the grid-rows prop (line 5 @5:26) every time the layout changes. this simply does not scale. what if for example the main, for some reason, had some other siblings? you would also need to change the grid-rows prop to match this new markup change. your approach, this approach, is good whenever we're absolutely sure that there are N number of elements inside the root, and that never ever changes. let the layout breathe, display it to flex and let the footer push itself down with margin, just like I said at the beginning. that's the solution I like more.
      no need to be petty and tell me you "didn't bent over because that would break your back". what a stupid joke. "bending over backwards" means to work very hard to accomplish something. I get the video; you showcase one of the many approaches. this one happens to suck.
      I created a pen with the approach I described but I think UA-cam deletes comments with links in them ( codepen.io/vladsolomon/pen/ExBjeZy )

    • @frontendfyi
      @frontendfyi  Місяць тому

      lol. Happy to hear you’re a big fan of your own approach though. Was genuinely interested in your solution and happy to have a discussion about it. Making a stupid joke was just to hopefully make stuff a bit less serious and have that healthy discussion. Apparently that didn’t work. No reason for me then to tell you why my solution definitely has my preference here (there is almost never a “best” in web dev).
      Hoping you have a great weekend and think about how you can have a healthy discussion instead of telling people their approach sucks in the future. Saying stuff like that is too easy on the internet (especially anonymously). It brings you nothing.

    • @cafelutsa_
      @cafelutsa_ Місяць тому

      @@frontendfyi I agree that there is no best solution. i agree that even my solution is not for all cases. but yours, using grid, work in only one scenario: when the markup does not change. not even one bit. one change in the markup and you have to rewrite the css rule. that, for me, is stupid. no need to go all teary eyed; you asked, I answered, your joke was not good. timing is extremely important. I think the only one that turns this in an unhealthy discussion is you.
      Hoping you have a great weekend and think about how you can receive actual feedback.
      Also, the bit about anonimity is borderline stupid. Look at the link I sent. It has both my first and last name. You want me to tell you that this approach sucks nominally? ok, no problem, I, Vlad Solomon, think this approach works in only one case. the benefits are marginal, near zero even, because if the markup changes, the css has to change also, just another exercise in reinviting the wheel.

    • @frontendfyi
      @frontendfyi  Місяць тому

      @cafelutsa_ 👍

  • @davea136
    @davea136 Місяць тому

    Thank you for your video. Yet more proof that CSS is unforgivable, unworkable garbage. Go read a real GUI API like Quickdraw from 1984. seriusly, the craft was farther advanced in 1984 than anything you can find in a web browser. Frightening.

    • @frontendfyi
      @frontendfyi  Місяць тому

      It almost sounds like you’ve been bitten once too often with CSS, haha. I can fully imagine that CSS can absolutely feel as that unforgiving language when you try to style something. CSS is definitely not an easy language to learn.
      Your reference to QuickDraw seems to be more in line with for example the Canvas web api. They serve a completely different purpose than what CSS is trying to achieve.