Introduction to Viewport Units

Ғылым және технология

How can you use new CSS units - viewport units - to size content that changes in response to the viewport size? Jen introduces you to how vw, vh, vmin, vmax can be used in creative ways.
Demos:
• labs.jensimmons.com/2017/01-01...
• labs.jensimmons.com/2016/examp...

Пікірлер: 71

  • @hoppeldesign4886
    @hoppeldesign48866 жыл бұрын

    I watched this video at 6am yesterday and my head exploded. I just spent the afternoon re-writing a significant amount of code for a project coming due, using Viewport Units to control various CSS Grid elements on a landing page. I got rid of all of the media queries I was using. So much cleaner and smarter. And best of all? It works WAY better across every viewport. I just broke singing "A Whole New World". I sang both parts.

  • @multifacetedperson

    @multifacetedperson

    4 жыл бұрын

    You are hilarious! Keep being awesome!

  • @super9studioscommercialpho370

    @super9studioscommercialpho370

    Жыл бұрын

    I love this so much, especially the part about singing both parts. HAHA!!

  • @lorenzojavier-av
    @lorenzojavier-av2 ай бұрын

    I am beginning to use CSS. This video was helpful. I will probably be watching all your other videos for a while. Thank you for sharing your knowledge so succinctly.

  • @skylinecanvas
    @skylinecanvas6 жыл бұрын

    Great video, always learn new tips from you Jen. Thank you.

  • @klikmaker
    @klikmaker6 жыл бұрын

    I've been waiting for the other shoe to drop, in the sense that I've been waiting for Jen Simmons to put out a video where I don't learn something, even about things that I think I understand. It hasn't happened yet, and I'm beginning to think this is a one-shoe operation. (I never know...in case I'm being too obtuse, that's a compliment.)

  • @silentblackhole
    @silentblackhole5 жыл бұрын

    Loved your thoughts at the end of this video on the history of the edges, esp the bottom edge. On point.

  • @drewaugust
    @drewaugust6 жыл бұрын

    The explanation is amazing. Not only on the unit, but the history and spec about the unit. I am watching every video. Subscribed!

  • @akramsaouri
    @akramsaouri6 жыл бұрын

    Loving the show, keep it up.

  • @lamaruga4577
    @lamaruga45776 жыл бұрын

    All the videos are always great, thank you for triggering our curiosity

  • @zaboogoosfraba6699
    @zaboogoosfraba66996 жыл бұрын

    I was hoping you hadn't forgot your fan club . Thank you for this video!

  • @vladyn
    @vladyn6 жыл бұрын

    A very useful overview - thank you!

  • @evilofbanality
    @evilofbanality6 жыл бұрын

    This show is always so thoughtful and interesting. Thank you so much for it.

  • @stevenseah9168
    @stevenseah91686 жыл бұрын

    amazing. been watching this non stop. Pls do more and more. TQ!

  • @gjb7966
    @gjb79664 жыл бұрын

    Thank you, Jen! Love your videos!

  • @ozzyfromspace
    @ozzyfromspace5 жыл бұрын

    This woman is a CSS goddess lol! Fantastic video, so informative 😃. This wasn't a specific tutorial. It was a glimpse of THE BIG PICTURE and she nailed it!

  • @AlvomaniaDK
    @AlvomaniaDK3 жыл бұрын

    This is incredibly sweet tutorial, thanks indeed

  • @edwassermann8368
    @edwassermann8368 Жыл бұрын

    Love the possibilities this opens up.

  • @philipelizaga3813
    @philipelizaga3813 Жыл бұрын

    thank you ma'am, your message is straight and clear and it helps me a lot

  • @user-ot1dk4fd8i
    @user-ot1dk4fd8i6 жыл бұрын

    You're just amazing! Great videos and great explanation. Keep up with good videos!

  • @usamasaad9334
    @usamasaad9334Ай бұрын

    Your way of talk is so beautiful

  • @TechtecnoArgentina
    @TechtecnoArgentina5 жыл бұрын

    Hello, I'm Elias Nielsen, your tutorials are very helpful.

  • @poneis88
    @poneis885 жыл бұрын

    I would like to thank Jen for another excellent video. I am creating my first landing page and I am determined to add responsive features from day one, though I waas struggling to grasp all the concepts necessary to make this happen.

  • @michongoma7598
    @michongoma75986 жыл бұрын

    Very educative! please continue . . .

  • @yakine13
    @yakine136 жыл бұрын

    Such quality with such a nice voice...

  • @adrianqx
    @adrianqx Жыл бұрын

    Thank you , thank you, thank you this made so much sense !

  • @sigmaviscount6631
    @sigmaviscount6631 Жыл бұрын

    I read your book Jen. You are such a goddess on this. ❤❤❤

  • @edwassermann8368

    @edwassermann8368

    Ай бұрын

    Hey. What book?

  • @TrueMiiRiiCo
    @TrueMiiRiiCo4 жыл бұрын

    i used JS before to find out the width and the height of a page, save them in variables, recalculate them if the browser gets resized and set the new height and width to the header... viewport units make everything so much more easier ^^

  • @thiagovilla970
    @thiagovilla9706 жыл бұрын

    Thank you for helping us build a better web

  • @nick8292
    @nick82926 жыл бұрын

    Thank you, very useful.

  • @vincentreynaud7
    @vincentreynaud75 жыл бұрын

    Thank you for this useful video! I was also hoping that you would address the issue of using vh on mobile (navigation bars showing and hiding disrupt elements using vh). Maybe in a next video?

  • @0verkilla
    @0verkilla4 жыл бұрын

    I love to use height: calc(100vh - whatever) great explanation as always!

  • @AbhishekKumar-mq1tt
    @AbhishekKumar-mq1tt6 жыл бұрын

    Thank u for this awesome video

  • @jayandrews2358
    @jayandrews23586 жыл бұрын

    Great Stuff, thanks so much!

  • @naruto5437
    @naruto54374 жыл бұрын

    best channel on css

  • @ruffneck718
    @ruffneck7186 жыл бұрын

    Thank you for sharing.

  • @remymartins6778
    @remymartins67786 жыл бұрын

    Thanks. Kept to minimum and no detail left behind.

  • @dr__ey
    @dr__ey2 жыл бұрын

    thanks so much for this explanation !! :]

  • @aritrapaul5145
    @aritrapaul51452 жыл бұрын

    I hope you are well ma'am ....discovered your channel just last week, watched all of them and learnt a lot... Will wait for some new tutorials :)

  • @danielsokil9529
    @danielsokil95296 жыл бұрын

    Can't wait to see advanced animation techniques.

  • @fdc_8507
    @fdc_85076 жыл бұрын

    Thanks jen I'm big fan for you

  • @topreyalite
    @topreyalite9 ай бұрын

    Very good explanation

  • @santiagomedinafiguera7280
    @santiagomedinafiguera72804 жыл бұрын

    You're great I miss you.

  • @Tiger__Man
    @Tiger__Man4 ай бұрын

    I changed my whole code i had a bad thoughts about vh and vw . I was changing the font size each break with media queries. now I guess I don't need to. thanks to you

  • @josephbillingsley2561
    @josephbillingsley25616 жыл бұрын

    Great video. Any tips on what to do on mobile browsers where the toolbar disappears on scrolling, causing the viewport height to change? It would be nice to use CSS for this but it ends up causing the whole page to shift unpleasantly as you scroll through it

  • @gentlemanfinn86

    @gentlemanfinn86

    6 жыл бұрын

    Joseph Billingsley see this. Although not a pleasant answer. stackoverflow.com/questions/37112218/css3-100vh-not-constant-in-mobile-browser

  • @jasper2virtual
    @jasper2virtual5 жыл бұрын

    I have a page, the content will be scaled up or down depends on screen width, by transform:scale . Can it re-coded by vh vw?

  • @alikhalil2863
    @alikhalil28635 жыл бұрын

    thank you a lot

  • @gromett
    @gromett4 жыл бұрын

    Thank you :)

  • @akanmuoluwaseyi5187
    @akanmuoluwaseyi51872 ай бұрын

    This is so amazing... thank you madam, Jesus bless you real.

  • @curiousme7796
    @curiousme77964 жыл бұрын

    hello there, great tip i am sure as i am not a web designer but trying to use divi themes to create one now, can we use viewport values in wordpress sites, would it be possible to see some visual examples how and where to feed these values, though it maybe is too much to ask but it will definitely help a great deal as i am breaking my head as hoe to set big images for all devices :)

  • @dddsde3039
    @dddsde30392 жыл бұрын

    how did you do it can you share with me , thank you

  • @geralddarkobekoe
    @geralddarkobekoe5 жыл бұрын

    That was helpful

  • @joseflores-cx5ld
    @joseflores-cx5ld4 жыл бұрын

    muy buen contenido sobre todo header { display: flex; height: 100vh;}

  • @KhanKhan-ym4mo
    @KhanKhan-ym4mo2 жыл бұрын

    vw includes scroll bar width, shouldn't we prefer % instead?

  • @Shacharzadik
    @Shacharzadik6 жыл бұрын

    ?Great video! What's the difference between using 100vh against using percentage-based sizing - 100%

  • @survivelikehoneybadger

    @survivelikehoneybadger

    6 жыл бұрын

    Shachar Zadik I think it's the height - if you set the height to 100% - it will fill all your page, but viewport takes up the size of the viewport. I think the width makes no difference if it's percents or these unita

  • @survivelikehoneybadger

    @survivelikehoneybadger

    6 жыл бұрын

    kzread.info/dash/bejne/YniWraynqNunccY.html here it's also good explained

  • @PaulSebastianM

    @PaulSebastianM

    5 жыл бұрын

    Well, first off I think, % relate to the parent container if I'm not mistaken, while v* units always relate to the viewport size, ie. browser, screen, etc.

  • @Sdirimohamedsalah
    @Sdirimohamedsalah3 жыл бұрын

    port mean real screen size? (physical size) ?

  • @normanvasquez5968
    @normanvasquez59685 жыл бұрын

    What about in mobile devices, I want divs to have the size of the whole viewport, but is not working. Worst of all, the problem is different for each browser.

  • @EvgenichTalagaev
    @EvgenichTalagaev2 жыл бұрын

    Спасибо, практически ничего не понял, но было интересно.

  • @shivamathiya8384
    @shivamathiya83846 жыл бұрын

    Which one is better viewport units or fr units in grid

  • @LayoutLand

    @LayoutLand

    6 жыл бұрын

    It depends on what kind of result you want, what kind of content you have. Did you see the video on FR units? I recommend watching that next if you haven't. There's actually a 3-part series on the different kinds of units you can use.

  • 5 жыл бұрын

    I dislike viewport units because they effectively turn off zooming in browser. As someone who uses page zoom a lot on desktop (I am quite myopic), it bothers me a lot when I see a page poorly designed with viewport units. I've decided not to use them, but if you do, I suggest caution.

  • @abhay2192
    @abhay21922 жыл бұрын

    👍😁

  • @Clawzoftime
    @Clawzoftime5 жыл бұрын

    I am the silent fan

  • @eggy794
    @eggy7946 жыл бұрын

    Viewport units are not reliable on mobile devices, which means we can't use them in real life apps and websites.

  • @gentlemanfinn86

    @gentlemanfinn86

    6 жыл бұрын

    Marcin Cichocki Interesting. I had to look it up and found this stackoverflow which has a ton of information on the subject. stackoverflow.com/questions/37112218/css3-100vh-not-constant-in-mobile-browser

  • @kjellruben

    @kjellruben

    5 жыл бұрын

    You can easily change from VH or VW to px going to pads and phones. But I see your point. :)

Келесі