As someone building a browser I need to parse a lot of URLs. Partially to validate them, but also to normalize them or get specific parts out of the URL. The URL API in browsers lets you do that, but it’s ergonomics aren’t ideal. The problem with new ... more
Most developers prefer to keep all their CSS custom properties in one place, and a pattern that has emerged in recent years is to put those on :root , a pseudo-class that targets the topmost element in your document (so that's always <html> on ... more
There is a JavaScript pattern that I enjoy using that I don’t see a lot around the web, so I figured it would be worth sharing. When you have a piece of business logic, frequently that depends on a a certain value being true. An if statement: if ( status ... more
Earlier this month I was implementing a lightbox for devtoolstips.org using <dialog> . I'll be writing about that soon but you can find the implementation in that link, it's remarkable how little code you need. While styling, I made use of the ... more
At the Fronteers conference, Manuel during his presentation did an exercise on building HTML that seemed fairly straightforward. On the site of Max Böck there's a thing you can click to open up a theme selector. What's that thing? Of course, it's a button! ... more
We've had inputs with the number type broadly available in browsers for about 8 years now. These inputs show a little rocker and can be used for, you guessed it, numerical input. But not every input that contains numbers should have an input type number. ... more
With scroll-behavior: smooth in your CSS you can tell browsers to animate scrolling to different parts of your site, for example when linking to an ID on a page. The javascript scrollTo API has a behavior option that lets you turn on smooth scrolling ... more
Native CSS nesting is coming to browsers soon. With nesting, that you might be familiar with from Sass or Less, you can greatly cut down on writing repetitive selectors. But you can also really work yourself into a corner if you’re not careful. This ... more
Native CSS nesting is coming to browsers soon. With nesting, that you might be familiar with from Sass or Less, you can greatly cut down on writing repetitive selectors. But you can also really work yourself into a corner if you’re not careful. This ... more
Recently I needed a way to detect support for a media query in CSS and Javascript. To detect if a browser supports a certain CSS feature, you can use @supports () { ... } , but that doesn’t work for media queries. In this article I’ll show you how you ... more
For a while now I’ve been telling people that I want Polypane to be prescriptive, not descriptive. In this article I want to expand on that and explain what I mean when I say “prescriptive”. I usually explain it like this: there is no shortage of tooling ... more
For a while now I’ve been telling people that I want Polypane to be prescriptive, not descriptive. In this article I want to expand on that and explain what I mean when I say “prescriptive”. I usually explain it like this: there is no shortage of tooling ... more
When writing JavaScript, very frequently I need to check if a given thing exists in a list of things . Every single time I need to look up the function that does that for the sort of list I’m working with. You see, there are three possible options: includes() ... more
When writing JavaScript, very frequently I need to check if a given thing exists in a list of things . Every single time I need to look up the function that does that for the sort of list I’m working with. You see, there are three possible options: includes() ... more
Having a design system is like having a super power. It takes away all the small decisions you have to make about a design and lets you focus on the higher level goals you have for your design. But creating a design system is a labour intensive process ... more
Having a design system is like having a super power. It takes away all the small decisions you have to make about a design and lets you focus on the higher level goals you have for your design. But creating a design system is a labour intensive process ... more
Starting with MacOS 10.14.5, all signed applications by ‘new’ developers will need to be notarized or they will trigger Apple’s Gatekeeper software and prevent users from installing your app. That means that aside from signing your application, you will ... more
Starting with MacOS 10.14.5, all signed applications by ‘new’ developers will need to be notarized or they will trigger Apple’s Gatekeeper software and prevent users from installing your app. That means that aside from signing your application, you will ... more
If you develop desktop applications with Electron, you will quickly need an application menu. Even if you don’t have any menu options that are specific to your application, you will still want to add a menu to get things like copy and paste to work on ... more
If you develop desktop applications with Electron, you will quickly need an application menu. Even if you don’t have any menu options that are specific to your application, you will still want to add a menu to get things like copy and paste to work on ... more
The Electron App framework makes it really easy to build cross-platform applications. I know this, because I’ve made a bunch. But how do you find out if people are using the features in your application? You could ask them or wait for them to tell you, ... more
The Electron App framework makes it really easy to build cross-platform applications. I know this, because I’ve made a bunch. But how do you find out if people are using the features in your application? You could ask them or wait for them to tell you, ... more
In the past few years tons of new web design tools came out. The old model of static pixelbased comps of screens is slowly being replaced with more modern ideas of designing. These new design tools use constraint based components, or even entire lay-outing ... more
In the past few years tons of new web design tools came out. The old model of static pixelbased comps of screens is slowly being replaced with more modern ideas of designing. These new design tools use constraint based components, or even entire lay-outing ... more
Back in 2014, nearly three years ago, I wrote about being tired of always writing a:hover, a:focus and wanting an a:hocus to do both for me. It got a lot of proposed solutions, including a Sass and a future-css one using CSS Aliases. In 2016, a year ... more