Advertisement · 728 × 90
#
Hashtag
#WebComponents
Advertisement · 728 × 90
Original post on mastodon.social

Do I know any @developers devs that work close to #css that I could nerdsnipe into figuring out how chromium could catch up to webkit in so far as a `:host(:has(~ ul li)) {}` selector?

See it in action, here: https://codepen.io/Westbrook/pen/EayLZow

Checkout the #CSSWG convo, here […]

3 0 3 0
window.customElements.define("test-a", class extends HTMLElement {
  static disabledFeatures = ["shadow"];
  shadow = this.attachShadow({ mode: "open" });
});

document.createElement("test-a"); // Error: attachShadow is disabled

window.customElements.define("test-b", class extends HTMLElement {
  static disabledFeatures = ["internals"];
  internals = this.attachInternals();
});

document.createElement("test-b"); // Error: attachInternals is disabled

window.customElements.define("test-a", class extends HTMLElement { static disabledFeatures = ["shadow"]; shadow = this.attachShadow({ mode: "open" }); }); document.createElement("test-a"); // Error: attachShadow is disabled window.customElements.define("test-b", class extends HTMLElement { static disabledFeatures = ["internals"]; internals = this.attachInternals(); }); document.createElement("test-b"); // Error: attachInternals is disabled

Wait, what? There is a way to disable certain web component features via a static class field? Just randomly stumbled upon this in the specs. Can't find much documentation, but it works in Chrome and Firefox at least.

👉 html.spec.whatwg.org/multipage/cu...

#webcomponents #webdev #javascript

2 0 1 1
Preview
Why is Visual Difference Testing still so hard? We have had leaps and bounds in the front end space, but VDT is still stuck at pixel counting in screenshots. Why?

This month’s blog post is brought to you by the letters V-D-T. If you read through my rant and have any solutions to these problems please let me know!! VDT is hard!

michaelwarren.dev/blog/vdt-is-...

#webcomponents

6 3 2 0
Preview
Progressive Web Components Introducing Elena, a simple, tiny library for building Progressive Web Components. Unlike most web component libraries, Elena doesn’t force JavaScript for everything. You can load HTML and CSS first,…

“This is how I ended up creating Elena, a library that I’m open sourcing today. Elena starts from HTML and CSS, and stays grounded in web standards and what the web platform natively provides.”

arielsalminen.com/2026/progres... #WebComponents #OpenSource #Elena #DesignSystems #resources

34 9 1 0
Preview
Elena | Progressive Web Components Elena is a simple, tiny library for building Progressive Web Components.

#Development #Launches
Elena · A tiny library for building progressive web components ilo.im/169a4a by Ariel Salminen

_____
#OpenSource #WebComponents #DesignSystems #Frameworks #ProgressiveEnhancement #WebDev #Frontend #HTML #CSS #JavaScript

3 0 0 0
Preview
Elena | Progressive Web Components Elena is a simple, tiny library for building Progressive Web Components.

I have been following this PWA-focused project and its ready for production. Elena - https://elenajs.com/
Ariel Saliminen explains its Progressive Web Components. arielsalminen.com/20... #elena #webComponents

0 0 0 0
<!-- In a blocking script (= ASAP), load CSS that will be used by the page
     AND web components as module scripts. Define a web component base
     class that adds the style sheet to shadow roots and ALSO add the style
     sheet to the document -->
<script>
  {
    // Start module request. Yes, this works in a non-module script
    const styles = import("./bootstrap.min.css", { with: { type: "css" } });

    // Add style sheet to the document
    styles.then((sheet) => document.adoptedStyleSheets.push(sheet.default));

    // Define a base class for web components that also use the stylesheet
    window.BaseClass = class extends HTMLElement {
      constructor() {
        super();
        this._shadow = this.attachShadow({ mode: "open" });
        // Adopt sheet in shadow DOM. The style sheet object is shared
        // between components and the document
        styles.then((sheet) =>
          this._shadow.adoptedStyleSheets.push(sheet.default),
        );
      }
    };
  }
</script>

<!-- Load component(s) as a plain old modules -->
<script type="module" src="./component.js"></script>

