I Had No Idea This Scroll Bar CSS Property Existed

Поделиться
HTML-код
  • Опубликовано: 14 июн 2023
  • 🌎 Find Me Here:
    My Blog: blog.webdevsimplified.com
    My Courses: courses.webdevsimplified.com
    Patreon: / webdevsimplified
    Twitter: / devsimplified
    Discord: / discord
    GitHub: github.com/WebDevSimplified
    CodePen: codepen.io/WebDevSimplified
    #Shorts

Комментарии • 68

  • @superjkmax88
    @superjkmax88 11 месяцев назад +293

    The last sentence sums it up for all css fixes

    • @lewisjones284
      @lewisjones284 11 месяцев назад +32

      And it’s always mentioned at the very last second 😂😂

    • @And1997Ruz
      @And1997Ruz 5 месяцев назад +1

      And it's always Safari
      The new IE

  • @jonathanjohnson2785
    @jonathanjohnson2785 11 месяцев назад +134

    Browser support. Probably the developer's biggest issue to fix😢

    • @lord_kh4n
      @lord_kh4n 11 месяцев назад +10

      It's web developer vs browser developer 😂

    • @jonathanjohnson2785
      @jonathanjohnson2785 11 месяцев назад +1

      @@lord_kh4n 😅😅😅 Yeah eish. If I didn't laugh I'd cry. That's how bad it can get sometimes

    • @imfastboi
      @imfastboi 11 месяцев назад +11

      ​@@lord_kh4nand also vs people not updating their browsers

  • @haruikichi
    @haruikichi 10 месяцев назад +18

    When you are feeling happy, remember there is always browser support

  • @SirCamWA
    @SirCamWA 11 месяцев назад +38

    I really wish I knew about this like last year. I made work arounds using JS, that took hours, to replicate this effect

  • @rahulxcr
    @rahulxcr 11 месяцев назад +5

    This is much needed feature.

  • @user-es2vr3cv1v
    @user-es2vr3cv1v 11 месяцев назад +6

    seems to be a rare property. Never heard of it

  • @BenRogersWPG
    @BenRogersWPG 11 месяцев назад +3

    Watching this on short and I missed all the edge content. I can only see the middle bit of the video.
    Lol can you fix RUclips's padding?!

  • @iamghezali
    @iamghezali 11 месяцев назад +3

    as long as it is well supported by chrome and chromium based browsers, it's not that much of an issue, Safari & Firefox don't have that by default gutter !

  • @beinyourguard
    @beinyourguard 9 месяцев назад

    good to see that css is becoming even more powerful

  • @babchenkonikolay911
    @babchenkonikolay911 11 месяцев назад +7

    Safari has left the chat

  • @shapelessed
    @shapelessed 11 месяцев назад

    The browser support might not be there but it's a noncrucial prop and is still useful whenever it works.

  • @jshstuff
    @jshstuff 7 месяцев назад

    I was excited about this to solve the issue where putting overflow:hidden on the body causes the page to shift, for example when you open a modal, but this is a bad solution for that issue because then there are always 15 pixels of dead space, which is a no-no for basically all designs. for example you won't be able to do a carousel that goes all the way to the edge of the screen. :(

  • @lthakur92411
    @lthakur92411 11 месяцев назад

    Thankyou brother , really informative video

  • @EdgyVidyaGeneral
    @EdgyVidyaGeneral 11 месяцев назад +1

    Theres a hacky workaround for this, but this is a great feature. Hope its fully supported soon

  • @vini6
    @vini6 11 месяцев назад +2

    Am I the only one who can't see the right side? It's literaly overflowing on my screen, no joke intended

    • @BusariOpeyemi
      @BusariOpeyemi 11 месяцев назад

      exactly what I came to the comment section to check. I have the same issue

    • @StiekemeHenk
      @StiekemeHenk 11 месяцев назад

      Yep, RUclips auto-scales the video for your device, I've left a comment and got a reply.
      Must've put an overflow hidden on it 😂

  • @fabriperoconalgomasytodojunto
    @fabriperoconalgomasytodojunto 8 месяцев назад

    time to center all my divs with that

  • @braoha123
    @braoha123 11 месяцев назад +8

    How does this work on macOS compared to windows? The scroll bars have different widths.

    • @StiekemeHenk
      @StiekemeHenk 11 месяцев назад +4

      I imagine the browser handles that.
      The same way DVH/W is handled by the browser.

    • @dipanjanghosal1662
      @dipanjanghosal1662 11 месяцев назад

      It doesn't matter. If you're on Windows or any other os, all scroll bars will be consistent for that particular os. The issue this video is tackling is, how to stop the jump/shift of the content when a scroll bar appears. disappears in a container.

  • @BB_Harunya
    @BB_Harunya 11 месяцев назад

    actually huge, guessing scrollbar sizes never again

  • @toutch2050
    @toutch2050 6 дней назад

    thanks bro

  • @thefamousdjx
    @thefamousdjx 10 месяцев назад

    just another rabbit hole to worry about. ship first

  • @soyunaplanta7457
    @soyunaplanta7457 4 месяца назад

    i love you, thanks man

  • @nyadpics
    @nyadpics 11 месяцев назад +1

    You are awesome!

  • @DerTim
    @DerTim 11 месяцев назад +2

    I don't see a practical use case where I would use these, besides when you do start pixel pushing (is it called like that in english? I mean when you perfectly adjust your pixels)

    • @RodrigoDAgostino
      @RodrigoDAgostino 11 месяцев назад +2

      A very good use case would be a modal window with dynamic content in it, like a form that grows bigger than the screen when error messages are displayed :)

  • @LinuxLoader1287
    @LinuxLoader1287 11 месяцев назад

    Thank you 👍

  • @egoreast
    @egoreast 11 месяцев назад

    Классная фича. Как раз очень нужно для проекта, а я и не знал как это сделать))

  • @yoskokleng3658
    @yoskokleng3658 6 месяцев назад

    i watch all your video. seems u are strong in js. Can u make course about 3D library like three.js ..?

  • @nahueljo
    @nahueljo 11 месяцев назад +3

    What happens if you use scrollbar-gutter with overflow:auto? does it apply twice?

    • @vern_21
      @vern_21 11 месяцев назад +2

      no

  • @_izro_
    @_izro_ 3 месяца назад

    -webkit-scrollbar{ width: 0px; } - this will hide your scrollbar

  • @sweethomes674
    @sweethomes674 11 месяцев назад

    Excellent

  • @mastra90
    @mastra90 11 месяцев назад +1

    Can you put the scroll bar on top of the page so it doesn't need to shift across? Sort of like a z-index equivalent for the scroll bar

    • @SimonBuchanNz
      @SimonBuchanNz 11 месяцев назад

      That's overlay scrollbars. They were (somewhat brokenly) implemented in Chrome at least and were being proposed for stabilization, but Apple blocked it saying, basically "it's a user preference", and instead this got added.

  • @StiekemeHenk
    @StiekemeHenk 11 месяцев назад +1

    Cool, but I can't see what happens when you add it in a mobile formfactor. You should've split the bottom of the video and animated it to show the change.

    • @WebDevSimplified
      @WebDevSimplified  11 месяцев назад +2

      It looks like RUclips is taking my video (which is 9x16 aspect ratio) and zooming it in if your phone is greater than a 9x16 aspect ratio instead of keeping the full video and adding black bars to the top/bottom. Unfortunately, there isn't much I can do about this (other than try to push the content more central in the future) as I was unaware RUclips did this and really wish they didn't.

    • @StiekemeHenk
      @StiekemeHenk 11 месяцев назад

      @@WebDevSimplified ah dang. Makes sense.
      Isn't 20:9/21:9 the most common ratio for phones nowadays?
      Most phones ditched the physical buttons and also removed the forehead and replaced it with a holepunch or notch.
      Doesn't help that I use swipe gestures so I have the full screen for display, no buttons at the bottom.

  • @kuyabae9008
    @kuyabae9008 9 месяцев назад

    How can you still intact the full website in this 1080x1920 resolution for yt shorts?

  • @yahtzee1990
    @yahtzee1990 10 месяцев назад

    wow great!

  • @mohammadali3900
    @mohammadali3900 5 месяцев назад

    Very nice

  • @accforgame8563
    @accforgame8563 11 месяцев назад

    Wow nice content

  • @1DonFF
    @1DonFF 5 месяцев назад

    Not working for me could you provide the code so that I can copy & paste to see if it’s a me error or not?

  • @mcdaddy1334
    @mcdaddy1334 7 месяцев назад

    Very cool

  • @royzelig
    @royzelig 7 месяцев назад

    Is it there a solution that works with chrome, if I don't have the latest version?

  • @NeoAres1
    @NeoAres1 3 месяца назад

    GOD!!!!

  • @TheDenisTopG
    @TheDenisTopG 11 месяцев назад

    Is there an equivalent for the horizontal scrollbar?

    • @blackpurple9163
      @blackpurple9163 11 месяцев назад

      It'll work with all alignment it seems

  • @iistw22788
    @iistw22788 11 месяцев назад

    How about “overflow: overlay;”?

    • @cool_boyua
      @cool_boyua 11 месяцев назад

      It’s an alias to overflow: auto

    • @iistw22788
      @iistw22788 11 месяцев назад

      @@cool_boyua But if the overflow is overlay, it won’t take out space.

  • @ChamplooMusashi
    @ChamplooMusashi 11 месяцев назад

    It makes me so mad all the stupid BS we have to deal with that should have just been a feature 10 years ago and the fact that this crap has to be opted into instead of treated as a default behavior, because people already fixed the stupid BS and will refuse to remove their stupid fixes

    • @t6hp
      @t6hp 11 месяцев назад

      True, I watched as a colleague spent almost a full day, just getting this right with JS, so it works correctly, responsively, on all browsers. Felt so mundane and stupid.

  • @Rider0fBuffalo
    @Rider0fBuffalo 11 месяцев назад

    Lol always safari ..

  • @thedelanyo
    @thedelanyo 11 месяцев назад

    I'll rather love removing it entirely 😅

  • @kang-dohsik4693
    @kang-dohsik4693 11 месяцев назад

    Am the 1,5 k like i feel so proud for no reason 😭

  • @danielharten4890
    @danielharten4890 11 месяцев назад +1

    Can’t see the right side example 👎

  • @bradforddrake8633
    @bradforddrake8633 8 месяцев назад

    Totally worthless information. No info on how to fix scrollbat
    not anchoring.

  • @im7254
    @im7254 11 месяцев назад +1

    chrome + firefox are the only browsers worth checking. the rest of them simply do not matter

    • @RodrigoDAgostino
      @RodrigoDAgostino 11 месяцев назад +1

      Sandly people in the US are big fans of Apple crap, and plenty of them just use the default browser, meaning Safari :S