Elements 2.4.0, the library, is out with a bunch of new elements, including a preview of `<pf-table>`:

github.com/patternfly/patternf

#patternfly #WebComponents

Last updated 2 years ago

Unsuspecting users may come to believe that break react, but the truth is - as usual - exactly the opposite. Despite the superficial similarity to , react's JSX language breaks the web platform's powerful native slot element. (bennypowers.dev/posts/another-)

#react #WebComponents #HTML

Last updated 2 years ago

Like ? Like ? Like making the latter with the former? Have I got a quick band-aid of a for you!

bennypowers.dev/posts/webc-dsd

#11ty #WebComponents #hack

Last updated 2 years ago

After almost a year of discussions, Apple confirms what we already knew: there will be no customized built-ins

github.com/WebKit/standards-po

#HTML #WebComponents #specification #DOM #whatwg

Last updated 2 years ago

Tane Piper · @tanepiper
1112 followers · 3655 posts · Server tane.codes
Tane Piper · @tanepiper
968 followers · 3058 posts · Server tane.codes

I've officially released my first on - Formula - npmjs.com/package/@webhelpers/

It works with any static HTML5 form and turns into a Reactive Form, all you need to do is wrap the form in `<formula-form>` and it starts working - Demo here stackblitz.com/edit/vitejs-vit

#webcomponent #npm #WebComponents #webdev #html #reactiveforms

Last updated 2 years ago

(explain to me like I'm 5-years-old) what are and how they're different from -heavy (bennypowers.dev/posts/eli5-web)

#eli5 #WebComponents #JavaScript #frameworks

Last updated 2 years ago

I wrote about my first impression of the new framework for and other

Learn about the advantages of WebC, and consider some of the questions that came up for me while learning to use it for the first time. Are webc and the same thing? If not, how do they differ? When would you use WebC? When might you not?

Read about it on my -powered, webc-authored site:

bennypowers.dev/posts/webc-imp

#webc #11ty #staticsitegenerators #WebComponents #eleventy

Last updated 2 years ago

Nathan Knowler · @knowler
154 followers · 647 posts · Server sunny.garden

Yesterday, I realized that one major downside to custom built-in components is that they are not polymorphic. For example, if I were making a web component that implemented the switch pattern, I’d have to make one for using with a button and another one for a checkbox.

#WebComponents

Last updated 2 years ago

Nathan Knowler · @knowler
148 followers · 570 posts · Server sunny.garden

Today I learned you can’t use `attachInternals()` with customized built-in elements.

#WebComponents

Last updated 2 years ago

Nathan Knowler · @knowler
145 followers · 483 posts · Server sunny.garden

Potentially terrible idea: slot a template for a component to use as a structure inside of the component.

#WebComponents

Last updated 2 years ago

Nathan Knowler · @knowler
145 followers · 474 posts · Server sunny.garden

It would be nice to make my own `HTMLCollection`s for .

#WebComponents

Last updated 2 years ago

Nathan Knowler · @knowler
142 followers · 452 posts · Server sunny.garden

Potentially terrible idea: nesting the unnamed slot inside of a named slot.

(Declarative Shadow DOM used for illustration)
```html
<my-element>
<template shadowrootmode="open">
<slot name="with-button"><button part=“button”><slot>I am a button</slot></button></slot>
</template>
<button slot="with-button">I am a slotted button</button>
</my-element>
```

#WebComponents

Last updated 3 years ago

Nathan Knowler · @knowler
132 followers · 280 posts · Server sunny.garden

I haven’t dug into any specs so I’m not entirely sure what the expected behaviour should be, but setting the `@keyframes` in the outer context seems to be the quickest solution to get them working for `::slotted()`. This is problematic though because shouldn’t create side effects like that, since that could override `@keyframes` set by the document author.

[2/n]

#WebComponents

Last updated 3 years ago

Nathan Knowler · @knowler
131 followers · 272 posts · Server sunny.garden

There is inconsistency between browsers with `@keyframes` in the Shadow DOM. I’m trying to figure out a non-harmful way of reconciling it until it gets sorted out.

In Chrome and Firefox, `::slotted()` cannot use `@keyframes` defined inside of the shadow tree, but it can them defined outside of the shadow tree.

In Safari, `::slotted()` can use `@keyframes` defined inside of the shadow tree, but cannot use them defined outside of the shadow tree.

[1/n]

#WebComponents

Last updated 3 years ago