hello.js

var please = require('share');
console.log('thank you');

NEW !!!

Wednesday, 24 April, 2024 UTC

The problem with new URL(), and how URL.parse() fixes that

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


Monday, 1 May, 2023 UTC

:root isn’t global

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


Monday, 3 April, 2023 UTC

A small JavaScript pattern I enjoy using

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


Thursday, 19 January, 2023 UTC

::backdrop doesn’t inherit from anywhere

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


Tuesday, 4 October, 2022 UTC

When going somewhere does a thing: on links and buttons

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


Tuesday, 28 June, 2022 UTC

Are you sure that’s a number input?

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


Monday, 31 January, 2022 UTC

Preventing smooth scrolling with JavaScript

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


Wednesday, 4 August, 2021 UTC

CSS Nesting, specificity and you

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


Wednesday, 4 August, 2021 UTC

CSS Nesting, specificity and you

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


Tuesday, 13 July, 2021 UTC

Detecting media query support in CSS and JavaScript

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


Monday, 5 April, 2021 UTC

Prescriptive software is better than descriptive software

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


Monday, 5 April, 2021 UTC

Prescriptive software is better than descriptive software

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


Friday, 29 January, 2021 UTC

Includes, contains or has. Finding things in iterables (lists) in JavaScript

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


Friday, 29 January, 2021 UTC

Includes, contains or has. Finding things in iterables (lists) in JavaScript

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


Tuesday, 13 August, 2019 UTC

Superposition: use the design system you already have

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


Tuesday, 13 August, 2019 UTC

Superposition: use the design system you already have

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


Tuesday, 4 June, 2019 UTC

Notarizing your Electron application

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


Tuesday, 4 June, 2019 UTC

Notarizing your Electron application

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


Tuesday, 15 January, 2019 UTC

An easy-to-use cross platform menu for Electron

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


Monday, 14 January, 2019 UTC

An easy-to-use cross platform menu for Electron

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


Tuesday, 24 April, 2018 UTC

Using Google Analytics to gather usage statistics in Electron

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


Tuesday, 24 April, 2018 UTC

Using Google Analytics to gather usage statistics in Electron

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


Tuesday, 7 November, 2017 UTC

Design tools for 2018

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


Tuesday, 7 November, 2017 UTC

Design tools for 2018

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


Thursday, 26 January, 2017 UTC

Hocus Pocus: PostCSS to finish the trilogy

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