<!-- In a blocking script (= ASAP), load CSS that will be used by the page AND web components as module scripts. Define a web component base class that adds the style sheet to shadow roots and ALSO add the style sheet to the document --> <script> { // Start module request. Yes, this works in a non-module script const styles = import("./bootstrap.min.css", { with: { type: "css" } }); // Add style sheet to the document styles.then((sheet) => document.adoptedStyleSheets.push(sheet.default)); // Define a base class for web components that also use the stylesheet window.BaseClass = class extends HTMLElement { constructor() { super(); this._shadow = this.attachShadow({ mode: "open" }); // Adopt sheet in shadow DOM. The style sheet object is shared // between components and the document styles.then((sheet) => this._shadow.adoptedStyleSheets.push(sheet.default), ); } }; } </script> <!-- Load component(s) as a plain old modules --> <script type="module" src="./component.js"></script>

If we want to share stylesheets between the document and components and we have CSS modules, is there any reason to use <link rel="stylesheet">? Loading CSS modules a blocking script in <head> (+ sharing it between shadow roots and the document) should be plenty fast, right?

#webdev #WebComponents

1 1 1 0
Preview
How Declarative Custom Elements (DCE) Could Improve Web Components Declarative Custom Elements promise to revolutionize web components by eliminating JavaScript requirements, solving FOUC issues, and improving SSR.

When I was at Microsoft, we were trying to find ways around some of the pain points of #WebComponents, so I did an exploration on what Declarative Custom Elements could potentially provide us.

#html #css #javascript
dev.to/stuffbreaker...

31 9 5 1

@davatron5000.bsky.social: "Burton Smith still uses Dev.to for his personal blog".

#webdev #webcomponents #designsystems

3 0 2 0
Preview
Container Timing: measuring web components performance An introduction to Container Timing, a new web performance API that lets developers measure when complex components finish painting and shows how to use its native implementation now available behind...

#Development #Introductions
Container Timing · A new API to measure web component performance ilo.im/16bf65 by José Dapena Paz

_____
#Metrics #Measurement #WebComponents #APIs #Polyfill #Chromium #Browsers #WebPerf #WebDev #Frontend

0 0 0 0
Preview
Form-Associated Custom Elements in Practice When you make a Web Component for a form element, you've got a bit of extra work to do to make sure they participate on the form in expected ways.

Form-Associated Custom Elements in Practice, by @frontendmasters.com:

frontendmasters.com/blog/form-associated-cus...

#webcomponents #forms #javascript

0 0 0 0
Container Timing: measuring web components performance An introduction to Container Timing, a new web performance API that lets developers measure when complex components finish painting and shows how to use its native implementation now available behind a Chromium feature flag.

Container Timing: Measuring Web Components Performance, by @jdapena@mastodon.online (@igalia@floss.social):

blogs.igalia.com/dape/2026/02/10/containe...

#performance #webcomponents #chromium

0 0 0 0
Preview
My favorite way to write code in 2026 (on becoming a TDD addict) I’ve hated writing JavaScript tests for pretty my whole career. That thing where you plan a component, write some code, iterate it a whole bunch until it works the way you want… and then write tests...

#Development #Approaches
My favorite way to write code in 2026 · Test-driven development using Playwright ilo.im/16b947 by Chris Ferdinandi

_____
#Programming #Testing #Coding #WebComponents #Playwright #WebDev #Frontend #JavaScript #HTML #JavaScript

1 0 0 0
Preview
Bunny Stream Introduces New Video Player | Ahoi.dev Bunny.net has just announced the general availability of the new Bunny Stream Video Player, which has been developed using Web Components and Media Chrome.

Bunny Stream introduces new Video Player 👉 aho.is/e29e123c #MediaChrome #WebComponents

0 0 0 0

Aun flipando con la mejora de rendimiento de #federadeck como app #android solo con el cambio a #webcomponents, y eso que aun no he optimizado todo (que he tirado de asistencia con IA, así que me dará un yuyu cuando vea el código seguro)

0 0 0 0
Preview
Web Components: The "Missing Link" for Native Form Integration How I brought first-class Form support to AgnosticUI using ElementInternals

Web Components: The "Missing Link" for Native Form Integration I recently realized that my Web Components in AgnosticUI were missing native form integration. Without Form-Associated Custom ...

#webcomponents #frontend #designsystems

Origin | Interest | Match

1 0 0 0
Preview
Form-Associated Custom Elements in Practice When you make a Web Component for a form element, you've got a bit of extra work to do to make sure they participate on the form in expected ways.

My new guide on @FrontendMasters shows you how to use FACE and ElementInternals to make your Web Components work natively with HTML forms.

Featuring implementation notes from the AgnosticUI trenches.

Check it out:
frontendmasters.com/blog/form-as...

#WebComponents #BuildInPublic

5 0 0 1
Preview
Make custom elements behave with scoped registries  |  Blog  |  Chrome for Developers You can now encapsulate custom elements.

#Development #Introductions
Scoped registries for custom elements · How independent scopes resolve name clashes ilo.im/16b8np by Jayson Chen and Patrick Brosset

_____
#Registries #WebComponents #Chrome #Edge #Browser #WebDev #Frontend #HTML #JavaScript

0 0 0 0
Code Screenshot of the Source Dataset Pattern for custom invoker commands: 
html-code: 

<button commandfor="my-snap"
command="--download" data-filename="my-image" data-format="jpeg">
Download Snapshot as JPEG
</button>

Code Screenshot of the Source Dataset Pattern for custom invoker commands: html-code: <button commandfor="my-snap" command="--download" data-filename="my-image" data-format="jpeg"> Download Snapshot as JPEG </button>

#webcomponents and #invokerCommands are a match made in heaven. With the CommandEvents source property you can easily access the dataset or any other attribute of the element that invoked the command.

1 0 0 0
Preview
How I added Bluesky likes to my Astro blog Learn how I added Bluesky likes and avatars to my Astro blog using the bluesky-likes web components package. No API keys, no server-side code, just a few lines of Astro magic.

New blog post! I added Bluesky likes and liker avatars to my #Astro blog. No API keys, no server-side code, just pure delightful #webcomponents.

Here's how I went from "I want that" to "it's live" in about an hour:

loige.co/how-i-added-...

14 3 2 0

▷ ag context doesn't clobber your work

Generates AI context but only touches the AgnosticUI section. Everything else stays. HTML sentinel markers mean re‑runs = updates, not overwrites.

Run once. Run daily. Run safely.

www.agnosticui.com

#webdev #ui #webcomponents #css

2 0 0 0

Any #11ty people out there or #webcomponents people out there that have run into weird livereload issues when you're running 11ty on local dev server?

I'm wondering is morphdom is confusing the web component instances? @zachleat.com?

0 1 2 0

Great episode. Can’t wait to start using #WebComponents in some MCP projects I’m curious about.

0 0 0 0
Preview
Zed — Pricing All options include fast performance, multiplayer collaboration, and weekly releases that level up how you build.

別の個人サイト(バンドのサイト)をつくる準備として、 #WebComponents を静的な HTML にビルドする SSR 環境をZed の Pro プランの試用ついでにつくってみたら、結構自分が欲しいものができた :tony_neutral:

https://zed.dev/pricing

0 0 1 0
Preview
Web Components: The Framework-Free Renaissance Modern browsers now support everything needed to build sophisticated, reactive web interfaces without React, Vue, or Angular. Web components, custom elements, shadow DOM, and native event systems l...

www.caimito.net/en/blog/2026/02/17/web-c... #webdev #webcomponents

0 0 0 0
Snippets of (by itself not really useful) JS code that illustrate the main message without much benefit.

Snippets of (by itself not really useful) JS code that illustrate the main message without much benefit.

Somebody on LinkedIn asked for my approach to global CSS in #Webcomponents with Shadow DOM:

1. Import CSS as Strings (via Vite)
2. Shove CSS into the CSSStyleSheet Constructor
3. Add the results to ShadowRoot's adopted stylesheets
4. Delete all of the above once Safari supports CSS module scripts

5 1 1 0
Preview
Isomorphic Web Components | jakelazaroff.com The lack of server-side rendering in web components has become a sort of folk belief that oft goes unquestioned. I am happy to report that the fears are unfounded.

Isomorphic Web Components | jakelazaroff.com

🔖 jakelazaroff.com/words/isomorphic-web-com...
🔗 ellyloel.com/isomorphic-web-component...

#Bookmarks #WebComponents

1 0 0 0
Preview
Repeatable Form Fields Made Simple :: Aaron Gustafson Sometimes you need users to provide multiple instances of the same information—multiple email addresses, phone numbers, team members, or emergency contacts. The form-repeatable web component makes this straightforward, handling field duplication, automatic renumbering, and seamless form submissio…

Repeatable Form Fields Made Simple, by @aaron@front-end.social:

www.aaron-gustafson.com/notebook/repeatable-form...

#forms #html #webcomponents

1 0 0 0
Preview
Reference Target: having your encapsulation and eating it too How reference target allows us to improve accessibility when using shadow DOM

#Development #Proposals
Reference Target · Improving accessibility when using shadow DOM ilo.im/16aixw by Alice Boxhall

_____
#WebComponents #Accessibility #ARIA #Encapsulation #ShadowDOM #Browsers #WebDev #Frontend #HTML #JavaScript

1 0 0 0
Preview
How I Write Custom Elements with lit-html You can use a smaller part of Lit to build web web components that still take advantage of some of it's best features, particularly if you're cool with Light DOM.

President of #webcomponents logging on to share a couple good posts from over on the @frontendmasters.com blog... Here we go...

33 3 2 0