upvote
> Your premise that the browser implementation is faster and better is rarely true.

I know that they’ve optimised this as much as they can, but it still seems to catch pretty much everybody by surprise that every single instance of a web component with a shadow DOM needs the site’s CSS reset added to it individually (or just skip it and keep forgetting that things like box-sizing will be inconsistent with your non-shadow-DOM styles). There’s no way to say “here’s my default styles” that will work consistently across the whole page once you start using web components. And then you have the !important fights between the web component and its contents as well.

Even though it’s been standard practice amongst web developers for 15+ years, the people working on the web platform seem to mostly act like CSS resets aren’t a thing.

reply
The tension is between two kinds of CSS users. The ones who want cascading style sheets, and the ones who want scoped style sheets. And sometimes even people who think they want scope find out they also want the cascade, and just wanted to scope a bit "at the end" (something the cascade can do anyway)
reply
Scoping now is much easier with CSS Modules
reply
You can also literally scope things between X and Y now (with @scope)
reply
I find that developers add a CSS reset without thinking about it as if there is always a need. We never used resets. There was never a need. Typically we would set something according to the design anyway and starting with a reset was like slamming something against one wall only to throw it back to a different wall later.
reply
They were a lot more necessary when each browser threw in fairly random sets of default styling. These days they've converged heavily on the same defaults.
reply
Surely you must reset something? At the very least box-sizing
reply
The box-sizing property is another way of calculating element sizes but not the default way or the only way. Those of us who were adept at calculating the area sizes after years of doing so had no need for it. Those who are new to the game or can't figure it out use box-sizing.

And don't call me Shirley

reply
The history here, as I understand it, was that they imagined you would use custom elements from multiple third parties, so any shared CSS definitions would cause breakages.

See eg the (now removed) HTML imports standard.

reply
[flagged]
reply
fwiw, your comment would almost certainly have positive karma if you had left off the final paragraph. Asking for sources is popular here. Grousing about how you're oppressed by the dumb voters on the site is not.
reply
[flagged]
reply
I saw the final paragraph when your comment was minutes old and wasn’t downvoted. I downvoted it for the final paragraph.
reply
[flagged]
reply
You are not going to get downvoted for not complaining about downvotes.

Please familiarise yourself with the guidelines for participating here:

https://news.ycombinator.com/newsguidelines.html

reply
[flagged]
reply
Native date pickers can’t handle range. So then you need two date pickers with validation logic.

That’s just one example of the native implementation lacking common utility. That’s one thing they could mean when they say the native solution is lacking.

reply
I noticed your comment was down voted quite a bit, so I up voted it. It is not really performance related, but it does make an excellent technical point.
reply
You’re concentrating on quantitative “better” with performance.

Qualitative “better” is frequently what design and front end people are concerned with.

If the solution to date range pickers is two individual pickers tied together with validation logic, most people will call that qualitatively worse from a ux perspective and probably code wise too. If I have to run a bunch of code to get the native element to do standard things, then why not just use a better propietary thing anyway. A date picker taking an extra 1.3ms to render on click is fine if it gets me a bunch of functionality that is not possible with the native version.

In other words, you seem to be defining “better” way too narrowly. Raw performance is one metric amongst many.

reply
I try to avoid words like better, because they don't have an agreed upon definition. The most important thing about performance is the second order effects. For example the fastest test automation can only be as fast as the application it tests.

Another important quality about performance engineering is that it exposes, from deeper investigations, other unrelated technical problems that were otherwise not evident.

Perhaps the most important benefit of performance engineering is that faster software is capable of supporting features and experiments that slower software cannot.

So, its not that performance analysis is necessarily better than something else. Its important for its own sake to improve software quality generally. Of course, the very first step in any of this is measuring things with numbers and comparing those numbers. It is astonishing how many people in software cannot do this and become hostile to defend themselves against it.

reply
You can see how other people’s comments are voted? I can only see my own.
reply
You cannot see positive votes of other peoples' comments, but the text lightens with each grade below 1 karma.
reply
Thanks. I’ve spent too much time on this site to not have known how that works. Until now I never noticed there are multiple levels of greyed out posts.
reply
What would you expect a designer to measure when making an aesthetic judgement?
reply
> Your premise that the browser implementation is faster and better is rarely true

Thankfully, this opinion is measurably false just by reviewing source code of any website. What you're referring to, primarily, are categories of elements like form elements like <datalist> and that's fair.

This is why the web community is asked to support improving the platform through submissions to Interop, such as this one for <datalist>

https://github.com/web-platform-tests/interop/issues/1402

reply