Cutting Edge CSS: What Took Hours And Lots Of Code Now Takes MINUTES!

Поділитися
Вставка
  • Опубліковано 4 лип 2024
  • Today we explore three exciting new CSS features now available in all browsers that will make our lives so much easier!
    We will cover:
    - CSS Popover API: Learn how to create content overlays, perfect for tooltips and hamburger menus, with no JavaScript needed and only 3 attributes to add.
    - @starting-style: Discover how to add initial styles for elements as they are added to the document, enabling smooth animations.
    - transition-behavior: allow-discrete: Allowing us to finally make animations from display: none to display: block!
    Watch now to see how we combine these features to build a beautiful and accessible hamburger navigation menu.
    LINKS:
    Code and live playground: www.frontend.fyi/v/new-css-fe...
    MORE?
    📈 If you want more content like this, become a Frontend FYI PRO and get access to my current and all future courses for a one-time purchase: fe.fyi/pro
    📺 If you want to see more videos like these, check out my website: fe.fyi/videos
    ✉️ Subscribe to my newsletter: fe.fyi/newsletter
    MY SOCIALS
    🌍 My website - www.frontend.fyi
    🐦 Twitter - / jeroenreumkens
    📸 Instagram - / jeroenreumkens
    💼 Linkedin - / jeroenreumkens
    COLLAB
    Want to work together on creating content? Feel free to reach out via jeroen [at] frontend.fyi
    WHO AM I?
    If you're new to this channel - Hey, my name is Jeroen. A frontend engineer with almost 15 years of professional experience, who in 2023 decided to stop teaching only his close collegeas to start teaching the whole world. What I teach some call Design Engineering, I like to call it the Craft of Frontend.
    TIMESTAMPS:
    00:00 - Intro
    00:42 - Take a look at starting point
    02:10 - Popover Attribute
    04:35 - What this popover does for us
    07:15 - Animating the popover (from display none!)
    08:45 - Adding Allow-Discrete
    09:30 - Adding @ starting-style to finish fade animation
    11:00 - Make our hamburger look nicer, plus many more animations
    16:35 - Outro
    #css #webdevelopment #frontend
  • Наука та технологія

КОМЕНТАРІ • 37

  • @InSaneRoGer112003
    @InSaneRoGer112003 7 днів тому +5

    @starting-style is a game changer wooo thanks for making a vid on this

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

      Thanks for commenting! Glad you liked the video!

  • @soniamaklouf1178
    @soniamaklouf1178 5 годин тому

    Thanks for this video
    could you make a video on CSS trig functions
    I've seen ana tudor doing great things on codepen like her " No SVG, no image, CSS-only fluid slider with input"

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

    I ❤ this channel … thank you so much for sharing and teaching us ✌️

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

      Glad you enjoy it! Thanks for sharing this with me too! ❤️

  • @Mempler
    @Mempler 7 днів тому +2

    It's such a simple but awesome feature. It's always such a pain to implement this in jsx especially if you want animations

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

      I really like it! And that fact that is so new but we can use it everywhere already is even more amazing. I love the direction CSS is heading into!

  • @buildervision7082
    @buildervision7082 6 днів тому +1

    This is so great I've been looking for a developer UA-camr who also teaches accessibility

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

      Nice!! Happy you like my content 🙏 Always feel free to share ideas for topic you’d like to see content of.

  • @mouadt-b8042
    @mouadt-b8042 6 днів тому

    this is just amazing
    thanks bro

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

    Nice!

  • @akinbobolaemmanuel3319
    @akinbobolaemmanuel3319 6 днів тому +2

    What vscode theme are you using? I like the font also. I would like to change mine :)

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

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

    • @akinbobolaemmanuel3319
      @akinbobolaemmanuel3319 5 днів тому +1

      @@frontendfyi thank you 😊💃

  • @MonarchofSouls
    @MonarchofSouls 3 дні тому

    What a great video!

  • @PlayerRPG85
    @PlayerRPG85 4 дні тому

    Liked and subscribed!!!

  • @Tapadar.Monsur
    @Tapadar.Monsur 5 днів тому

    What VSCode theme are you using, Jeroen?

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

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

  • @ThaufiqSirajShaik
    @ThaufiqSirajShaik 5 днів тому

    What theme are you using for vs code?

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

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

  • @bramvandinteren
    @bramvandinteren 5 днів тому

    Ahhhh yesss, eindelijk transitions van display:none naar flex! Neem aan dat dit altijd gebruikt moet worden i.p.v. opacity:0; visibility:hidden toch?

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

      In dit geval combineer je het met bijv opacity 0 om een fade-in te krijgen. Display none en block hebben zelf geen waardes waartussen ze geanimeerd kunnen worden. Dus als je animeert naar display none, zal de browser op het laatste moment de property naar none zetten. Om dan een animatie te zien moet je zelf nog opacity animeren.

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

    Eventually we will get rid of all these UI libraries. Hopefully. Thanks for the great content😊

    • @frontendfyi
      @frontendfyi  5 днів тому +2

      I love the direction css is heading into. Doing these things with plain css definitely is the way! Glad you like the content 😌

  • @meylis_so2
    @meylis_so2 4 дні тому

    bro something lol i found when u write this : popover=" " i didnt an :
    ///
    but i use it anyways cause i can make some error

  • @abhishekkadam2999
    @abhishekkadam2999 5 днів тому

    Is there a difference from the dialog element, other than being pure css.

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

      The specs make a distinction which they call “modal” or”non-modal”. A dialog is a modal pop-up, which means that in order to dismiss that, the user _has_ to make an important choice in the dialog before it can be dismissed.
      The popover is non-dialog, meaning it does not have that restriction. This is also why for example the popover auto closes when you click the backdrop vs a dialog which you need to run a JS method for this to happen.
      There’s a lot of overlap between the two elements and you can definitely create a non modal with a dialog too. But this is what the docs say is their intended behavior.
      See here too: developer.mozilla.org/en-US/docs/Web/API/Popover_API#concepts_and_usage

  • @meylis_so2
    @meylis_so2 4 дні тому

    bro bro make a video about :has() :is() and so on. come on bro u re the best

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

    10/10

  • @feelsthevibes1662
    @feelsthevibes1662 День тому

    Which theme?

    • @frontendfyi
      @frontendfyi  День тому

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

  • @sajadsalamian6953
    @sajadsalamian6953 4 дні тому

    Can somebody name his font????????

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

      The font is called Recursive Mono Casual Static