Earlier quoted context omitted.
As far as I can tell, the whole web components umbrella came into being because React/Vue got really popular, and the spec/browser people said hey let's bring the core common denominator of those into native HTML/JS, as if it would bring us closer to having native Vue/React. Which of course never happened, partly because HTML is fundamentally incapable of having anything but string attribute values, and partly becaus…
> As far as I can tell, the whole web components umbrella came into being because React/Vue got really popular, and the spec/browser people said hey let's bring the core common denominator First web components proposal is from 2011. First specs are from 2011-2013. React was introduced in 2013 and didn't gain much traction until at least a year later. Vuejs was publicly announced in 2014.
You can make up HTML tags
171–180 of 202 posts
Re: You can make up HTML tags
#172Earlier quoted context omitted.
Good use case for @container, @scope and :has(), where you forgo class definitions and use --custom-properties on the parent scope/container which are inherited downwards based on the existence of a scoped DOM pattern/container query, or 'upwards' by using a :has(child-selector) on the parent. Although be sure to avoid too many :has(:nth-child(n of complex selector)) in case of frequent DOM updates.
[flagged]
Re: You can make up HTML tags
#173Earlier quoted context omitted.
I stand by that Flash was the most fun way to write software, especially games. It was so satisfying being able to animate something, and immediately have the ability to create code out if it. I have not found a platform to replace that, though GameMaker gives something of a facsimile.
Just keep using Flash? It's called Animate now. https://www.adobe.com/products/animate.html
Yes I know about Ruffle, but I don’t really want to make a retro game that targets an emulator, I want something that’s consistently updated.
Also Animates pricing model is bullshit.
Re: You can make up HTML tags
#174Earlier quoted context omitted.
Why would it create confusion? Because you're not familiar with it? Things change..
Because there are so many native elements to keep track of now. If you see an unfamiliar tag that has a reasonably simple name, you simply don't know if it's native or for formatting. That's confusing. It's taking two categories of things and mixing them so you can't tell them apart.
Re: You can make up HTML tags
#175By default, they will behave like spans. You can customize it using the Custom Element API: https://developer.mozilla.org/en-US/docs/Web/API/Web_compone...
I used custom elements extensively in 2014 when support was not as widespread. I think it's a beautiful, elegant solution and I'm still a little bit bitter that React became as big as it was. Now everything "has" to be a SPA because developers want to use React, whereas most users would actually be better served with good 'ol HTML with some custom elements where needed.
Re: You can make up HTML tags
#176I've been doing this for about three or four years. Clever idea, tricky in practice. I don't think I'd recommend this approach broadly. But it works for me. It's definitely possible to take it too far. When most tags in your HTML are custom elements, it creates new readability problems. You can't immediately guess what's inline, what's block, etc. And it's just a lot of overhead for new people to learn. I've arrived…
> And yes, I abuse the slot attribute even when I'm only using CSS, without JS. In CSS, how do you target based on the "hero-blurb" slot? div[slot="hero-blurb"]?
Re: You can make up HTML tags
#177Earlier quoted context omitted.
> As far as I can tell, the whole web components umbrella came into being because React/Vue got really popular, and the spec/browser people said hey let's bring the core common denominator First web components proposal is from 2011. First specs are from 2011-2013. React was introduced in 2013 and didn't gain much traction until at least a year later. Vuejs was publicly announced in 2014.
Right, and that proposal was withdrawn, and a new one, the one we have now, was proposed based on lessons learned from (or inspired by?) React/Vue. Maybe there was a common ancestor or general consensus about the techniques floating around in the community before proposal #1, but it was clearly inferior and flawed, and #2 was the one I'm talking about.
"That proposal" was a talk by Alex Russel in 2011: https://web.archive.org/web/20121119184816/https://fronteers...
Web Components are not a single proposal. Their core originally is three specs:
- Custom Elements
- Shadow DOM
- HTML Templates
Custom Elements v0 was implemented by Google, but the API changed (especially with ES6 classes making their way into all major browsers), and now everyone's on Custom Elements v1. There are very little fundamental changes between the two beyond that.
Shadow DOM is there, is an endless source of bizarre problems that literally no one has, and in the end will need ~30 different specs and changes to the browser to fix those problems (for a sample see https://w3c.github.io/webcomponents-cg/2022.html)
HTML Templates were only implemented in Firefox, and were removed in favor of JavaScript-only HTML Modules which were eventually scrapped in favor of on-off additions to JavaScript imports (see e.g. "CSS Module scripts" https://web.dev/articles/css-module-scripts)
> was proposed based on lessons learned from (or inspired by?) React/Vue.
Lol. The world wishes it were so. There rarely was such an insular group of people developing major web standards as those developing web components. They were hostile to any outside input or influence and listened to no voices, and looked at no implementations but their own.
Re: You can make up HTML tags
#178I've been doing this for about three or four years. Clever idea, tricky in practice. I don't think I'd recommend this approach broadly. But it works for me. It's definitely possible to take it too far. When most tags in your HTML are custom elements, it creates new readability problems. You can't immediately guess what's inline, what's block, etc. And it's just a lot of overhead for new people to learn. I've arrived…
I'm highly interested in approaches that utilize web grain in a balanced practical way. Do you have a framework/toolbelt or example sites to share? Would love to see. If you're interested in my approach to custom elements I created: https://github.com/crisdosaygo/good.html It utlizes custom elements, has autohooks for granular DOM updates, uses native JS template literal syntax for interpolation, imposes ordered comp…
Unfortunately, I don’t have anything public to show at the moment. Maybe I’ll blog about the approach some day.
Re: You can make up HTML tags
#179Re: You can make up HTML tags
#180> > > > Not the best example, because in this case, you could just use real HTML tags instead