How to Support All Browsers with Your CSS

Поделиться
HTML-код
  • Опубликовано: 21 окт 2024
  • Providing browser support for all CSS is crucial to quality frontend web development. In addition to adding autoprefixers (manually or with tooling), you may need to reach for the Supports rule to target specific CSS properties.
    🔗 Key Links 🔗
    CodePen: codepen.io/Cod...
    Autoprefixer: github.com/pos...
    Supports rule docs: developer.mozi...
    ---------------------------------------
    🌐 Connect With Me 🌐
    Website: codinginpublic...
    Blog: chrispenningto...
    Twitter: / cpenned
    Patreon: / coding_in_public

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

  • @neontuts5637
    @neontuts5637 2 года назад +6

    It's a nice CSS feature for cross-browser support. Thanks for sharing Chris 🙏

  • @Yoshomay
    @Yoshomay 2 года назад +2

    backdrop-filter: blur(6px); works on firefox

  • @Infinull-w8d
    @Infinull-w8d 4 месяца назад

    wondering whats your vs code theme.. it got a nice syntax highlighting though.

  • @101stDay
    @101stDay 2 года назад +3

    Thank you, Chris. Fantastic video (as all of them are lol)

  • @liammc1386
    @liammc1386 Год назад

    Dude, I have a problem with the margin-bottom. I happen to have some cards that I give a margin-bottom: 115px; but in safari it doesn't give me that margin, I tried to do what you mention in the video but it doesn't work. @support will this work for margin too?

    • @CodinginPublic
      @CodinginPublic  Год назад

      Hmm…margin is fairly well supported. I'm thinking that's not your problem? Could it be that the margins are collapsing?

  • @simolabide6176
    @simolabide6176 2 года назад

    Thank you bro I really need it 😊😊👍

  • @lokisinary
    @lokisinary Год назад

    I have no idea why my code is working fine in Edge, Firefox, and Safari, but when I run it in Chrome, it doesn't work. Only the homepage is working correctly, but when I go to the dropdown files, they all lack CSS files, and the other links stop working. I also added custom "Next" and "Back" buttons, but they are not working. The only error I can understand is a non-js file, and I have no idea if there are any other errors.

    • @CodinginPublic
      @CodinginPublic  Год назад

      Hmm. Not sure? If you post a link, I can try to take a look if I have time?

    • @lokisinary
      @lokisinary Год назад

      ​@@CodinginPublic "No problem, I've figured it out. The issue was that Chrome uses a different method for linking files compared to other browsers. For instance, while other browsers were able to load the file path using the full path (/project name/css/style.css), in Chrome, I had to use a different format (../../css/style.css) due to the project directory."

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

      Use single dot . before starting url

  • @argylleagen
    @argylleagen Год назад

    Thanks for sharing!

  • @nested9301
    @nested9301 2 года назад

    I'm using vivaldi as my browser how to see if a certain css property is supported on it?

    • @CodinginPublic
      @CodinginPublic  2 года назад +2

      It’s built on the Chromium engine if I remember correctly, so it should support most things that Chrome supports. I don’t think caniuse marks out Vivaldi though since it’s such a small market share.

    • @nested9301
      @nested9301 2 года назад

      @@CodinginPublicoh thank you so much for clarifying . it make sense now!

  • @kuldeepjaswal4655
    @kuldeepjaswal4655 Год назад

    great!

  • @dangerzone-136
    @dangerzone-136 2 года назад +3

    Open this on IE11 and what happened 😇

    • @CodinginPublic
      @CodinginPublic  2 года назад

      😂 😂 😂

    • @chrisdiamantis3017
      @chrisdiamantis3017 2 года назад

      Personally, i run into way more problems with Firefox.

    • @CodinginPublic
      @CodinginPublic  2 года назад +1

      Used to be that Safari was always the problem child for me, but ever since Jen Simmons got there, it’s been advancing so quickly!

  • @satputeabhishek7031
    @satputeabhishek7031 Год назад

    I having the same problem in Firefox 🥲

    • @CodinginPublic
      @CodinginPublic  Год назад

      Did this help?

    • @satputeabhishek7031
      @satputeabhishek7031 Год назад

      @@CodinginPublic no i didn't try this because u see i am having this problem while using tailwind css

    • @CodinginPublic
      @CodinginPublic  Год назад +1

      Hmm. You can add autoprefixer and postcss-preset-env as PostCSS plug-ins. That should handle anything tailwind is using.