Where do Browser Styles Come From?

Поделиться
HTML-код
  • Опубликовано: 27 янв 2025
  • Not sure where that default 8px of margin on the body comes from? Here's how to find out!
    Every browser provides a User Agent (UA) Stylesheet to give HTML elements their natural shape, and make our sites more readable by default. When we start a project with a reset or normalization stylesheet, it's the UA styles that we are re-setting or normalizing. But how can we see these UA styles? Miriam Suzanne will show you how to find them online, inside Firefox itself, or even in developer tools as we debug our site styles.
    Firefox: resource://gre-resources/html.css or hg.mozilla.org...
    Chrome: chromium.googl...
    Webkit: trac.webkit.or...
    More: meiert.com/en/...
    #css #miriamsuzanne #firefoxdevtools

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

  • @victoralmeida1583
    @victoralmeida1583 5 лет назад +16

    Dear Mozilla staff, thank you so much!! I'm very grateful for all channel videos!!
    I'm studying heavy this entire week getting prepared for job interviews, and have to say I'm enjoying the providential explanations of this channel about web development.
    You guys rock!

  • @dwayne6402
    @dwayne6402 4 года назад +5

    These videos are really helping me to stay engaged with the content on MDN as I go through the CSS tutorial. Great stuff.

  • @kyefang8278
    @kyefang8278 3 года назад

    Wow, this is amazing introduction. Love your presentation style, example of concise articulation. Well done.

  • @cmdaltctr
    @cmdaltctr 4 года назад

    Thank you! I am learning web development, and whilst inspecting a website in Firefox, I didn't see the UA stylesheet until you pointed out how to enable them. :-)

  • @haydennharper7072
    @haydennharper7072 3 года назад

    Thank you for this informative video. And your nails are so fierce. Omg I need a manicure like, pronto!

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

    Thank you , I would like to add that in computed styles tab the propeeties that have no black arrow ( not explicitly set neither by you nor by the browser) are the initial values as documented in CSS Specifications .

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

    Thanks you so much for the content.

  • @janarthkumaresan387
    @janarthkumaresan387 3 года назад

    Very informative! Thank you for the video!

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

    Thanks very much; very useful information.😀

  • @savvasstephanides2210
    @savvasstephanides2210 5 лет назад +3

    I never start styling a webpage without doing this at the very top of CSS page first:
    *{
    margin: 0;
    }
    Also about 10 years ago, IE used to annoyingly add think borders around every image by default, so I used to also add img{border: 0;} at the top of my CSS. Thank goodness they don't do that anymore.
    Great video once again Miriam!

    • @kieranbarker1902
      @kieranbarker1902 5 лет назад +2

      I always add this:
      * {
      box-sizing: border-box;
      }

    • @charles-y2z6c
      @charles-y2z6c 5 лет назад

      A complete reset is best. Take control of 100%

    • @kieranbarker1902
      @kieranbarker1902 5 лет назад

      @@charles-y2z6c I disagree. Why obliterate genuinely useful defaults, only to declare them again in your own stylesheet?

  • @JasheleT
    @JasheleT 3 года назад

    Great info, thanks!

  • @CirTap
    @CirTap 5 лет назад +1

    IE styles are stored as a text resource in one of the dll files in its program folder. Forgot the name. I assume that's also the case for EdgeHTML. Do a string search/grep for "display" or "list-style" and you'll find them.
    I used to dig them up since ie3 until ie6, copy them to a separate text file for comparison, after that nothing really changed in any browser so I no longer bothered. Even when the new HTML5 elementis came to be. By that time the Firebug extension, Opera's Dragonfly and then Devtools gave me the insight I needed as shown here.

  • @warrenski
    @warrenski 5 лет назад +2

    Does anyone know how to toggle user agent styles in Chrome's dev tools? I can't seem to find the setting.

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

    thank you

  • @josemiguelochoa5372
    @josemiguelochoa5372 4 года назад

    Thanks for the content!

  • @mirollacap
    @mirollacap 3 года назад

    Awesome content ;p

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

    Nice website

  • @cmdv42
    @cmdv42 3 года назад

    💯

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

    I'm so surprised that you didn't use Chrome!

  • @juhani6307
    @juhani6307 3 года назад +14

    ywnbaw

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

    Didn't the board fire the entrepreneur who stared Mozilla and originally developed Firefox, because he wasn't "woke"? I can't watch this.

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

    is he a she or he?

  • @usf4886
    @usf4886 3 года назад

    she is very cute

  • @lebionicle8524
    @lebionicle8524 3 года назад +9

    ywnbaw