Search
A Web Component with Different HTML for Desktop and Mobile
16.1.2020
Christian Schaefer has a great big write-up about dealing with web advertisements. The whole thing is interesting, first documenting all the challenges that ads present, and then presenting modern solutions to each of them.
One code snippet that caught my eye was a simple way to design a component...
lite-youtube-embed
13.12.2019
A standard copy-and-paste YouTube embed lands on your page as an <iframe> which loads a big ol' pile of other stuff to play that video. But the UX of it is still essentially an image and a play button. Click the play button and the video plays. You can build essentially the same thing with...
Weekly Platform News: Apple Deploys Web Components, Progressive HTML Rendering, Self-Hosting Critical Resources
13.9.2019
In this week's roundup, Apple gets into web components, how Instagram is insta-loading scripts, and some food for thought for self-hosting critical resources.
Apple deploys web components built using Stencil
The new Apple Music web app (beta) uses a JavaScript framework (Ember.js) but also...
Weekly Platform News: CSS ::marker pseudo-element, pre-rendering web components, adding Webmention to your site
18.7.2019
In this week's roundup: datepickers are giving keyboard users headaches, a new web component compiler that helps fight FOUC, we finally get our hands on styling list item markers, and four steps to getting webmentions on your site.
The post Weekly Platform News: CSS ::marker pseudo-element...
Haunted: Hooks for Web Components
3.7.2019
I was just chatting with Dave and he told me about Haunted. It's hooks, but for native web components! Pretty cool. I think the existence of stuff like this makes using web components more and more palatable — particularly in that totally-native no-build-step-needed-at-all kinda way.
I...
Why I don’t use web components
25.6.2019
Here’s an interesting post by Rich Harris where he’s made a list of some of the problems he’s experienced in the past with web components and why he doesn’t use them today:
Given finite resources, time spent on one task means time not spent on another task. Considerable energy has been expended...
Reduced Motion Picture Technique, Take Two
21.6.2019
Did you see that neat technique for using the <picture> element with <source media=""> to serve an animated image (or not) based on a prefers-reduced-motion media query?
After we shared that in our newsletter, we got an interesting reply from Michael Gale:
What about folks who love...
Detect if Element is a Web Component
5.6.2019
I’ve advocated for web components since before they became a spec, mostly inspired by the Dojo Toolkit’s dijit framework. Empowering first class JavaScript widgets, as opposed to a mess of DIVs and templates, always made the most sense. Now that web components exist, and awesome...
Making Web Components for Different Contexts
2.5.2019
This article isn’t about how to build web components. Caleb Williams already wrote a comprehensive guide about that recently. Let’s talk about how to work with them, what to consider when making them, and how to embrace them in your projects.
If you are new to web components, Caleb’s guide is...
Advanced Tooling for Web Components
22.3.2019
Over the course of the last four articles in this five-part series, we’ve taken a broad look at the technologies that make up the Web Components standards. First, we looked at how to create HTML templates that could be consumed at a later time. Second, we dove into creating our own custom element....
Encapsulating Style and Structure with Shadow DOM
21.3.2019
This is part four of a five-part series discussing the Web Components specifications. In part one, we took a 10,000-foot view of the specifications and what they do. In part two, we set out to build a custom modal dialog and created the HTML template for what would evolve into our very own custom...
Creating a Custom Element from Scratch
20.3.2019
In the last article, we got our hands dirty with Web Components by creating an HTML template that is in the document but not rendered until we need it.
Next up, we’re going to continue our quest to create a custom element version of the dialog component below which currently only uses...
Crafting Reusable HTML Templates
19.3.2019
In our last article, we discussed the Web Components specifications (custom elements, shadow DOM, and HTML templates) at a high-level. In this article, and the three to follow, we will put these technologies to the test and examine them in greater detail and see how we can use them in production...
Collective #500
18.3.2019
lax.js * An Introduction to Web Components * Core * Color.review * CSS Grid: Floor Plan * CSS Nesting Module
Collective #500 was written by Pedro Botelho and published on Codrops
An Introduction to Web Components
18.3.2019
Front-end development moves at a break-neck pace. This is made evident by the myriad articles, tutorials, and Twitter threads bemoaning the state of what once was a fairly simple tech stack. In this article, I’ll discuss why Web Components are a great tool to deliver high-quality user experiences...
Web Standards Meet User-Land: Using CSS-in-JS to Style Custom Elements
15.3.2019
The popularity of CSS-in-JS has mostly come from the React community, and indeed many CSS-in-JS libraries are React-specific. However, Emotion, the most popular library in terms of npm downloads, is framework agnostic.
Using the shadow DOM is common when creating custom elements, but there’s...
Extracting Text from Content Using HTML Slot, HTML Template and Shadow DOM
6.3.2019
Chapter names in books, quotes from a speech, keywords in an article, stats on a report — these are all types of content that could be helpful to isolate and turn into a high-level summary of what's important.
For example, have you seen the way Business Insider provides an article's key points...
An Overview of the Most Exciting Proposals for the Web Platform Related to Web Components
30.1.2019
As much as I like frameworks, I'm also a big fan of the native web platform, especially web components.
I look forward to the times when the implementation will be powerful eno
WDRL — Edition 253: Welcome back to a new year with Jank-Free Images, Styled Web Components, Human Branding and Code-Splitting
11.1.2019
Hey,
I’m happy to be back with a new edition of my Web Development Reading List in 2019. I’m grateful for all your ongoing givings to support my work and it makes me happy to hear that so many people find this resource very helpful. So if you enjoy reading it, share it with people you know, give...
Styling a Web Component
8.1.2019
This confused me for a bit here so I'm writing it out while it's fresh in mind. Just because you're using a web component doesn't mean the styles of it are entirely isolated. You might have content within a web component that is styled normally along with the rest of your website. Like this:
See...