But to address the point. There may be base instincts to which we are all subject. But that doesn't mean we should embrace them or proudly wear them as a badge. Violence is entirely natural. And yet most will agree it should not be embraced. Someone proudly declaring themselves as violent will (and should!) be judged harshly. I say the same holds true for racism, whether it is "natural" or not.
Much (all?) of civilisational progress is characterised by moving away from the natural state to a higher strata. The civil part of civilization is entirely unnatural
What's silly about it? I am neither unnatural nor supernatural, and my nature is who I am.
>But that doesn't mean we should embrace them or proudly wear them as a badge.
Maybe. But it also means that I shouldn't be ashamed of them or try to suppress myself into neuroticism. And since the left has made a point of that for decades now, has tried to bully people into doing just that, the pendulum was primed to swing the other way. So yeh, I think I will be proud. It feels good.
>Violence is entirely natural.
It is, but also something to be avoided unless there is no other reasonable option. I would recommend not trying to drive an SUV over the top of me. That's caused some strife recently. I can remain nonviolent indefinitely.
Apologies I shouldn't have said "silly", that's too charged. More I don't think it's a good argument or justification. I think the rest of my comment outlines, along with counterexamples, why I think that.
Making this some left-right polemic has made me not want to continue this conversation further
Yeah this is one conspiracy I believe. There's this narrative at the moment that the UK is some dystopian hellhole where you'll get arrested for basically anything you post online. It's very pervasive to the point that fairly normal American people I follow online have repeated such things.
Now, the UK has plenty of problems, I do not deny that. But the situation is nothing like it is presented online.
My thinking is that this is meant to make people in the US feel that the rising authoritarianism isn't so bad in relative terms "well the UK is far worse!".
Funnily, I felt the opposite when I learnt to read music a few years back - that even though I was extremely slow, I could now (theoretically) read and learn to play any music, just slowly! You'll get faster and better with practice, as with everything. I'm still slow. Just not as slow. But crucially I'm fast enough that it's not the bottleneck anymore, getting the notes under my fingers is.
The major downside of using light DOM is that elements cannot compose neatly since there's no delineating between what the component itself rendered and child content.
When you need to re-render your component, how does the component know not to replace the child content you rendered, Vs the child content it rendered into the light DOM. That's why the shadow DOM and slots were necessary, because then there's no intermingling of your content Vs the component's
This may not be a problem if you don't intend to compose your components. But if you do you will hit limits quickly
What makes custom elements good is inrerop. I can use them in react, Vue, angular, svelte, solid, or just plain ol' server rendered html. I can switch out the internals entirely for a WC lib, or not, with nobody knowing or caring.
This is a unique advantage to WCs. And it's such a compelling advantage that it makes almost all the downsides tolerable. At least if you are in a position where your component might be used in many places. Design Systems are a good example. The consumer can be any app, built on any technology.
And there are plenty of downsides. But they are mostly felt by the author, not the consumer. Similar to how TS libs can be very complex to author because of type level gymnastics, but when done right are easy to consume.
(I do not push them heavily, but I can appreciate strengths and weaknesses of all tools)
They don't need to be leaf components to still have this strength. I've worked with design systems which have a <my-layout> component near the root which defines sidebar, header etc slots. This still works nicely with react, Vue etc
But I agree they tend to be better suited as "leafier" components
Honestly I couldn't care less what the original proposal said! Things evolve. Utility is found in unforeseen places. That's the nature of ~everything. Personally I'm not a fan of that kind of component but not aligning with some original, preordained vision is a minor nit
Not even sure what argument you're making here. A web component bundles one or more of: markup, styles, functionality. You can't do that with just html such that it's easily consumable in all the ways I mentioned.
One drawback of details was that cmd+f search wouldn't play nicely when the details was closed. But now there's a hidden="until-found" you can put on child content, along with an associated event. So you can open the details when a user searches :) super useful
You don't need the hidden="until-found" for details/summary, because that has those semantics automatically, but you can use that for other elements that behave similarly (for example tabs, which can't quite correctly be implemented with details/summary, and so needs to be done by hand).
Also I think the event isn't currently emitted consistently on all browsers (and maybe not at all for hidden="until-found"?) so unfortunately you can't quite rely on that yet if you need to sink some JavaScript state to your html. But in general, yeah, this is a really cool feature.
Yeah, support was patchy until recently (and I think that behaviour might not even have been standardised?) so I think a lot of people have assumed that if you want that functionality you need to do something extra.
Yes, Google started revealing the contents of <details> a few years ago, long after the element was supported in all browsers. Firefox added support earlier this year and Safari just added it.
Supporting the behavior was related to changing the user agent CSS when they're closed and the other browsers implemented it and hidden=until-found at the same time.
You need some JS to change an attribute as much as you need JS to change a property. What am I missing?
I hope the command attribute (https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...) will eventually support this out of the box. In the meanwhile you can write a single custom --toggle command which is generic and works with any toggleable element
But to address the point. There may be base instincts to which we are all subject. But that doesn't mean we should embrace them or proudly wear them as a badge. Violence is entirely natural. And yet most will agree it should not be embraced. Someone proudly declaring themselves as violent will (and should!) be judged harshly. I say the same holds true for racism, whether it is "natural" or not.
Much (all?) of civilisational progress is characterised by moving away from the natural state to a higher strata. The civil part of civilization is entirely unnatural
reply