I smell a <chaos-ul> custom element
browsers should shuffle the list items on every reload to enforce this.
Zach Leatherman 3636 replies 3030 likes Original on Bluesky36 replies
-
TIL! (awesome, thank you!)
-
-
We have a number of components in our library that "autoslot." They look at the "shape" of the light DOM and, where it conforms, will generate a template AND assign slot names. That works well for things like input wrappers (label, help, etc), lists, and description lists.
The idea is that, like other composite components like select/option, or details/summary, you shouldn't have to provide slot attributes when the meaning of the lightDOM content is conformant and contextually clear.
-
why do I know @zachleat.com has dropped everything to start building <regrettably-ul> already
what is life but an <ul> of priorities 😈
.childNodes creates way too many <slot> elements.
Multiple <slot> can be used
But ONE unnamed <slot> can be enough,
.assign (can process a NodeList) sets the order.But sorting is maybe not the best example for manual slot-assignment;
I keep lightDOM sort in lightDOM (2nd screenshot)-
-
Its a choice to put every fork in its own drawer/slot WITHOUT a label
Maybe a tile based border-less boardgame?
Not chess, because you want <slot> NAMED A1-H8
Could Carcassonne be a good example? Dominos?Performance wise its (just) DOM;
1000 (list)items need 1000 <slots> 999 not really requiredCarcassonne is easier with a rotating fixed size square layout in a CSS grid, where rows and columns are added Top-Bottom-Left-Right
Dominos probably requires masonry (not supported in a browser yet)
Maybe next weeks team Web Component challenge; we did Ludo once; all NAMED slots and CSS grid-area
-
-
<untruthf-ul>
maybe <deceitf-ul>*incredible work here*
Or.. <actu-ul>? Because now it’s actually unordered?
Ha! A <tr-ul-y> unordered list. I like it
the double u-u has a lovely ghostbusters quality to it
There is no <data> only <zu-ul>
definitely DOES NOT WORK but
Works on my machine :)
hey, whaddaya know!
also TIL about `order`
Now, let's ship a Mac with Safari Technology Preview as default browser to every Internet user in the planet... What could it cost, $10?
Great, now you just made me want sample-without-replacement in CSS...
@tabatkins.com help!
Just use a large enough range, you'll be unlikely to get collisions. Basically the same thing.
order: random(1, max(Infinity));
...except Infinity doesn't work in this case :(
Just put in a big number!
I will put in a number that represents how high I can count, which is at least two digits
Look at Mr. Big Brain showoff, can count to two digits!
Rookie level – my kids taught me how to count to 7 digits in less than a minute:
one, two, three, four, five, six, seven, eight, nine, ten, twenty, thirty, …, eight-hundred thousand, nine-hundred thousand, one million
It’s the same digit twice, isn’t it.
…maybe
Chaos List is the name of my new band