Hacker News new | ask | show | jobs
by admax88q 1836 days ago
If the browser would make the semantic elements actually look good out of the box a lot of developers would use them by default.
7 comments

If people could agree on what "look good" means, I don't think it'd be impossible to get the major browsers to update default styles. But every site seems to have a different idea of the look they want.

I'd be curious to see a somewhat-objective look at what's actually wrong with default browser styles, separating out well-established usability and design considerations from personal preferences and branding preferences. I wouldn't be at all surprised if there are near-universal things wrong with the default styles, and those might be possible to change if they can be separated out.

Based on my experience as a web developer working with many designers over some 20 years of design trends, here’s the problem:

Default styles aren’t pretty.

That’s it. They’re superior in every other way. You always know what to click, you always know what an element will do, how it behaves, the UX is consistent with your OS, etc. Default elements are fantastic.

> the UX is consistent with your OS

Buttons in Chrome on macOS look completely different than in native apps. Buttons and context menu in Chrome's native <video> controls look yet again different, following Material Design. From the things one could argue are good about native browser styles "consistency with the OS" is definitely not one of them.

Not datepickers. The datepicker element is garbage.
Too true
Who cares about looking good, when we’re talking about working good?

Of course, it’s worth putting the effort in to both looking good and working good, but if we’re going to pick one, we should go for the second.

I think that is a false dichotomy.
If we're a business then looking good and mostly working ok probably sells better than working good and mostly looking ok.
I feel like this is only true in cases where either your product is your appearance or it's highly unlikely the thing you're selling can be returned.
It would be equal effort to restyle something done with ARIA compared to a semantic element, yes?
Depends on the element, the select and input elements are notoriously difficult to style, which is why people often remake them with divs and JS.

Combo boxes are a fucking nightmare to style, as are checkboxes and radios. Buttons arnt as bad, but you still spend a lot of time fighting against browser defaults which differ across browsers.

Isn't that an extremely moving target? What looks good is very subject to changes of fashion.

Your comment below about being difficult to style is more to the point.

A div looks like nothing by default. It’s probably about the same amount of effort to make a button look good.
You can reset your css
For some elements, yes. Many others have certain attributes that are completely unstylable, a lot of browser-specific attributes and selectors (not just prefixed attributes but also whole pseudoclasses), or both.
Unfortunately, Firefox recently actually stopped making semantic elements look native (=good).