Hacker News new | ask | show | jobs
by memhole 455 days ago
So things can be styled based on the user agent? Besides the obvious difference between mobile and desktop.
2 comments

That's how <b> tags are made bold etc. There's a css file that's basically loaded before everything else to apply those default styles. Here's WebKit/Safari's for example:

https://github.com/WebKit/WebKit/blob/main/Source/WebCore/cs...

Try turning on user agent styles & user agent shadow dom in your dev tools settings.

Yeah, that's why I thought this was worth writing up as a TIL.
Thanks! I had no idea. I have an issue with a large gap on mobile I should dig into. Maybe this will help me figure out how to fix it. Also just a neat fact to know regardless