gitmyhub

webcomponents

HTML ★ 4.5k updated 6mo ago

Web Components specifications

The coordination hub and issue tracker for the W3C Web Components standards (Shadow DOM, Custom Elements, HTML Templates, CSS Scoping), which let developers create reusable, framework-independent HTML elements with encapsulated styles and behavior.

HTMLJavaScriptCSSWeb Standardssetup: easycomplexity 2/5

Web Components is a set of browser standards that lets developers create their own reusable HTML elements, complete with their own behavior and styling, and use them in web pages the same way built-in elements like a button or video tag work. The goal is to give developers a native, framework-independent way to build isolated, self-contained components.

This repository is maintained by the W3C (the organization that sets web standards) and WICG (the Web Incubator Community Group, which develops early-stage web platform proposals). It serves as the coordination point and issue tracker for the Web Components family of specifications. The README explains that the individual pieces of Web Components have each been moved to their permanent homes in other standards documents as they matured.

The four main pieces are: Shadow DOM, which lets an element carry its own private document tree with styles that don't leak in or out; Custom Elements, which lets developers define their own HTML tags with JavaScript behavior attached; HTML Templates, which provides a way to declare inert HTML markup that can be cloned and inserted at any time; and CSS Scoping and Shadow Parts, which are the CSS features that let you style inside a shadow tree from outside.

A fifth area, HTML Modules, is still being developed. It would allow HTML markup to be imported and reused the same way JavaScript modules work today. One earlier proposal, HTML Imports, was fully abandoned and is listed in the README under abandoned features.

This repository no longer contains the active specification text for most of these features. The README directs contributors to file issues against the specific standards repositories (DOM, HTML, or CSS working group) rather than here, since each spec now lives elsewhere.

Where it fits