Posts in Css (20 found)

Building Kakuro Zone

I built Kakuro Zone ! When I go on work trips, I often use hotel business centers to print out some paper puzzles to do if I’m bored in the hotel room or on the airplane. I almost always do sudoku puzzles, but wanted to mix it up. As I started exploring different puzzles, I discovered kakuro ! They’re a type of logic puzzle very similar to a crossword puzzle, except you add numbers across and down to fulfill rows and columns. It’s super fun to do with paper and pencil! There’s quite a few kakuro puzzle websites out there, so I didn’t have to make a new website for them but: With the power of AI, I actually got pretty far a couple months ago! I set it up to be a React and Vite PWA, and got my printable puzzles all done in time for the WeAreDevelopers conference! I had printed puzzles for the week, and was able to play a bit on my phone on the plane as well. …and then I promptly ignored the repo until this week, because it solved my needs, ha. After the hubbub of GitHub Universe died down, I remembered that I should open source the game and clean it up so that others can play it too. This is, admittedly, a fairly vibe-coded project. Or should I say, agentically engineered . I did some touching of code, mostly in the CSS. I really cared about the what things should look like on different screen sizes, and how navigation should feel with a keyboard or on mobile, but besides that, I let GitHub Copilot fly here. It felt weird letting go… but it was also nice to just get the puzzle experience the way I wanted, without overthinking implementation logic. Here’s the repository , and here’s the game again for you to try out! I wanted to print them in a certain way that would fold well in my notebook I liked the idea of using the date as a “seed” for a puzzle, so I could have a friend do the same puzzle as I did on a given day I wanted to have the game on my phone if I didn’t print it out (but felt a hankering to solve one) I wanted to play with Neobrutalism.dev

0 views
Lea Verou 6 days ago

Candidate Statement for the 2026 W3C TAG Election

Group photo of the W3C TAG in July 2022 with me to the left of Sir Tim Berners-Lee (inventor of the Web and TAG chair emeritus). Photo credit: Dan Appelquist I had the great honor of being elected to the TAG by the W3C membership in 2020 and again in 2022 , serving two terms from 2021 to 2025. After a two-year break, this year I’m running to return, thanks to Google, Microsoft, and OpenJS Foundation pooling resources to make it possible. 💙 The W3C Technical Architecture Group (TAG) is the Working Group that ensures that Web Platform technologies are usable and follow consistent design principles, whether they are created inside or outside W3C. It advocates for the needs of everyone who uses the Web and everyone who works on the Web. If you work for a company that is a  W3C Member , please consider encouraging your AC rep to vote for me ! (Ask me if you don’t know who that is) My candidate statement follows. I’m Lea , and I’m running to return to the TAG, where I served two terms from 2021 to 2025. It was some of the most fulfilling work of my career. The only reason I did not run in 2024 is that the job takes hundreds of hours a year, which as an independent I could not sustain pro bono. This year, in recognition of my service, Google, Microsoft, and the OpenJS Foundation have pooled resources to fully fund my participation , so I can finally commit the time the job deserves while remaining independent . My work spans the entire web platform : 14 years in the CSS Working Group, active participation in TC39 and WHATWG, two decades of building for the web, and open source running on millions of websites. In 2025 the OpenJS Foundation recognized my overall impact on the web platform with its Pathfinder for Standards Award . That breadth is exactly what the TAG requires. With a PhD in Human-Computer Interaction from MIT and a 20+ year career that includes entrepreneurship and product leadership, I combine academic rigor and big-picture perspective with pragmatism , an eye for hard tradeoffs , and a deep commitment to user needs . And as a bilingual Greek woman, I bring a Mediterranean and European perspective and firsthand appreciation of the Web’s internationalization needs. For more on my background, see my 2020 and 2022 candidate statements. In my four years on the TAG, I worked to direct the group’s limited time towards maximizing impact: I co-led the Web Platform Design Principles , turning previously implicit design knowledge into published guidance that improves consistency across the platform and helps reviews scale, started the Web Platform Gaps initiative to find what the platform is missing, served as liaison to TC39 to keep JavaScript and Web APIs consistent, and participated in hundreds of design reviews, becoming the TAG’s go-to reviewer for API design. But I believe the TAG can, and should , do more. The Web is changing rapidly, and reactive review is no longer enough. The TAG is uniquely positioned to see the platform as a whole, yet it mostly encounters features after their architecture has taken shape, sometimes even after they ship. By then, consequential decisions are difficult to change. Who identifies gaps that span multiple working groups? Who sketches the big cross-cutting solutions, or decides which layer a problem belongs in when that is non-obvious? Individual groups see their own slice, and the sum of several low-level views is not the big picture. The result is architectural debt . I want the TAG to help shape the architecture of the Web, not just review it. To proactively identify gaps, sketch coherent, composable solutions, and then bring the relevant working groups into the conversation to develop and standardize the pieces within their scope. Not to take over their work, but to provide the cross-cutting architectural perspective that no individual group is positioned to offer. Expanding the gap analysis work I began last term is the first step, and my work since then has given me a much richer evidence base to draw from. I am one of the people leading Modern Web Guidance , a multi-vendor project teaching AI coding agents to use the modern web platform effectively and follow best practices. This work involves reviewing implementation instructions for a broad range of use cases, ensuring they reflect the best the modern Web has to offer. This makes the many ways the web platform still falls short incredibly salient, revealing systemic gaps that are easy to miss when looking at web features in isolation. The biggest change since my last term is that a growing share of the code targeting the web platform is written by AI agents , and a growing share of the Web is consumed by them. The TAG should treat this as an architecture question and answer it with principles and evidence, not enthusiasm or alarm. Many of the principles that make APIs robust and usable for humans also benefit agents, but the differences expose new tradeoffs that deserve careful architectural attention. And none of this changes what the Web is for: user agency, privacy, accessibility, and interoperability apply no matter who, or what, writes the code, and defending them is the TAG’s job. I am not employed by a browser vendor or a big tech company, and my funders do not direct, approve, or veto my positions. I remain free to disagree with any of them, in public, on any proposal. My only agenda is a web platform that lives up to its potential and remains owned by no one . I’ve spent four years helping the TAG improve the Web. I want to help it shape the Web’s future, and for the first time, I have the resources to see it through. I would like to thank the OpenJS Foundation, Google, and Microsoft for fully funding my TAG participation in the event that I am elected, and OpenJS Foundation and Bocoup for partly funding it during my previous terms.

0 views
David Bushell 1 weeks ago

I was wrong about dark mode

Apple invented dark mode again! They’re calling the new feature Adaptive Dark Mode ™ . I’m learning that other browsers already had a similar feature . I assumed people relied on add-ons like Dark Reader (and millions do). Regardless, pushing what is effectively an accessibility option to the forefront goes a long way to help people respect it. My site used to have dark mode but I wasn’t happy with my colour choice and implementation. I redesigned my site back in Feb and removed it. Later I experimented with colour themes which I’ve since adapted for alternate blog banners . In that experiment I said: Personally I prefer reading with a dark theme for long-form content. Dark is not my brand though and I don’t believe every website needs to support colour scheme preference automatically. A good browser has reader mode, I use that all the time. “Just enabled reader mode!” What a load of rubbish. You have to understand that sometimes I just write stuff and I don’t read it back. This also contradicted my previous statement: That said, in [current year] brands with a digital presence — all of them? — should have a colour scheme for both. That’s probably more true. Certainly websites must work for forced dark mode. (Any site forcing itself upon users should go straight to jail.) So either provide a dark mode, or be prepared to test against every adaptive and forced dark mode implementation, or just let your website look broken. Probably easier to design a dark mode then? So that’s what I did, again. Maybe you noticed? If not, there’s a toggle button up top. At the risk of weighing in on the conversation I’ve opted for a two-state single button. I default to system preference. The mystery button flips between light and dark. Want to return to system default? Tough luck! You shouldn’t have clicked it. Delete local storage nerd! Technically I’m using a registered custom property with container style queries because it looks like fancy modern CSS. Three at-rules! Most of my light/dark theming is done by customs properties. The default light colours (A) are set on the root element. A style query applies the dark colours (B) on the element. For edge cases that don’t follow the A/B rule I can use one of two techniques. Either a style query inside a specific component: Or use the function: Note that I set to make aware of the user’s choice that might override their system preference. I wonder if I can do this once: Is that safe? Let me know! It’s not safe to do on the root element because browsers checks that for adaptive dark mode etc. I’ll stick to the verbose style queries for now until I’m sure. There’s a sprinkle of JavaScript to use local storage for the toggle button. It’d be better to use a cookie and a server-side template. My website is hosted on a static CDN and I’m not adding edge worker latency, so I’ll risk Flash of inAccurate coloR Theme (FART) . My site only risks a FART if a user’s choice doesn’t match their system preference. A week into my Noscript November experiment I see most websites are prone to a big FART because they rely entirely on JavaScript to enable dark mode. I’m not happy with my button using a hidden label. Bit of a design failure I need to address later. My original goal was to have multiple themes but I ran out of time. At the risk of soliciting replies to a question I didn’t ask, I would like your feedback on my choice of dark mode colours! Do they look nice? I don’t care whether dark mode makes your eyes bleed (turn it off) or you absolutely must have a 4-dimensional toggle. Stephanie Eckles wrote about the same CSS technique I use. Dave Rupert has explored the with variations. I saw Una Kravets is using with style queries to do something extra fancy. Stu Robson has written in depth on dynamic colour schemes too. If you read this entire post in an RSS reader and never clicked through, what a power move! Thanks for reading! Follow me on Mastodon and Bluesky . Subscribe to my Blog and Notes or Combined feeds.

0 views
Sean Goedecke 1 weeks ago

Working with designers

I love working with designers, in part because (unlike managers and product managers) they’re culturally different from engineers. However, having more than one designer on a team is asking for trouble, and I have complicated negative thoughts about design systems. Designers demonstrate their value immediately. While working on some feature, I’ll typically put together some placeholder UI that I’m reasonably happy with. I then show it to a designer, who strokes their chin and says “hmm, I have some ideas here”. They then go away and produce a mockup UI that is not just clearly better, but better in ways I could not have imagined. There aren’t any other roles at a tech company where you can see the value at a glance. Designers are an unusual role in other ways, too. Engineering managers, product managers, and engineers all come from broadly the same stock: technical, detail-oriented planners. We are people of the spreadsheet. In fact, many managers and product managers were once engineers: it’s a natural transition. Not so for designers. I’m sure they exist, but I’ve never met any designers who started out as engineers. Because of this, designers are culturally distant from engineers. In my experience, this is a big positive. I’ve complained before that product managers who were once engineers tend to be worse, not better. Once you start trying to make your own secret technical assessments instead of finding a way to trust your engineering team, you’re doomed: you won’t be able to do it well enough, and the fact that you’re trying will make it impossible to build the trust you need. Designers don’t have this problem at all 1 . So far I have made designers sound like the elves of Middle-earth: mysterious creatures who glide around tech companies dispensing magic. In fact, they are more like the Slavic household spirits, or Domovoy . If you have one Domovoy in a household, it will protect your home against misfortune. If you ever have more than one, they will fight bitterly : “making all sorts of noises, injuring the cattle, turning the master out of his bed, choking people while asleep, etc”. Likewise, a designer can turn your scrappy product into something really beautiful — but you had better have only one designer, otherwise you’re asking for trouble. The worst experience I have ever had working with designers was on a product where we had three of them: initially just one, who then rotated off the project and was replaced by two very senior designers. As far as I could tell, the first design was pretty good. Unfortunately, the new designers didn’t feel the same way. The very first thing they did was completely redesign the product, which meant I had to rewrite most of the frontend styles. Then they began disagreeing with each other. I think we went back on each page of the product three or four times: one designer would tell me to change X, then the other would change it back, and so on. In the meantime, I was desperately trying to get the product to work. I knew what I was supposed to do in theory: get everyone in a room talking to each other and hash out a decision. Maybe this would have worked on a different product where the requirements were more stable, but it didn’t work here. The differences in taste, while imperceptible to me, were just too deep. It seemed like everything Designer A produced was slightly wrong in Designer B’s eyes, and vice versa. In the end we just powered through by implementing 2 each new iteration until about a week before the deadline, at which point I called in two layers of management as air cover 3 to freeze the design in its current state. These were really good designers! They were far, far better than me at design, and were very nice people who I’d happily work with again. I just think it’s inherently bad to work with more than one designer at a time. I’ve had this experience over and over on different teams and companies. I can only guess 4 as to why, but here are two theories: One way companies try to scale design work is to produce a “design system”: a library of frontend components that are all design-compliant, that can in theory be assembled like Legos into a page that looks consistent with the rest of the company. I hate design systems. However, like democracy , they’re better than any other way I’ve seen to enforce a consistent design. The first problem with design systems is one of incentives. The engineering team that owns the design system 5 is incentivized to produce elegant components that will look beautiful all the time. The engineering teams that use the design system are incentivized to produce systems that meet inelegant or ugly customer requirements. So you have this permanent battle where a product team demands something — say, the ability to embed arbitrary images into the dropdown component — and the design team pushes back because they’re worried it will look bad. The dynamic I described above (where designers tend to disagree with each other) makes this much worse. Often an embedded designer on the engineering team will push for some design that is slightly different from the design system, which (a) makes the design system owners very unhappy, and (b) makes the engineers unhappy, because the component must be tortured into a very slightly different appearance. The result of this problem is that engineering teams are perpetually hacking their way around the design system: reimplementing their own versions of components, reaching in with CSS to tweak the styles of existing components (which then get broken in each component update), and so on. This leads into the second problem: compatibility. Design systems are typically written in the latest and greatest frontend framework, but the actual frontend code at a company is always a hodge-podge of various technologies and versions that are too expensive and risky to update. For instance, you often have a design system in React that is being used to plan changes to a frontend in pure HTML and CSS 6 . I have spent years of my life wrestling with this exact problem: either you spend ages trying to reimplement some percentage of the React component, or you try and use the outdated pure-CSS design system (if one exists), or you give up and just embed a React component directly into the HTML. All of these are very unpleasant for different reasons. One common situation is that the version of the design system available to you (i.e. the pure-CSS version, or the React 16 version) looks subtly different from the design system available to your designer , and so when you plug your Legos together you don’t quite get what they were visualizing. This leads to a very tedious conversation where you have to explain that no, it’s not actually trivial to bump the entire app to the latest React version 7 . When you’re actually implementing the app, you have to constantly run a kind of translation in your head: “okay, the designer wants dropdown feature A, but the dropdowns in my version of the design system only offer features B and C, so I guess C is close enough…” I still think design systems are better than the alternatives. When you’re up-to-date and don’t have a designer who wants anything weird, they work great . Ensuring that a thousand engineers across a giant application all produce consistent UI is a very hard problem and I don’t know any other way to solve it. I just wish that the designers I worked with were more considerate of the fact that design systems often make the immediate work of engineering more difficult. The classic three-legged stool of product development is made up of engineering, product management, and design. Design is definitely the shorter leg. Almost every team I’ve worked on has had some kind of embedded product management, but only about half the teams I’ve worked on 8 have had some access to design (and even fewer have had an embedded designer on the team). Why is that? Partly it’s because there are products that don’t require design, or at least not in the visual sense that designers provide. Some of the teams I’ve worked on have owned systems with no real visual component: APIs, billing and reconciliation, markdown or pdf rendering 9 . I have seen companies put designers on these teams anyway, out of some sense that “design thinking” can improve the structure of an API. This is nonsense. Good API design is very important , but it’s a technical job, not an aesthetic one. Designers on these teams typically just sit around or tunnel-vision on some unimportant piece of UI that the team does own (e.g. some internal admin component that no customer will ever see). It’s also because badly designed products still work. I don’t think Netlify Analytics is well-designed: it’s awkward to use and does not show me information it definitely has. But I still pay for it, because I want server-side analytics for my blog. I don’t think many people have complimented the aesthetics of the Microsoft Azure admin portal, but Azure broke $100B of revenue this year. There are very few software products where design is truly business-critical. As an engineer, I selfishly wish I could work with a designer all the time. I want to work on beautiful products, and I can’t make them beautiful myself. This is partly structural. Because they’re not responsible for delivery, they just aren’t under the same pressure as product managers and managers. In fairness, it helped that both designers were technical enough to write their own frontend PRs, though these usually needed some polishing and deploying. This didn’t really work. While there were no major redesigns after that point, we were shipping design changes until the day before launch. Incidentally, if you’re a designer reading this, please email me! I’d love to know if this sounds right to you, and if so whether you have theories as to why. The culture on these teams tends to be a bit unusual as well: you get the subset of frontend engineers who are obsessed with general frontend software design instead of specific products. It’s like a whole group made up of the one guy in your team who is really into Haskell. Or in Angular, or in a different version of React. Sometimes because it’d break all the little hacks to the design system that your designer has strong-armed you into doing in the past. I did some very loose vibe research which estimated that Microsoft/Google/Amazon has 3/10/7 designers per 100 engineers, compared to 7/7/9 product managers. This sounds like it’d have a visual component but it’s not the kind that requires design : sandboxing a pdf or turning markdown into HTML is a technical operation that happens pre-design. The team that owns the page where that pdf or HTML is rendered is the team that makes design decisions about how it should look. Engineering disagreements can pivot on concrete measures of quality like latency, bugs, lines of code, and so on, while designers must rely only on taste Design changes anywhere affect the whole product, because users experience the product as a single design, while many engineering choices are invisible to the user (and so can be safely inconsistent) This is partly structural. Because they’re not responsible for delivery, they just aren’t under the same pressure as product managers and managers. ↩ In fairness, it helped that both designers were technical enough to write their own frontend PRs, though these usually needed some polishing and deploying. ↩ This didn’t really work. While there were no major redesigns after that point, we were shipping design changes until the day before launch. ↩ Incidentally, if you’re a designer reading this, please email me! I’d love to know if this sounds right to you, and if so whether you have theories as to why. ↩ The culture on these teams tends to be a bit unusual as well: you get the subset of frontend engineers who are obsessed with general frontend software design instead of specific products. It’s like a whole group made up of the one guy in your team who is really into Haskell. ↩ Or in Angular, or in a different version of React. ↩ Sometimes because it’d break all the little hacks to the design system that your designer has strong-armed you into doing in the past. ↩ I did some very loose vibe research which estimated that Microsoft/Google/Amazon has 3/10/7 designers per 100 engineers, compared to 7/7/9 product managers. ↩ This sounds like it’d have a visual component but it’s not the kind that requires design : sandboxing a pdf or turning markdown into HTML is a technical operation that happens pre-design. The team that owns the page where that pdf or HTML is rendered is the team that makes design decisions about how it should look. ↩

0 views
Evan Hahn 1 weeks ago

Static site generators are weird

I love static sites. Pre-rendered files are usually faster, lower maintenance, easier to secure, and more. Static site generators let you create these sites much more easily, which is fabulous. But I believe most static site generators are weird. SSGs like Jekyll , Gatsby , and Hugo require you to learn their special way of doing things. You have to answer questions like: You have to understand many of these in order to build a production-ready site, and every SSG is a different world. For example, my blog (which you’re reading right now!) has used Jekyll, Gatsby, and Hugo. For each one, I’ve had to learn its templating system, its asset system, its RSS feed system, and much more. Each project is thoughtfully designed, but totally its own thing. That’s not to mention the majority of SSGs, which are custom-made for one website. These projects tend to overflow with personality—rare programming languages, jagged feature sets, and flowery READMEs are on fine display here—and are often prime examples of the atypical. Weirdness at its best. This is not a critique of any particular project or of SSGs in general. I think this a lot of this weirdness is essential complexity , which I think most SSG developers would tell you. But I still think they’re weird! I expect to receive some feedback on this post like, “Static site generator X isn’t weird! Everything it does is normal!” I haven’t had that experience, and I envy you. Static site generators are great. And being weird is good! And I think static site generators are weird. How do you write HTML templates? How do you manage CSS and JavaScript? How do you deal with images and videos? How do you manage routing? How do you generate RSS feeds? How do you do unusual things, like one-off pages or redirects?

0 views
Kev Quirk 2 weeks ago

How I Customised Pure Blog for This Site

A few people have reached out to me to ask how I did X, or Y with my site, so I thought I'd talk about the customisations I've made to this site, and how they work. Firstly, this site runs on Pure Blog , a CMS that I've been building over the last year or so. As it's matured, I've added features that allow more advanced users to do clever things without having to fiddle with the core platform. This means that people generally shouldn't have to fork the project and should continue to get all the new goodness as I release it. This site is no different. I haven't done anything clever that Pure Blog can't do out of the box - everything is documented so by reading the docs and using a bit of creativity, you can do quite a lot with this plucky little CMS. I'll link out to the appropriate docs as we go through this post. Ok, so what customisations have I made? This is going to be a fairly long post, so I'll list them here with links to each header so you can jump around and read the parts that interest you. If you want to see specific code examples for any of these customisations, feel free to contact me . I have three custom post types on this site - notes , links , and books . Notes are used as short-form social media type posts, links are links to other blog posts that I've enjoyed, and books are short reviews of the books I read. Each has their own layout and in the case of notes, they have a different view on the homepage too. To do this I've created a custom partial, but we will come to that later. I could just use the default post type for all these posts, but I prefer to have a customised UI at the back-end for each. Here's what books and links look like in my editor: Notes are a little different as I use a custom page for them that only I can access. This looks more like a social media post window than a blog post window: Read the custom post layout docs ➡ I like to think of hooks as little tripwires that are set to go off when certain conditions are met. For example, something happens when an image is uploaded, or a new post is published. They're extremely useful and I have a number of them on this site: Read the hooks docs ➡ Beyond custom post types, Pure Blog lets you drop PHP files into . These can either override default pieces of the site (like navigation or post footers), or serve as entirely bespoke standalone pages, like my quick-publish notes screen, or the terminal 404 page . Here's a full list of the templates and partials used on this site: Read the layout partials docs ➡ I've replaced the default feed with one that allows for filtering on post type. So one feed file, 5 feeds - one for each post type, and a fifth for everything. My custom feed template allows you to visit for everything, or (e.g. ) for the posts of that particular type. This custom feed file lives in and I then used redirects to redirect the default URL to . All the feed URLs are available here . I use a self-hosted instance of Sendy to send out email "newsletters" whenever I publish a new post. These emails always contain the entire post, so people can read my content from their inbox if they wish. Because I write notes much more frequently than long-form posts, I let readers choose what they receive: everything, long-form content only, or notes only. To make that work without sending people through clunky third-party forms, I wrote a custom server-side handler ( ). When someone submits the form on the subscribe page , the handler: This not only helps segregate the emails people receive, but it has also had a dramatic effect on spammy sign ups. Which, if you've ever run a newsletter, you will know is a common problem. Pure Blog allows you to add your own PHP helper functions for all kinds of things. On my site, I only have 1 function defined: which transforms fractional score strings in my book posts (e.g. ) into accessible star glyph strings (e.g. ). I just think that looks far nicer in a post than . But how is this star rating accessible? Well, it's rendered on the front-end like this so screen readers can parse it: Read the custom functions docs ➡ I don't do anything magical with the design on this site. I use the Victor Mono font , and around 850 lines of CSS, which I've added to the custom CSS field within settings. Combined with the custom , and files above, it gives me everything I need to customise the site from the default look to what you see now. I have a custom theme palette that I've defined too, also in settings. The colours used can be found at the bottom of my colophon . Read the design customisation docs ➡ One of the most powerful things about using a static site generator is the ability to use data files. With data files you can have a structure data file, like YAML, that contains repeated data, which can then be looped through on the front-end to render content. I really wanted Pure Blog to be able to support data files, so I added support very early on. Personally, I use two data files on this site: Data files are fantastic as they reduce the amount of repetitive code you have to write. Instead of typing , after , after manually, you write your once, then loop through it with a data file and Pure Blog does the rest. Read the data files docs ➡ The final thing I customise is my file. There's a number of things I do to the standard Pure Blog file to either redirect URLs, or protect various locations: This ended up being an even longer post than I anticipated, but hopefully it shows just how much you can bend Pure Blog to your will, by design . None of this requires hacks to the core code, or maintaining your own fork. Everything you see here is achieved using Pure Blog as designed: settings, custom CSS, hooks, custom layouts, and partials. Because all these files live inside , , and , I can upgrade Pure Blog the moment a new release drops without worrying about overwriting my site's bespoke features. That was always my goal with Pure Blog - a super simple, distraction-free blogging platform out of the box, with enough flexibility under the hood for tinkerers (like me!) to build whatever they want. If you're running Pure Blog and have built your own customisations, or if this post inspired you to try something new with your setup, hit the reply button below, or find me on Mastodon. I'd love to see what you've done with it. Thanks for reading this post via RSS. RSS is ace, and so are you. ❤️ You can reply to this post by email , or leave a comment . Post layouts Hooks and automations Templates and partials RSS feed enhancements Newsletter subscriptions Functions and helpers Design and typography Data driven pages .htaccess rules Final thoughts Email Obfuscation ( ) : Scans rendered content and encodes the site email address into hexadecimal HTML entities to protect against scrapers. This has been pretty effective at reducing spam - I wrote more about this feature in this post . Post Sanitisation & Metadata Preservation ( ) : Automatically generates date/time titles for new notes. Normalises layout values by stripping quotes (turning layout: "notes" into layout: notes), ensuring posts written in external editors like Obsidian don't break layout checks. Preserves in post frontmatter when saving via the admin interface so the Mastodon card at the bottom of every post continues to work. Image Optimisation ( ) : Automatically resizes images exceeding 2560px width whilst maintaining aspect ratio, also converts them to lossless WebP, and cleans up original unoptimised files. Mastodon Cross-Posting & Syndication ( ) : Automatically crossposts all published post types to Fosstodon via the Mastodon API. Notes posts are cross-posted with full body text and media attachments (uploaded to Mastodon's media endpoint). Articles, links, and books are crossposted with their description and permalink URL. Captures the returned Mastodon status URL and automatically persists into the post's frontmatter which is then used for the Mastodon card at the bottom of every post. Custom Font for Open Graph Images ( ) : Makes dynamic Open Graph image generation to use my custom font. (partial) : This replaces the default and adds post-type filter buttons, preserving query parameters across pagination. It also displays notes in full, while other post types show only the title and excerpt. (partial) : A customised version of the default file from Pure Blog. On top of the default tag list and post pagination, this version adds the obfuscated "Reply by email" button, a client-side Mastodon conversation card displaying live stats (favourites, boosts, replies) as well as a link to the post on Fosstodon, Pure Comments integration, and a subscription call-to-action. (template) : Dedicated discovery hub combining Pure Blog's full-text search with an alphabetical, weighted tag cloud showing post frequencies. (template) : An interactive metro map that lists all of the pages on this site. There's also an option to see the pages as a list. (template) : My quick-publish admin screen for composing and publishing short-form note posts. (template) : Dashboard for tracking the 100 Days to Offload challenge streaks in batches of 100 posts. (partial) : This replaces the default template in Pure Blog. It adds a custom layout, as well as 404 handoff ( ) to render the custom template without modifying core Pure Blog files. (template) : A fun interactive terminal-styled 404 page with custom commands that include goats! (template) : Endpoint that resolves and redirects visitors to a randomly chosen published post . Checks a simple verification question ("What is Kev's surname?") to keep bots at bay. Silently discards submissions that trigger a honeypot field, or exceed IP rate limits. Subscribes the user to the correct Sendy list(s) via Sendy's API in a single click. which is then used to render my blogroll page . which is used for my projects . Admin Access Restriction : I restricts access to specific allowed IP addresses. Legacy URL & Feed Redirects : 301 redirects mapping historical and URLs to clean root and routes that Pure Blog uses. Redirects for legacy feed and social endpoints ( , , , , , etc.) to or to make sure the feed URLs from various versions of this site don't break. Route Rewrites : clean URL routing for all my RSS feeds so they have simple to share URLs.

0 views
David Bushell 2 weeks ago

Tangled, hire a front-end accessibility expert

Not me, this is just friendly advice from a struggling user. Alongside Codeberg I’d consider Tangled to be a real GitHub replacement. We desperately need to leave GitHub behind. It’s difficult to recommend any tech these days. I used to spread the gospel of Proton and that backfired . From what I’ve seen, Tangled seem to be saying and doing the right things so far. I have trepidations about their venture capital funding (see Deno’s demise ) but pessimism is no fun. Tangled’s recent blog post on federated code forges piqued my interest. I self-host Forgejo and a big downside is that no one else can participate easily. Forgejo federation is under development. Maybe the two can co-exist? But that’s not what I’m here to discuss. In the same post Tangled revealed their new UI design. We’ve redone the UI on top of our new architecture (described further below), in Svelte. Things should now be quicker, visually consistent and prettier! The keen eyed of you might’ve also spotted that we’ve swapped out Inter for Timeless Sans. The federated code forge - Anirudh (Tangled CEO) I quiped on Bluesky: “keen eyed? eagle-eyed maybe!” — the new font size is exceedingly tiny. It’s coded as with line height. Tangled is practically unusable for me at this size. It was small before but I could zoom in. The way the new front-end is designed and built doesn’t leave much room for personal remedy. This is not just a subjective opinion there are real accessibility failures here. Below is a screenshot from Tangled’s new user interface design. Visit and experience the new UI yourself. 12 pixels is too small for any meaningful text (which is typically all text). Maybe you feel the size is totally fine? That’s fine for you. But it’s not fine for a significant number of people. You won’t find any accessibility expert happy with that size. (Low-DPI displays may even struggle to render the font legibly.) WCAG 2.2 accessibility guidelines don’t recommend a minimum font size. 1.4.4 Resize Text does require that text can be resized up to 200% “without loss of content or functionality”. Tangled uses pixel units in CSS for font size † . That means the UI won’t adapt to the browser default setting. I can force a minimum font size and look what happens. † Correction: I was wrong about pixel units everywhere (I misread the computed values), it’s on the element that blocks the relative units from scaling properly with browser settings (an easier fix) . Text lines get too close for comfort. Characters are starting to get clipped. See the “g” descender in “Tangled” for example. And if I force a 200% resize at this happens. Oh dear! Text that is “clipped, truncated or obscured” is a failure. Remember that the WCAG guidelines are a floor. Nothing can be perfectly accessible, but a font size and basic front-end failures are a concern. A proper audit would reveal other issues (e.g. with how media/container queries adapt to font size). I’m not posting this to seek employment myself or to provide answers. I want to remind readers that accessibility concerns affect everyone. Serious projects should seek professional expertise. It’s disappointing to see yet another tech start-up fail the basics. I’ll provide two suggestions for free though: (Edit: see correction above, the fix is even easier.) Frankly, what Tangled’s redesign suggests to me is that nobody involved with the process gave accessibility enough thought (if any) (edit: that part was unfair, there was some effort but far from adequate testing) . That may sound harsh but it’s usually the reality from my experience. Whatever the case, Tangled must do better in this area. If I may answer a few predictable but hypothetical comments. This is just v1. Things will improve. I’m sure they will and maybe even pushed by my criticism. The struggle is that accessibility concerns must be integral to design from day one, not an afterthought to patch. It’s open source, where’s your merge request? Sorry, once a project crosses the line into venture capital “open source” takes on a different meaning. If people want to contribute that’s their prerogative. Personally, I’m not in the habit of giving away professional expertise for free to a for-profit business. Such expectations are especially a problem for accessibility specialists (of which I am not). Aha! What about this accessibility failure on your website?! That’s a bit embarrassing, but thanks for the heads-up! It’s far easier to hire an accessibility expert before you ship but it’s never too late to retroactively make improvements. I’ve been making accessibility improvements on my own website for decades. I like Tangled and I want to see it do well. Maybe someone will share a milkshake duck or they donate to fascist Linux and I’ll eat my words. I really hope not! I hope Tangled improves so that those lingering in GitHub’s slop graveyard have fewer excuses to hang around. Thanks for reading! Follow me on Mastodon and Bluesky . Subscribe to my Blog and Notes or Combined feeds. Use relative units for font sizes Use unit-less numbers for line height

0 views
Unsung 2 weeks ago

Pac-Man’s siren call

(It’s the last day of Halloween Week on Unsung, where we’re sharing scary, spooky, and creepy stories. This is a story of how my bug scared others.) In 2010, Google’s homepage celebrated various occasions with reimaginings of its own logo called doodles, but we wanted to do something extra special for Pac-Man’s upcoming 30th anniversary – and through a set of circumstances that began with me randomly sitting in the cubicle right next to the doodle team, I was asked to write the code. It was, frankly, a terrifying proposition. The homepage was then a very important destination, and my job title was only adjacent to “software engineer.” But I started researching the game and recreating it all in HTML and CSS, not dissimilarly to the iPod Apple just put on their pages to celebrate a different anniversary . (The research was tricky because we didn’t want to reach out to Namco for help too soon, instead planning to wow them with a close-to-finished doodle. Luckily, some nerds on the internet researched Pac-Man intensely , so I could stand on their pixellated shoulders.) It was important for me to stay truthful to the original game, with only some very deliberate exceptions – the price of entry was the playfield having to resemble Google’s logo, and I also added a Ms. Pac-Man mode as an easter egg; the already-classic I’m Feeling Lucky button was reimagined as Insert Coin. I even added a few bugs that I learned existed in the original Pac-Man. But I also introduced at least one important bug of my own making, one that backfired on launch day. We wanted the game to have sound, because so many of Pac-Man’s sounds are beyond iconic: the starting melody, the waka-wakas, the death jingle. This presented a little technical challenge, since I hoped for the doodle to be a showcase of what pure HTML and CSS could do, but sound still needed quiet (huh) support from Flash. However, Flash was, by then, installed in a lot of browsers, so that worked out okay. The project was all was going really well. I had fun coding the game and we seemed to have fun playing it. Namco eventually got onboard, too, including greenlighting the Ms. Pac-Man addition that I only later learned had a pretty complex political story . We felt so happy about the progress, as a matter of fact, that the leadership wanted the doodle to feel even bigger. And at some point, we thought about the game autoplaying on the homepage after 10 seconds of inactivity – just to let you know that you could have some fun in a place you might not have expected it. I was happy with that – if there was anything scary about it at the time, it was only the thought of my code getting even more exposure – but I wasn’t worried about distraction, since the homepage was not a destination page you would ever linger on. As you can piece together, Pac-Man would also, as a consequence of all these decisions, autoplay with sound. We knew that, I think, and in that moment it felt like… it would probably be okay. In hindsight, it wasn’t okay, but it also was not okay in a way that none of us expected. = 2x) and (width >= 700px)" srcset="https://unsung.aresluna.org/_media/pac-mans-siren-call/2.2096w.avif" type="image/avif"> = 3x) or (width >= 700px)" srcset="https://unsung.aresluna.org/_media/pac-mans-siren-call/2.1600w.avif" type="image/avif"> = 2x) and (width >= 700px)" srcset="https://unsung.aresluna.org/_media/pac-mans-siren-call/3.2096w.avif" type="image/avif"> = 3x) or (width >= 700px)" srcset="https://unsung.aresluna.org/_media/pac-mans-siren-call/3.1600w.avif" type="image/avif"> The launch day came. A couple of people on the team and I pulled an all-nighter that included putting in some finishing touches, and preparing an internal tournament version of Pac-Man. Personally, I was petrified. I was but a designer on the user experience team. Sure, my code went through all the proper reviews – but I still couldn’t believe it would be allowed, verbatim, on one of Google’s most valuable properties. We toggled the switch at 9am San Francisco time. Within hours, the world once again went wild for Pac-Man. Soon, I watched feedback arrive in torrents too huge for me to ever catch up with. I was asked to do press interviews. I saw Twitter crash. Most importantly, I witnessed reports from all over the world of people playing Pac-Man in all sorts of circumstances, on all sorts of devices (HTML!). And indeed, we got a few reports of the “there is a really scary sound coming out of my computer” variety. But they didn’t come through the channels we expected. And when we suggested “the quick workaround is just to close the tab with Pac-Man,” invariably the answer would be: “What Pac-Man?” This is what we figured out over the next frantic few hours. Some people using the then-ultrapopular Firefox installed an extension called CoolPreviews, which allowed them to quickly preview pages by hovering over links. The extension would quietly start at the same time Firefox was opened. And it would immediately, in the background, invisibly and unbeknownst to the user, open a website. I am not sure if that decision was to prime the cache, or whether it was just a forgotten placeholder. That website was Google’s homepage. You probably already know what happened. On that particular Friday, google.com had an auto-playable Pac-Man doodle with the sound on. If you used Firefox with CoolPreviews installed, the plugin would quietly open Google’s homepage in the background whenever you launched the browser, and 10 seconds later… Imagine this for a second. You sit down Friday morning and power up your computer. For you, there’s nothing unusual about this Friday. You don’t have to use, or even know about Google. You might not know what browser you use — or what a browser is. As a matter of fact, you might not even be using your browser; perhaps it has been minimized and sits unobtrusively in the toolbar at the bottom of your screen. You might not know about CoolPreviews, or even the concept of plugins or extensions. Perhaps you’re just checking your mail or warming up for today’s first round of Solitaire. Then, out of a sudden, out of your speakers comes blasting a siren of an invisible Pac-Man game having infiltrated your computer in the most unusual manner. I know Google feels different now, 16 years after this story took place. I know we are all tired of websites that autoplay sound and that decision we’ve made feels uncomfortably close to “growth hacking.” But the story takes place in that slightly more naïve era of 2010. I pushed a patch within hours. It ended up being the same solution many browsers do by default today – we added a visible mute button, and you now had to first touch the game in some way (a keystroke, a click, multitouch, or the Insert Coin button) for the sound to activate. Since CoolPreviews didn’t do that, it fixed the “possessed computer” problem. Ironically, I don’t believe we ever heard of normal people being bothered by the autoplay – it seemed that indeed, few people stayed on the homepage for 10 seconds doing absolutely nothing. The funny thing is that emergency live-patching internet’s at the time most valuable homepage was perhaps the scariest part of that day for me, but that completely went over my sleep-deprived head. And eventually, my job title changed. How close it felt to a “software engineer” is up to you to decide: = 2x) and (width >= 700px)" srcset="https://unsung.aresluna.org/_media/pac-mans-siren-call/5.2096w.avif" type="image/avif"> = 3x) or (width >= 700px)" srcset="https://unsung.aresluna.org/_media/pac-mans-siren-call/5.1600w.avif" type="image/avif"> (I wrote a story with the same title in 2015, but it got mangled online, and I’m unhappy with the writing now – so this is basically a complete rewrite of that essay. You can still play Google Pac-Man doodle , with the sound now reimplemented sans Flash.)

0 views
codedge 2 weeks ago

No JavaScript needed

I have never been a fan of JavaScript. I don’t want it on my personal website. And I found ways to do things I usually would need JS for with static HTML and CSS. After a phishing attack on my friend’s computer I started to look closer at all the code I run without ever reading it. That attack was Node.js, not JavaScript in a browser - but its core trick, fetching code from a remote server and executing it on the spot, is exactly what every third-party tag on a website does. So I decided to ditch JavaScript entirely, where possible. I started to use NoScript and saw how awful most of the websites on the Internet are, if you disable JavaScript. Tons of external integrations (tracker?, analysis of user behaviour?) and completely broken sites where even the first load of content is not executed. I did not want to put users on my page in the same situation so I removed almost all JavaScript functionality from my site here and replaced it with static HTML and some CSS. Let’s have a little walk through what I normally would use JavaScript for and how I replaced it. JavaScript is often used to add features that HTML is not capable of. But then people forget to remove JavaScript when HTML finally added support for a certain feature, f. ex. lazy loading of images. Browsers have done this natively for years, yet many sites still ship a library for it. Every script that stays is code the visitor has to download, parse and execute - on every single page load. Another thing is tracking. Analytics, session recordings, heatmaps - all of this runs as JavaScript in the visitor’s browser. It collects data the visitor never agreed to share and it is often a reason why a site feels slow. Or third-party integrations. Embedded videos, social media buttons, chat widgets or comment sections load scripts from other servers. Each of them tells another company that someone visited my page, which is something I do not want. So either I can build it into my site directly, without relying on third-party JS integrations, controlling what goes in and out, or I skip it. I understand, there is probably not a real HTML-only (in combination with CSS) alternative to every functionality you want to have on your website. I found that for my use cases I do not need to rely on JavaScript - and hopefully will not in the future. Usually you would send your contact form with JavaScript. No page reload, nice success message once sent, or showing some errors underneath the input fields. My contact form uses staticform , my custom written form backend for static pages. I get HTML validation of fields on the frontend using HTML5 attributes 1 and proper field types. After submitting, the backend service validates again and redirects to a success or error page. No JS needed. A search on a static site usually means shipping a search index as a big JSON file and some JavaScript that crawls through it. Search engines have already indexed my page, so why not use them? My search page is a simple form that sends the query to DuckDuckGo and limits the results to my domain with a hidden field. I chose DuckDuckGo because it does not track searches, save IP addresses, or build user profiles. No JS needed. Using details element The classic hamburger menu on mobile does not need JavaScript. HTML has an element for exactly this use case built-in: . The is the clickable part, everything else is shown when it is open. The browser keeps track of the open state and sets the attribute on . With Tailwind’s variant I swap the menu icon for the close icon. and the selector remove the default triangle. On larger screens hides it completely and the normal navigation shows up. A newer option is the Popover API , available in all major browsers. The attribute turns any element into a popover, and a button with toggles it. It works a bit differently than the element with regard to placement and closing with the key. Still, a very good alternative to JavaScript. No JS needed. For a long time lazy loading images meant a library watching the scroll position and swapping a into the attribute. Browsers have supported this natively for some years. No JS needed. A bar on top of the screen that fills while you scroll through a post. This is usually an event listener on calculating the percentage and setting the width of an element. With scroll-driven animations CSS can do this on its own. Scroll-driven animations are not supported in every browser yet, currently Firefox is lacking support for this. Honestly this is not a big problem for me: browsers without support simply do not show the bar, and Chromium-based browsers still cover a big chunk of the browsers people use. No JS needed. With all these changes I am quite happy with the balance of interactivity on my site and features for reading content - and all this without JavaScript. There is one tiny script left: a visitor counter using GoatCounter , a privacy-respecting analytics solution. It does not use cookies or track individual visitors. It follows my understanding: I host the script on my own server, so no third-party code runs on my page - only the page view itself is sent to GoatCounter. You can find the link to the dashboard in the footer section. (Almost) no JS needed. Form Validation Essentials: https://www.ashleysheridan.co.uk/blog/Form+Validation+Essentials   ↩︎ loads the image only when it gets close to the viewport does not block rendering of the remaining page while decoding the image and let the browser reserve the space, so the layout does not jump around Form Validation Essentials: https://www.ashleysheridan.co.uk/blog/Form+Validation+Essentials   ↩︎

0 views
Den Odell 3 weeks ago

Design Systems Should Be Fast by Default

If a design system’s components are slow to interact with, so are any apps built with them. I timed large dropdowns and checkbox lists in some popular design systems, worked out how to make the slow ones faster, and wrote tests that fail when they’re too slow. Web apps are usually architected and built in layers. The browser is the foundation, often with a framework like React or Lit above that, followed by the company’s shared libraries and design system, and finally the product team’s own code is at the very top. The browser has one main thread for running JavaScript, responding to user events and drawing the screen , so the less work the lower layers do, the more of it is left for the app. If a design system’s equivalent of a dropdown takes a second to open and display its options, it’s not going to be any faster in the apps that use it, however well their teams write the rest of their code. If the design system team takes the time to make that faster, it unlocks better performance for all the apps built with the design system at once, and for everyone using them. I know that design system teams already think this way about accessibility. Using a well-built design system’s button component gives you the correct keyboard support and ARIA roles out of the box, and many design system teams rightfully check their components for accessibility thoroughly before each release. For some teams, though, performance doesn’t always get the same attention. Components usually get tested in isolation with just a few items, nothing intense enough for the cracks to show. They start to slow down once a real app gives them much more to do. The team building that app can feel the page is slow, but because that comes from the design system, they can’t easily fix it themselves. I feel that performance belongs on the design system team’s priority list, next to accessibility. That means testing each component with demanding but realistic amounts of data before it’s released, and making sure its performance doesn’t get quietly worse over time. “Performance belongs on the design system team’s priority list, next to accessibility.” I’m eternally curious, so I took it upon myself to conduct a bit of testing. I wanted to see how some of the most popular open-source design systems fared on performance. I deliberately chose ones built on different frameworks, as I was interested in whether certain frameworks would turn out to affect performance more than others. Here are the ten I picked, with the versions I tested in October 2026: I left out some popular design systems that weren’t actively being developed any more, for a fairer comparison. Also, React Spectrum and Spectrum Web Components obviously share the same design language, but they’re separate libraries with their own code so I wanted to see whether they’d perform the same. The first thing I did was to look through each of their codebases to see if they had any automated performance tests. Only Spectrum Web Components seemed to. It runs a benchmark for each of its components every time a pull request is created. Fluent also has a benchmark for each of its components, but I couldn’t see them running automatically anywhere. The others didn’t appear to test for performance on a component level at all. Ant Design, Material UI and Fluent do check their bundle size. That’s usually what design system teams measure when they consider performance, and it’s definitely important as it affects page load time, but it doesn’t relate to how quickly a component actually responds on the page. I then picked two fairly intensive tasks that real web apps do often and I timed each design system on those. The first was opening a country selector with all 249 countries from the ISO list , like the ones you get on checkout and sign-up forms. The second was selecting 100 checkboxes at once, just like clicking a “select all” checkbox above a list of 100 messages in a webmail app. I realize these two tasks aren’t an extensive review of performance across an entire design system, but they’re where components often get slow, so they’re a good place to start. Before we get to the results, I want to make clear that all of the design systems I tested are well built and are widely used, and they’re written by expert engineers who I respect. The point of this research isn’t to rank them or offer criticism, but to use them as examples to encourage us all to prioritize performance in our design systems. And for any problems I uncover, I’ll suggest a fix, the way I would in any manual code review. I ran these tests with production builds of each design system, using Chrome v155 on my M1 Pro MacBook Pro. A script clicked the country selector or checked all the checkboxes, then measured how long the browser’s main thread stayed busy afterwards, including any animation, and that’s the time shown in the tables. The script slowed the CPU down by 4x, the same as the throttling setting in the Performance panel of Chrome’s developer tools, which I always recommend when developing, because it’s closer to how real users’ devices perform. To avoid any spurious results, I ran each test three times and took the median values. I also measured the longest time the UI stopped responding during each task. That happens when the main thread is blocked, because the browser can’t update the screen or respond to user events, so the page appears to have locked up. Chrome only tells you about frames that take longer than 50ms to draw, so I’ve put “Under 50ms” in the tables wherever it didn’t report any. I’ve put the tests into a design-system-performance-tests repo on GitHub, by the way, in case you want to run them yourself. On to the results, and here’s how long each design system took to open the country selector, from fastest to slowest: The country selectors in Fluent and Carbon opened faster than any of the others. Ionic’s was by far the slowest, taking more than five times as long to open as the next slowest, React Spectrum. To see how the time to open changes as the list gets longer, I opened the country selectors in Ionic and Fluent again with just 50 options. Ionic’s took 203ms with 50 options, but over 1.2 seconds with all 249, and for most of that time the UI stopped responding. Fluent’s barely changed, going from 41ms to 61ms. Now, here’s how long each design system took to select all 100 checkboxes: Ant Design took six times as long as Material UI, even though both are built with React. Selecting the checkboxes didn’t stop the UI responding for any noticeable length of time in any of the design systems, which is encouraging. The longest it stopped responding for was 78ms, which is about five frames the browser skipped drawing at 60fps, far shorter than the slowest country selectors. Both sets of results showed that a design system’s performance didn’t depend on its framework by itself. Carbon, Web Awesome and Spectrum Web Components are all built with Lit, but the country selector in Spectrum Web Components took more than twice as long to open as the one in Carbon. And Ionic had the slowest country selector of all those I tested, but its checkboxes were faster than most of the others, so the same design system can be slow at one task and fairly quick at the other. I didn’t want to leave my testing there without trying to find out the reason for the differences between the results, so I did some profiling on the slowest ones. With the CPU still throttled by 4x, I opened the Performance panel, pressed its Record button, opened the country selector or selected all the checkboxes, and then stopped the recording. The Summary tab at the bottom of the panel shows how the main thread’s time gets split between Scripting, which is JavaScript execution, Rendering, which covers calculating styles and layout, and Painting, which is preparing what to draw on the screen. The “Bottom-Up” tab lists the JavaScript functions that ran, sorted by how long they took, and you can click on a function’s file name to open its source code in the Sources panel and see what it was executing. Going back to Ionic’s results from earlier, its country selector took more than six times as long to open with five times as many options. If each option took the same amount of time to add, it would take about five times as long, or a little less in practice, since showing the dropdown itself takes the same amount of time no matter how many options it has. That means each new option must take longer to add than the last one before it. Figure 1: The DevTools Performance panel after recording Ionic’s country selector opening with 249 options, with the Bottom-Up tab open and the slowest functions at the top. In the Bottom-Up tab for Ionic’s country selector, shown in Figure 1, most of the top rows were functions with minified names, all from the same file. That file also had its own version of , a method the browser normally provides, and running that version took up about half of the time the country selector needed to open. Clicking into those functions, I could see the file contained Stencil’s framework runtime. The button at the bottom of the Sources panel formats minified code so it’s easier to read, and when I compared it with Stencil’s source code on GitHub, I could see that these functions were part of Stencil’s handling of slots. A slot is a placeholder inside a web component that marks where the elements you put inside it are shown, such as the options inside a dropdown. Other design systems built with Stencil might have the same problem. In Ionic’s country selector, each option is a radio button, and they’re all inside a radio group, , which makes sure only one of them can be chosen at a time. Slots are normally handled by the browser, through shadow DOM, which is the feature that gives a web component its own private set of elements, separate from the rest of the page. doesn’t use shadow DOM, though, so Stencil handles the slots instead. It replaces the radio group’s and methods with its own versions that work out where each new option should go. To do that, it checks all the options already in the radio group to find the right slot, then checks them again to work out where the new one should go. Once the new option has been added, Stencil goes through all the options a third time to find out whether the slot’s fallback content should be shown. Fallback content is what a slot displays when it’s empty. Adding the 249th option means checking the 248 options before it three times, while adding the 10th only means checking the 9 before it, which is why each new option takes longer to add than the last one. The setting that replaces is called , and Ionic enables it through another setting, , which turns on all of Stencil’s fixes for slots in components that don’t use shadow DOM, including that one. So the delay comes from that setting together with a radio group that doesn’t use shadow DOM, rather than from Stencil being slow in general. Both settings are by default today, but Stencil’s documentation say they’re meant to become by default in the upcoming v5 release. If that ships as it is, any component that uses slots without shadow DOM will slow down the same way Ionic’s dropdown does, because Stencil will check all of its existing children each time a new one is added. Ionic could fix its dropdown by making use shadow DOM, so the browser handles the slots instead of Stencil, and the browser’s normal function would then be used. That fixes Ionic’s dropdown for all the apps that use it, though it would change how apps can style the radio group, so it would probably need to wait for a major release to do so. Or Stencil could fix the problem by only checking the fallback content of the slot that changed, and skipping that check when the slot already had options in it, because its fallback content would already be hidden. To find out how much difference that would make, I removed the third check from a copy of Stencil and added 2,000 elements, one at a time, to a simple test component. Adding them was about seven times faster without the check. Fixing it directly in Stencil would also fix the same problem in any Stencil-based design system that uses slots without shadow DOM. I’ve raised this with both the Ionic team and the Stencil team . I ran in the Console before and after opening Material UI’s country selector, and the count went up by about 250 elements, one for each option, as soon as its dropdown opened. I ran the same check on Ant Design’s country selector, and the count only went up by about 40. Ant Design’s country selector renders just the options that fit in its dropdown, and renders more as you scroll, which is a form of virtualization. That’s why it opened noticeably faster than the one in Material UI. Virtualization works for long menus and tables too, but it needs care with keyboard navigation and screen readers, because only the options or rows that fit on screen are actually in the DOM. Ant Design’s dropdown is a good example to learn from here. As well as the options you can see, it keeps a hidden copy of the highlighted option in the DOM, so screen readers can still announce it. In the Summary tab, I noticed that Rendering made up about half of the time UI5’s country selector took to open, and Scripting made up much less. So the delay was mostly coming from the browser working out styles and layout, not from executing UI5’s JavaScript functions. In the Elements panel, all 249 options are already in the DOM before the dropdown opens, inside a hidden popover. The browser doesn’t work out styles for elements that are hidden, so when the popover opens, the browser has to style all of them at once. That’s about 1,500 elements, because each of the 249 options has its own shadow DOM with more elements inside. Virtualizing the list, the way Ant Design does, would give the browser far fewer elements to style. React Spectrum’s country selector uses virtualization too, but it was still the second slowest to open, after Ionic’s. I opened it with half as many options, and it took about the same amount of time, so the length of the list wasn’t what made it slow. I profiled it, and near the top of the Bottom-Up tab was a browser function, , called from React Aria, the library React Spectrum is built on. In React Aria’s source code , I found that every time the country selector opens, React Aria goes through the visible options one by one. For each one, it checks that the option is visible, clears its height, and then reads its size, and the browser has to work out the layout of the page again for each of those checks. This is known as layout thrashing. All of that happens straight after the user clicks the country selector, and the UI stops responding until it’s finished. React Aria could clear the heights of all the options first, and then check and measure them all, so the browser only has to work out the layout once instead of again for every option. I’ve raised an issue with the React Aria team about this. I profiled Ant Design’s checkboxes as all 100 were selected, and executing JavaScript made up less than a third of the time it took to select them all. The rest was the browser calculating styles and drawing each checkbox’s animation, 100 times over. I turned the checkboxes’ animations off on the test page, with a CSS rule that sets their transitions and animations to , and selecting all the checkboxes then took less than a third as long. Almost all of the style and drawing work went away, and so did some of the JavaScript, which was tied to the animations. The animation helps when someone checks one box, but users don’t need to watch 100 checkboxes animate at the same time. Ant Design could fix this by only animating a checkbox when someone selects it directly, or the code behind a “select all” checkbox could turn the animations off before checking all the other checkboxes. “Users don’t need to watch 100 checkboxes animate at the same time.” None of this means a design system has to give up its animations, because they can be changed to be less demanding for the main thread. The Elements panel shows that Ant Design’s checkbox styles fade the checkbox’s background and border colors, which the browser has to repaint on the main thread for every frame. Fading the opacity of a filled layer gives the same effect, and the browser can run that on the compositor thread instead. That’s a separate thread that puts together the parts of the page the main thread has already drawn, so it can fade them by itself and keep the animation running even while the main thread is busy. I found these problems by profiling, but each one could have made a performance test fail before the component was released. Most component tests render one copy of the component with a few props, which shows it works, but not how fast it is with 249 options in a country selector or 100 checkboxes being checked at once. In a performance test, you set the component up the way a real app would use it, and then time how long the page takes to respond when you interact with it. Listing 1, below, introduces Playwright performance tests for the country selector, using a fake design system I made up called Nettle. The repo runs the same tests on each of the ten design systems I tested, along with a test that checks all 100 checkboxes at once. The test page renders the country selector with the number of countries set in its URL, such as . In each test, Playwright clicks the country selector to open it and measures how long the browser’s main thread stays busy afterwards, along with the longest time the UI stopped responding. Listing 1: Performance tests for Nettle’s country selector. The function in Listing 1 returns Chrome’s metric, which is a running total of how long the main thread has been busy. If you subtract the total before the click from the total after it, you get the time for everything that happened as a result, including JavaScript execution, rendering and painting to the screen. I ran both tests with the CPU slowed down four times, the same as for the tables above. In my testing, Ionic’s country selector was the only one to go over the first test’s 300ms limit with all 249 options. One long pause that locks up the UI feels worse to a user than several short ones, even when they add up to the same total time. The country selectors in Spectrum Web Components and UI5, for example, took almost the same total time to open, but the one in Spectrum Web Components opened in several smaller steps, so the page only locked up briefly each time. UI5’s one had to style all of its options at once, so the page locked up for longer. That’s why the first test also uses the Long Animation Frames (LoAF) API , which reports any frame that takes over 50ms to draw, so the test can fail if one of them takes 100ms or more. With all 249 options, the country selectors in Ionic, Material UI, React Spectrum and UI5 failed that check, and Ionic’s failed it even with just 50 options. Each limit in these tests is a performance budget , which is the most time something is allowed to take before the test fails. I picked 100ms as the budget for how long the UI can stop responding, because that’s roughly where a response stops feeling instantaneous. In the first test, I gave the total time a higher budget of 300ms, because the test waits for the dropdown to finish animating open, so the total also includes drawing each frame of that animation. You can set your own budgets by running the tests on your components now and setting each one a little above the result, so the tests fail if a later change makes a component slower. The second test in Listing 1 opens the country selector with 250 options, rounded up from 249 so it halves evenly, and then with half as many, the same kind of comparison I made with Ionic’s results earlier. The full list should take no more than about twice as long to open as the half list, so the test fails if it takes much longer than that, with a little room to allow for the times varying from run to run. Every country selector except Ionic’s passed easily, taking well under twice as long with the full list, while Ionic’s took nearly three times as long and failed. If I could only choose one test to run, it would be this one, because it fails when each option takes longer to add than the last one, and you don’t need to change its budget for machines with different specs. After I’d written these tests, I found that Spectrum Web Components already has an automated test for a country selector just like mine, with all 249 countries. But that test only times how long the closed dropdown takes to render on the page, while this one times how long it takes to open when someone clicks it. The same ideas work for other components too. You can adapt the country selector tests for anything that shows a long list, like a menu or a table, and the checkbox test for anything that appears many times on a page, like icons or buttons. If you run these tests automatically on every pull request, with something like GitHub Actions, you’ll know straight away when a change affects a component’s performance. To try the tests on your own design system, you can copy one of the folders in the repo and change it to use your components. The README explains how, and the repo also has a GitHub Actions workflow ready to use. Repository: denodell/design-system-performance-tests — The country selector and checkbox tests from this post, with a folder for each of the design systems I tested. Each one times how long the main thread stays busy and how long the UI stops responding, with the CPU slowed down by 4x. Apart from testing, I think the most useful thing you can do is make the fast behavior the default. A dropdown can switch to virtualization once its list gets long enough to go over its performance budget, and a checkbox might only animate when someone selects it directly, as I suggested for Ant Design. App teams then get the fast version without having to know the problem ever existed. “Make the fast behavior the default.” You can also write in your design system’s documentation how many items each component has been tested with, such as “the dropdown is tested with up to 500 options, and above that an autocomplete is a better fit”. To work out how many options to specify there, you can keep running the tests with more options until the dropdown goes over its performance budget. Once that limit is documented, app teams know how far they can push a component before it gets slow, and you know how many items your tests need to cover. Pages in real apps that use lots of your components are the best indicator of what to fix next, because they show how your components are really used. If you ask app teams now and then to record a profile in the DevTools Performance panel while they use those pages, and send it to you, you can see which of your components might be impacting performance. In React’s development builds, those profiles include a Components track , which is a row in the Performance panel’s timeline showing how long each component took to render. Profiling builds only show it for the parts of the app wrapped in React’s component. Web components don’t get a track like that, but I’ll cover a solution to that in a follow-up post. Each time you release a performance fix, your release notes can give the before and after measurements, such as “the dropdown now opens in 150ms with 500 options, down from 300ms”. App teams can then see exactly what got faster and check the difference in their own apps, the same way a line like “screen readers now announce the selected option” tells them what’s improved for accessibility. A design system is a foundation for the apps built with it, just like the browser is. Browser makers measure performance before every release, and it’s worth doing the same with your design system. This is the idea behind Fast by Default : building performance in from the start, instead of fixing it after users complain. My new book, Fast by Default: Practical Performance Engineering , takes this approach further, for backend and mobile code as well as the web, and explains more about how to set performance budgets and check them on every pull request. It’s in early access from Manning now. Mantine 9.7.1, built with React Ant Design 6.6.5, built with React Material UI 9.5.0, built with React React Spectrum 3.47.6, built with React Carbon 2.65.0, web components built with Lit Fluent 3.1.3, web components built with FAST, Microsoft’s web component library Web Awesome 3.14.0, web components built with Lit UI5 2.27.2, web components built with SAP’s own in-house framework Spectrum Web Components 1.12.4, web components built with Lit Ionic 9.0.7, web components built with Stencil

0 views
Unsung 3 weeks ago

Apple’s iPod recreation

Just a week ago , I bemoaned the lack of any good iPod click wheel explainers, and today the news broke about Apple Music hiding a functioning iPod on their 404 page . I am usually not a fan of easter eggs – most of them are poorly made – but this might be the best iPod recreation I’ve seen, and it’s an interesting thing to study: = 3x)" srcset="https://unsung.aresluna.org/_media/apples-ipod-recreation/1-framed.1600w.avif" type="image/avif"> Most importantly, it works well on mobile, too – well, some of the page chrome and ads feel a bit the way, but it’s not a big deal (and you can hide them using the Hide Distracting Items feature in Safari) – so you can pretend you’re holding an iPod in your hand. Worth spending a bit of time with it, especially if you have never used an iPod in your life: Kudos to whomever put this together. This is how you do easter eggs. (I tagged this as emulation , even though this is a grounds-up recreation in HTML, CSS, and JavaScript.) I think it generally covers all the modes etc. (with small exceptions) the typography looks accurate, it has the little “haptic” beeps, it has proper acceleration and the scrollbar, it has a little music library with various playlists, I have only noticed a few small bugs.

0 views
Josh Comeau 3 weeks ago

The Future of CSS ✨

Every year, browser vendors collaborate via the Interop project to synchronize their efforts on new HTML/CSS/JS features. This year, there’s a ton of super exciting features being considered! In this blog post, we’ll explore the CSS of the future, to get a glimpse of what we’ll soon be able to do.

0 views
Kev Quirk 1 months ago

Why is Pure Blog so ugly?

Someone emailed recently to tell me that they like the idea of Pure Blog, but they thought the admin interface was "really ugly" so they can't use it. Fair enough - beauty is in the eye of the beholder and all that, but I don't think that was a fair evaluation of Pure Blog's admin UI. When I built Pure Blog, I wanted it to be different from the rest of the crowd. The whole point of it was to have just enough features, and no fluff. So to me a more brutalist/utilitarian UI made sense. The likes of Grav, WordPress, Ghost, and Bludit all have similar interfaces. White and grey with blues, purples, and greens. Rounded corners etc. All very iOS-ish. All very...safe. I wanted Pure Blog to stand out from the crowd and have its own identity, and honestly, I'm thrilled with the results. Pssst. If you haven't tried Pure Blog yet, check out the demo site . But what I like may not be what you like, which is why I built Pure Blog to be very customisable from the start. You can change the fonts from mono, to sans, or serif with the click of a button, or you can change the look of the entire UI if you know some CSS. And this is what I said to the person who emailed me saying it was ugly. But they came back with... Great. Do you have any examples? I didn't! So I decided to create some examples and show them here so you can see just how customisable Pure Blog really is. I know other CMSs can customise their UI too, but unlike them, Pure Blog needs no plugins, hacks, or bullshit. This can all be done with standard Pure Blog right out of the box. So here are some examples of the Pure Blog admin UI where all I've added is custom CSS within settings. How about bringing a macOS / iOS vibe to your Pure Blog site? Or maybe you like the super clean lines of the Ghost UI? Well, you can have something similar to that too if you like: Are you a WordPress purist who really wants to be as faithful as possible to their design? Well guess what - you can have that too! Maybe you're a lover of anything Bill Gates touches. If so, a Windows theme might be more your thing. Maybe all this GUI stuff isn't your jam? Do you yearn for the days of yore when the interface to a computer was terminal-only with a monochrome CRT monitor? Well, Pure Blog can do that too: Green – the connoisseur's terminal. Or orange, the truly old-school terminal. I think these screenshots show what Pure Blog is capable of. Your imagination really is the limit. So just because you think the default look of Pure Blog is ugly, don't fret - you can easily change it to be whatever you want it to be. If you're interested in grabbing any of these themes for your Pure Blog installation, all the CSS is available over on the docs site . Thanks for reading this post via RSS. RSS is ace, and so are you. ❤️ You can reply to this post by email , or leave a comment .

0 views
Lea Verou 1 months ago

The best way to use icons in Web UIs

I’ve always had a soft spot for icons 1 . Not only do they add polish to a UI, they can also tangibly improve usability. Familiar icons help users find what they need quickly, since we recognize pictures much faster than we read words. And as a web architect at heart, the current dominant ways we have to include icons on the Web make me sad. While there are many, many different ways to include icons in a Web UI, each with different performance characteristics , by far the most common ones involve adding inline SVG to the HTML. For example, a trash icon might be included like this: Some people use a separate SVG file for sanity and include icons via , but the markup is still fairly clunky (not to mention slow, sans bundlers). All this clunkiness forces people to resort to hiding the icon under layers of abstraction, such as dedicated custom elements like or React components like , but the ugliness still ships under all these layers, and the browser still has to deal with it. Icon fonts did put icons in CSS ( is still how Font Awesome’s pseudo-element mode works), and a lot of their appeal was exactly that. But they came with a long list of issues : large downloads (even with subsetting), fallback glyphs when the font fails to load, screen readers announcing private-use codepoints, user font overrides (e.g. for dyslexia) wiping them out, and text hinting that was never designed for pictures. We threw out the baby with the bathwater: the problem was the font, not the CSS. Many of the attempts to move this to CSS still involve markup. The mask trick that most of them rely on is not new either: Chen Hui Jing covered it in 2021, and Iconify generates mask-based CSS for its entire catalog. But in all of these, which icon to use (and whether to use one at all) is still decided in the markup, via one class per icon; CSS only handles color. The closest I’ve seen is David Bushell’s 2024 post on including icons purely via CSS via generated content + masks, where the icon is picked in CSS, but every selector that wants to support icons needs its own chunk of CSS, and there is no way to override the icon on a case by case basis. I still think it’s superior to inline SVG in HTML, and it baffles me why it isn’t more popular. Per the principles outlined in my user effort article , a good icon system should: How does that translate to an icon system? Per consumers > producers , making icon usage ergonomic is more important than making icon definition ergonomic, but ideally adding a new icon to the icon system should not require much more than: And of course, it still needs to be reasonably performant — the existing success criteria don’t disappear! The dominant ways to include icons today fail to meet at least one of these criteria. Can we do better? CSS is the only web platform language that facilitates reactive aggregation : you declare what applies to what conditions (type of element, interaction state, media query, etc.) and the browser automatically applies the right styles when those conditions are met and cleanly removes them when they are no longer met, without affecting any other conditions that simultaneously apply to the element, and without forcing developers to manage any of these side effects manually. I personally think we are underutilizing this wonderful language by artificially restricting it to styling, but that’s a topic for another article. If we can nail icons via CSS, this gives us tremendous expressive power, with practically no loss of flexibility. Imagine being able to tweak icons based on… Additionally, if icons can be injected or tweaked via CSS, this means we can specify them on pseudo-elements, such as , , or , something no markup solution accommodates. Or even, imagine applying entirely different icon sets to the entire page (or a portion) without having to touch any markup! E.g. a section with a hand-drawn aesthetic could get a hand-drawn icon set, without affecting the rest of the UI. The possibilities are endless. Once you allow yourself to consider that this is possible, you will start seeing use cases everywhere. Including icons as direct s (especially with no wrapping abstraction to manage a shared registry) means there is no way to enforce consistency — anything goes. One page might use a Font Awesome trash icon, another might use a Lucide trash icon. I think the icons themselves should be a type of design token, managed by the design system, that UI components simply use, just like colors and gradients. Managing icons via CSS also allows us to define them alongside other design tokens (e.g. as CSS variables on ), rather than in a separate place. Suppose icons were CSS variables, and we could add an icon to an element simply by setting an custom property, e.g. by doing something like This means we could also make simple things easy via: while maintaining the ability to override the icon on a case by case basis by simply overridding the property. We can even adapt to state reactively: or user interaction, e.g. to communicate both where a link goes (GitHub) and what it is (an external link): And for completely ad hoc standalone icons where adding CSS would be more work than doing it inline in HTML, we can have an class: This makes it strictly more powerful than the markup approaches , with the only exception being that completely inline SVG allows potentially changing the SVG itself in arbitrary ways (e.g. morphing it into another icon or changing it dynamically as the result of user input). For those cases, we’d still need inline SVGs. But how many of your icons fall in that category? The core idea can be summarized as: Icons are inserted via pseudo-elements, which use the icon to mask a square with equal to the icon color. The referencing syntax I’ve settled on is: You could be more elaborate and also define properties like , etc, if you deem them useful! The beauty of this approach is its immense flexibility. Available icons are defined on as CSS variables, e.g.: One-off icons can still be used by setting e.g. instead of , but if most UI references registered icons, they will stand out like a sore thumb and will be easy to spot in a review. Then, to display these as icons, the crux is: For simplicity, I will only discuss / in the rest of this section, but everything applies identically to / and any additional ones. You may be wondering why I’m specifying the size twice instead of . Flex items stretch by default, and a stretched size is definite, so is ignored. Since icons so often live in buttons, and buttons are so often , an explicit is far more robust. Grid happens to be fine ( behaves as for items with an aspect ratio), but flex has no such exception. Unfortunately, you need to repeat the pseudo-element contents for every type of pseudo-element you want to be able to support icons on. Mixins will eventually fix that. As described above, this would apply to all elements, which is far from ideal! We can use a style query ( finally Baseline! 🎉 ) to restrict this to only elements with the property set: We would also need to register as non-inheriting via , otherwise any container with an icon would sprout an icon for every single descendant (including inline formatting like , etc!), which we definitely don’t want. And then just explicitly inherit them in the pseudo-element: Style queries are Baseline 2026 , which sounds quite cutting edge. However, if you look at market share, it is supported in ~93% of users’ browsers worldwide per Can I Use data. While this data under-represents old Chrome Android (it lumps all Chrome Android under its latest version), Chrome shipped style queries in 2023 (in version 111) and Chrome Mobile users do seem to upgrade pretty quickly , so the real number won’t be meaningfully lower. How is this possible? If you sort by date, you will see that all major browsers except Firefox had shipped style queries by 2024. Firefox was the last one to ship them, in May 2026. Now, let’s see the Usage relative chart: Firefox as a whole accounts for 2.28% of worldwide market share. Now, I’m not saying ignore Firefox because of its low market share! That would be a d*ck move, comparable to making UIs inaccessible because screen reader users are a minority. Some things matter more than their raw numbers might indicate , and not excluding Firefox is essential for the Web to remain open, interoperable, and not controlled solely by large companies. That said, for features that have shipped in every major browser, I think it’s defensible to take market share into account. Baseline tiers are a great …baseline, but no compact metric could possibly convey this kind of granularity. Especially for something like this, where things generally still work fine without icons, it’s a plausible strategy to treat icons as a progressive enhancement and just accept not having them in the 7% of browsers that don’t support them. For the cases where icons are crucial, (e.g. icon-only controls) we can use a class (e.g. , , , etc), so that older browsers with no style query support still get them. Then, how much you want to lean in to progressive enhancement depends on how widely you rely on the class vs the style query. You could even add other known selectors to it e.g. inline styles or known selectors with icons: Do note that unrestricted attribute selectors like that can be slow, so use them judiciously. One issue with the class approach is that it hardcodes icon presence , even if you can still tweak the icon itself via CSS custom properties. One way to deal with this is to specify a value that becomes IACVT if the custom property has no value, which would make the entire pseudo-element disappear: This will resolve to a transparent image if is defined, and to → if it is not, which will effectively remove the pseudo-element. And yes, is Baseline Widely Available . It doesn’t remove any of the other properties, so it still cannot compose with other styles, so don’t apply it so broadly it can clash with other elements that may have styles. The styles above are a start, but we can do better: Putting it all together so far, we get something like this If you’re viewing the demo in Chrome or Firefox, it should work as expected. If you’re viewing the demo in Safari, you’ll already know that it’s severely broken. My research on this resulted in filing not one, but two Safari bug reports. The good news is that all have workarounds. The bad news is that these workarounds force us into suboptimal code, and unless we’re willing to ship a different version to Safari, everyone suffers. WebKit bug #301609 was the one that really threw a spanner in the works the most for this technique: The tl;dr is if you use what I wrote above, the icons will not show up in Safari until the user interacts with them in some way (e.g. hover, focus, etc.). Thankfully, I found a CSS workaround: However, since this applies an animation to all and pseudo-elements, ideally we’d want to restrict it a bit, and make it easier to override by wrapping it in a layer. Turns out this seems to magically also fix WebKit bug #320220 , which is also relevant here. At this point our demo works almost perfectly! Can you spot the bug that remains? There are two buttons that change their icon on hover: Default icon and Github to link . The former works, the latter doesn’t. WAT?! So, there is a difference between them: sets on hover, whereas Github to link sets directly, via . And is registered as non-inheriting, which is quite relevant here. Turns out that used to not work at all in Safari until 2023 , and there are still some cases where it reproduces today. The investigation resulted in WebKit bug #325900 being filed. There are a few solutions here of which the only workable one seems to be to register the property as inherited after all, and add a style query that resets it on descendants: It’s a bit more fragile and likely slower, so ideally we’d only ship it to Safari. can only detect features, not bugs, so once more we have to resort to sniffing WebKit. Conveniently, is allowed inside conditional rules, and when a property is registered multiple times, the last registration wins: The layer means any unlayered declaration wins over the reset, even zero-specificity ones like . Putting it all together, here is the final demo, with both workarounds applied: When using icons from SVG files it’s important to remember that any relative URL will resolve relative to the CSS file that uses the icon, not the one it’s defined in . In practice, this forces you to use root-relative URLs (e.g. ), otherwise you’ll have random breakage in any nontrivial project structure. An alternative is to register the icon properties as via and specify their values via : This is also better for other reasons: The obvious downside is DX: there is a lot more boilerplate to define an icon this way. The earlier syntax can be managed by hand, even for many icons. This starts requiring a build step after a dozen or so. Additionally, registered properties are currently global and don’t work in shadow roots , so that may not fit every use case. Another option might be to go through all properties in and register them via JS: An even cleaner option, if you know which stylesheet includes the icon tokens (and it’s same-origin) is to use the CSS OM to actually edit it, so that the declarations are removed once you register the properties: Since the icon is a mask, this technique only works for monochrome icons (varied opacity is fine) — but most icons are monochrome these days anyway. If you really need more, Allegro’s engineers stack masks on the element and both its pseudo-elements, which gets you up to three colors from a single element. But what about full color icons, e.g. emojis? Or textual icons, e.g. …emojis? In theory, the technique can work fine with them, these are actually easier! For full color icons you just set them as background images, no masking required. And for textual icons, you can just set them directly on the property. The only challenge here is branching between these three. But this may be the subject of a future post, as this is already getting quite long. Since the entire pseudo-element is masked, you cannot apply a separate background or border to it. For that, you’d need an actual element (e.g. ), and you can apply the borders, backgrounds, etc to that. Completely arbitrary animation would obviously still require inline elements. But what about predefined animations? A checkmark or X being drawn, a hamburger animating to a close button, etc.? I thought I had figured out a way. And I did get so close! Close enough that the whole saga deserves its own post, so stay tuned 😉 The system above gets us pretty good DX (especially without the Safari bugs!), but some things are still not ideal. First, the masking approach does introduce some limitations it would be nice to be able to get rid of. Then, signal-to-noise ratio could be even better: And while consumers > producers, it would be really nice if adding support for new pseudo-element types did not require such a song-and-dance. A number of upcoming CSS features get us closer to this North Star . If you haven’t heard of the new CSS Linked Parameters spec, it’s the best thing that has happened to CSS icons in a long time. It allows us to pass arbitrary data to any resource that supports it (and yes, SVG is one of them), which means we can customize icons in ways that were previously impossible, such as changing the stroke width, color, or even entirely arbitrary customizations, since SVG also supports style queries. And as of a couple weeks ago, it also supports passing and without any double opt-in from the icon, which means we can use any existing icon library without it having to be updated to utilize them! There are some limitations still, but it is being actively designed, Firefox has shipped an earlier version of the spec , and is one of the top Interop 2027 proposals , so I’m quite hopeful it can make it much easier to use icons in CSS. Keep a close eye on that one! Currently, due to a technicality in how the property is handled, we have to rely on background images to include icons, because otherwise and don’t work. Even Link Parameters by itself won’t change that, it will just allow us to get rid of the masking hack. Thankfully, we (CSS WG) recently resolved on a change that will fix this! (pending compat analysis) is the CSS feature you didn’t know you were desperate for, and deserves an article of its own for its myriad of use cases in design systems. Until I write that, Bramus has a great write-up . But more relevant to icons, once is widely supported, we can construct variable names dynamically, meaning we can use plain identifiers instead of CSS variables, which will make the syntax even cleaner, meaning we’d be able to translate into at the cost of a little complexity on the producer side: Yes, it’s ugly, but it’s also an implementation detail that’s not exposed to icon consumers, so I think the tradeoff is worth it. Combined with expanded , which is getting there with only Safari remaining (Safari TP already supports it), this also unlocks ad hoc icons via a plain attribute: We recently resolved to support registering multiple properties with the same descriptors at once via , this won’t help much here, since we need different initial values. You could of course register multiple properties with the syntax and then also set their actual icons on but now you need to add each icon in two places, so I’d consider it worse than the current expanded syntax. However, another direction we are exploring in the CSS WG is a shorthand form of that would allow more compact registration. For the icon above it would look like this: Currently, we have to repeat a lot of styles between the different pseudo-elements. If we want to also have a fallback class that doesn’t depend on style queries, we need to repeat them four times! With we can just do: And then we can use them all over the place: I published a package that puts together everything from this post, polish and warts included. It contains no icons, just the icon system. You’d just include it and then you can use and in your styles. It also includes the , , and classes. It does not wrap its contents in a layer to give you maximum choice, but I’d recommend importing it in a layer anyway. @nudeui/icons There’s a small chance I may have been the first to use a web font for UI icons , in 2010. I even worked as Product Lead at Font Awesome for a bit. ↩︎ I’m using “components” here in the general sense of a reusable UI element, not in the sense of a framework component or a custom element. E.g. a styled or an would qualify. ↩︎ keep syntax close to the minimum necessary to declare intent , and make simple things easy, complex things possible, and the transition from one to the other smooth (no usability cliffs) High signal-to-noise ratio: The intent to add or override an icon is basically “icon” plus the icon name, and possibly its location (start, end, marker, etc). Anything beyond that is boilerplate. Some boilerplate is unavoidable, but most -based solutions involve unacceptable amounts of boilerplate (which is why we end up abstracting that away). Simple things should be easy: We should be able to define default icons for certain cases without having to explicitly include them at every callsite. E.g. a should automatically get a trash icon, without needing to declare it in the markup in any way, shape, or form, unless we want to override it. The default icon color should follow the local text color (or designated icon color, if different) without any additional song and dance. Complex things should be possible: We should be able to easily override the default icon for a component, either permanently or as a result of various conditions (state changes, user interaction, etc.). Styling the icon should be as easy as applying a CSS property. The minimum is color, but the more extensive styling is possible, the better. No usability cliffs: Overridding an icon, temporarily or permanently, should still not require much more than the bits of information necessary to declare intent. declaring the name of the icon, and providing the SVG path data or a URL to an SVG file Any selector, including interaction pseudo-classes ( , , etc.), e.g. to communicate additional information about the action or adapt to a different background color Media queries ( , dark mode, high contrast, etc), e.g. use different icons in dark mode, add or remove them in print, etc. Container queries Writing mode, e.g. to use a different icon for RTL text Icons are first-class design tokens stored in properties that hold values (embedded or remote) Icons are inserted via pseudo-elements. The icon is applied as a mask to a square with equal to the icon color. The system uses general CSS custom properties like , , and for flexibility and reusability. Style queries + for conditional icon insertion based on these custom properties. Low-level properties: to prepend an icon to element contents (via ) to append an icon to element contents (via ) Optionally, additional properties can redirect to other pseudo-elements, e.g. for higher level abstraction that just means “add an icon to this component”: components 2 can redirect it to any of the lower-level properties on the element itself or a descendant depending on what makes sense for that component. E.g. may set on a but on An empty pseudo-element e.g. or is used to display the icon The pseudo-element is painted as a square with A CSS masks the square in the shape of the icon ( But, but, but …browser support?!? Fear not! Masks are actually Baseline Widely Available nowadays) A CSS property ( or ) is used to specify the icon to display, instead of an ad hoc one like . This means we can set any element’s icon from any place that accepts declaration, including via inline styles Customizable color and size : Rather than hardcoding and , read them from custom properties with those as fallbacks: and (same for ). Since they inherit, you can style every icon in a subtree by setting them on an ancestor, without ever touching the pseudo-element. The prefix keeps them from colliding with the icons themselves, which are also . Preserve in forced colors mode : to keep the mask fill in forced-colors mode. will still follow the forced text color. Don’t get in the way of pointer interactions : so that it doesn’t trap clicks it shouldn’t. Don’t shrink in flex containers : . An empty pseudo-element has a zero minimum size, so in a flex button it is the first thing to shrink when the label is long, and it can shrink all the way to zero. An icon’s size is a design decision, not something layout pressure should negotiate. Vertical centering : I add to center the icons and nudge them a tiny bit upwards (our eyes weigh the space above the icon more than the space below it, so if something is perfectly centered mathematically, it will look a bit low). With a customizable size, that becomes , so that the icon’s center stays put as it grows. Spacing from text : to add a bit of space between the icon and the content ( for ). Make sure to remove it for standalone icons. Accessibility : The pseudo-element has no text, so assistive technology ignores it entirely, which is exactly what we want for an icon next to a label. Icon-only controls still need a name, and we can let the icon provide one via alternative text for generated content : , so that is announced as “Delete”. on the control itself still works, of course. There won’t be hundreds of variables in dev tools for You can even override it temporarily with another icon for a specific context, and reset it wherever via What if could work, instead of ? What if could work, instead of ? (ignoring HTML restrictions around attribute names for a bit) There’s a small chance I may have been the first to use a web font for UI icons , in 2010. I even worked as Product Lead at Font Awesome for a bit. ↩︎ I’m using “components” here in the general sense of a reusable UI element, not in the sense of a framework component or a custom element. E.g. a styled or an would qualify. ↩︎

0 views
Chris Coyier 1 months ago

Justice for CSS

Fun seeing CSS be a topic in WIRED . Pete Millspaugh shouting out some greats: One programmer recently re-created Doom in CSS . Others have used it to build holographic Pokémon cards and 3D-rendering engines . Cassidy Williams, who competed in this year’s inaugural March MadCSS tournament , built an experimental database-query engine entirely in CSS. I mean, hell yeah. Allow me to just… And I think Adam did it first!

0 views
Ahmad Alfy 1 months ago

Iframes that finally fit their content

Chrome 154 lets an iframe grow to the height of its content with one line of CSS without having to measure, without messages, and without resize scripts. But the page inside the iframe has to agree to it. That catch is the most interesting part of this feature, so this article spends some time on it. I have built many checkout pages that use a payment provider’s iframe. The goal was always to have the card form feel like part of the page. The user should not notice that it comes from another website. The iframe never helped with that. It has a fixed height. Make it too tall and you get an empty gap under the form. Make it too short and you get a scrollbar inside the page’s scrollbar. On mobile, that second scrollbar is the worst thing you can show someone who is about to pay. So I kept increasing the height, testing on different phones, and increasing it again. This is a small problem. It should have a small solution. For years it did not. The parent page cannot look inside a cross-origin iframe. It does not know how tall the content is. So the only way was to make both pages talk to each other with JavaScript. Inside the iframe, you measure the content and send the height to the parent: In the parent page, you listen, check who sent the message, and set the height: This looks short, but it hides a lot of problems: That last point did not go away with the new feature. It just moved into the browser. In the parent page, you add one CSS property to the iframe: Inside the iframe, the page opts in with a meta tag in its . It also says which websites are allowed to size it: That is all you need for content that does not change after it loads. The browser measures the content and sizes the iframe. No messages, no listeners, no origin checks in your code. The meta tag must be in the HTML from the start. Adding it later with JavaScript does not work. If the content changes later (an error message appears, a section expands, more comments load), the page inside the iframe asks the browser to measure again: So JavaScript does not disappear completely. The embedded page still calls one function when its content changes. But the hard parts are gone. The browser does all of that now. also accepts , and . For most pages, is the one you want. You can still combine it with limits like . This is the use case I care about most, and it is also the one that depends most on someone else. A payment form changes height all the time. An error appears under the card number. The user switches from card to wallet. A saved card list shows up. With , all of this could look smooth inside your checkout. But you cannot turn it on from your side alone. You control the CSS on your checkout page. The payment provider controls the page inside the iframe. Only they can add the meta tag, list the merchant sites that are allowed, and call when their form changes. So for payments, the real question is not “does Chrome support this?” It is “does my payment provider support this?” Today, most providers either ship their own postMessage script or do nothing. If you work with one, ask them. If you build one, this is a cheap win for every merchant using you. Comment sections, contact forms, newsletter sign-ups and booking widgets all have the same problem. Their height depends on the content: the number of comments, the number of fields, the validation errors. These services already control their embedded page, so adding the meta tag is easy for them. The list fits well here, because they already know which customer sites embed them. I have this exact problem on this website. My contact form is a Wufoo form inside an iframe, and I set its height by hand until it looked right. Each step of a form has a different height. Step one has two fields. Step three has ten. Today, you either reserve space for the tallest step or let the iframe scroll. With this feature, the form calls after each step and the iframe follows. This one does not need any third party. Many apps show HTML email previews, rich text previews, or code demos inside a sandboxed iframe using . Here you write the embedded HTML yourself, so you can add the meta tag directly. This is probably the easiest place to start using the feature today. Browser support. This is Chromium-only for now. Firefox and Safari do not support it yet. Keep a fixed height as the default and switch to content sizing only where it works: Inside the iframe, check before calling the new function. Your old postMessage code can stay as a fallback until support grows: Layout shift. The iframe loads after your page, then grows. Anything below it moves down. If the iframe is in the first screen, this can hurt your Core Web Vitals. A sensible reduces the jump. Do not use without a reason. Letting any site read your page’s height can leak information. For example, a page that is taller when the user is logged in tells the parent something about that user. List only the sites that need it. This works together with the CSP rule, which controls who can embed you at all. For years, a simple layout need, “make this box as tall as its content”, required two scripts on two websites that had to agree on a message format. Now it is one CSS property, one meta tag, and one function call when things change. The browser side is ready in Chrome. The rest depends on the people who build the pages we embed. If you run a payment gateway, a comments service, or any widget that lives inside an iframe, add the meta tag. Your users’ checkouts and pages will feel like they were built as one piece. I will come back to payment providers in our region specifically in a follow-up post. Width changes height. On a small screen, text wraps more and the content gets taller. Every resize or phone rotation needs a new measurement. Content arrives late. Fonts, images and error messages load after the first measurement. The height is wrong until someone measures again. Dynamic content. If the page inside the iframe shows or hides elements after the initial load, the height changes and needs to be measured again. More than one iframe. If the page has several, you need IDs in every message to know which one to resize. Both sides must cooperate. If the third party does not send its height, there is nothing you can do. You go back to guessing a fixed height. Responsive iframes in Chrome 154 , Chrome for Developers New in Chrome 154 , Chrome for Developers

0 views
Jim Nielsen 1 months ago

“Getting off the Modernization Treadmill”

My notes from this talk by Alexander Petros at Big Sky DevCon 2026 . Alex starts by noting how “modernize” used to mean something along the lines of “update this thing that was made before I was born”. But now “modernize” means something more like “update this thing from 5-10 years ago” (hence the framing of the talk, the “modernization treadmill”). Using a real-world example of an incredibly slow website that was required to access state-sponsored programs for welfare, Alex points out the disparity in conditions between those of us who make software and those who have to use them: The people who develop these websites are usually doing so on high-powered internet connections and high-powered devices, but they're not using them in the conditions that the people who most need those benefits are going to be. Then he shows a Reddit thread where somebody essentially posted, “I’m having problems with this website. I’ve been waiting for months for my application to go through. Any suggestions?” And one Reddit user responded, “The best thing you can do is go into the physical office, get a case worker, and your problems will be solved within the hour.” I guess we've come full circle now. It used to be: “Don’t talk to anybody. It’s faster and more convenient to use the website!” But now it’s: “Don’t use the website. It’s faster and more convenient to talk to somebody!” Have we failed at making websites? And is our failure, at least in part, rooted in the fact that we don’t leverage the basic tools for making websites: HTML, CSS, and (in a distant third) JavaScript? Alex goes on to argue that the technologies of the web have an ideological bent and, if used as designed, can solve so many of the performance, accessibility, and usability issues that plague so many websites. The grain of the web’s technologies are rooted in these values: Which means if you use them as intended, they are optimized to deliver outcomes rooted in those same values. So if you like those values and you want those outcomes, use the platform. Take HTML, for example. Here’s Alex: HTML does [performance improvements] for you for free. If you've coded your website in a proper, semantical, structure HTML style, it will just get better over time at zero cost to the people who built that website HTML is your friend. HTML won’t give you up or let you down . HTML will make it difficult for you to make a bad website. Write it in to the requirements of the project you’re doing that it work without JavaScript. Not necessarily that it doesn’t have any JavaScript, but just that the core functionality of the website can happen without JavaScript. If you do this […] you will find that it’s very hard to deliver a bad web page because the structure that HTML requires is one that fundamentally is good for the user, performant, and cost effective. Technologies are imbued with culture, which influences what you do and how you do it. If you can align your ideological beliefs with your technological choices, you might end up with an outcome that aligns with your values — who would’ve thought, eh? A lot of modern software developers come from websites like Facebook, they come from big tech companies [who] fundamentally have a different set of priorities. Their job is to keep you on the website as long as possible so that you consume more ads. But that’s the opposite set of requirements and priorities that the government needs to be doing, which is to build something that is clean, quick, efficient, and gets you in and out as fast as possible. So [I tell people] that the technology they use comes from [an] ideological place. But there are different ideological places that produce different technological results and if we start from those through lines then we can produce services that help people who need them. The ideological principles of the web are well established : users over everything else. If you use HTML as much as possible, you’ll make something that’s as user-friendly as possible on the web. Reply via: Email · Mastodon · Bluesky User-friendly Backwards- and forwards-compatibility Long-term viability Universal accessibility

0 views
David Bushell 1 months ago

A sustainable web career, for when all this blows over

For better or worse the web industry is going through a bit of a phase. The reasons are largely irrational. People still need the web, nothing has changed there. Regardless, the financials of this business are a struggle. Longterm career prospects are looking dicey. Because I openly reject the driving force intent on destroying my profession, and ruffle a few feathers doing so, I often get asked privately for advice from like-minded peers. I can only offer an uninspired but sensible reply: don’t quit a paying job without a fallback. Go to the Winchester, have a nice cold pint, and wait for all of this to blow over. I’m confident the situation will improve. Before it does, what can we focus on to accelerate past the intellectual slump, and better position ourselves once things calm down? For a sustainable web career, where better to look than critical skills in desperately short supply? My focus is on front-end development, but these areas of knowledge are relevant to anyone in the business of making websites. Accessibility has always been a foundation of web development but it’s never been more critical for everyone to champion it. Understand why accessibility is for everyone. Learn how to talk about accessibility in respect to real needs and practical implementation. Accessibility has unfortunately become a virtue signal for certain tech groups. (I’m told LinkedIn is rife with misinformation.) Accessibility is not a feature that can be tacked on to a website like garnish. Accessibility issues can’t be fixed with an automated process at the end. Web professionals must be able to counter this mindset by respecting accessibility in all decisions from day one. Learn and adopt the guidelines as your baseline. Speak to and test with real people. Defer to specialists who are eager for you to understand the realities. CSS is the most vibrant and evolving of the front-end standards. To architecture a good stylesheet takes deep understanding of the language features. Newer features like cascade layers and selectors that reduce specificity make this much easier. CSS has always been equipped to handle well organised styles, but developers who refuse to learn and respect the language have sought to push complexity elsewhere, using simplified abstractions or “CSS-in-JS” solutions. These are inherently limiting, lead to poor performance, and don’t actually solve the problems they claim. CSS should be hard and learning it will give you the ability to express creativity beyond cookie cutter web design. CSS skills will be highly desirable as more websites wish to stand out against the convergence of a generated aesthetic. Communication is a “soft skill” in short supply (for obvious reasons). It’s a great skill if you wish to stand out as an expert, or simply be heard amongst the noise. Learn brevity and focus on important points. Don’t be afraid to ask questions. Address concerns tactfully and early before they escalate. Don’t point fingers, but “cover your ass” — everyone on a project should be working towards the same goal, but some may be misguided in their approach. Remain positive and don’t meet negativity head-on. If you can communicate well you’ll be highly respected in your role. You probably weren’t expecting this one, but here we are. The luxury of not “getting political” has abated. Far-right political ideology is on the rise and dormant hatred is waking up in tech. The epicentre of fash-tech is Musk’s “X” with people like David Heinemeier Hansson spewing racism and abusing authority in communities to push an agenda, and Guillermo Rauch taking a selfie with a war criminal . Large tech giants like Digital Ocean are funding this power grab . Be wary of those denying this threat. If you want to avoid being pushed away from this industry, recognise and reject fascism before it comes for you. Don’t stay silent. I’ve covered topics that’ll see us well for the future, but what should we forget? Facebook’s experiment turned cargo cult is a legacy framework that still lingers, but there’s no reason to learn it today. React has entrenched itself as a lingua franca of code extruders. React code is generated faster than any human can possibly read it. Suffice it to say that despite stale job vacancies still demanding experience, React is not worth investing time. The days of high-paying React development are numbered. GitHub is now a liability. For private repositories use self-hosted git forges. I’d recommend Forgejo . One of the many Tailscale-like services is an easy way to gate remote access. Don’t make stuff public for the dead internet to attack! For CI/CD go local too, or use independent services not tied to tech giants. Take the time to learn basic commands. A little technical and infrastructure knowledge goes a long way. These people are handsome, charismatic, highly personable. I’m talking about: developer relations, youtubers, start-up founders, etc. When the tech industry met us halfway, influencers were entertaining and a good chinwag at after parties. Now the game has changed and we should not allow false narratives to dominate and dictate a closed-web future. Normal people still use the web. Incredibly few can afford to pay for the novelties that influencers peddle. Their attention economy is no longer our concern. So that’s my focus for a sustainable web career, when all this blows over. Remember that above all else: the web is a human creation for human needs. Those needs are not going anywhere. Drop the dead weight accumulated in times of prosperity. Go back to basics and position yourself well for when professional demand returns. Thanks for reading! Follow me on Mastodon and Bluesky . Subscribe to my Blog and Notes or Combined feeds.

0 views
The Jolly Teapot 1 months ago

Lazy websites

As recently as last summer, I added a new bookmark folder in Safari called “A.I. Slop”. It’s not a folder for articles I suspect to be A.I.-generated; it’s mostly about how the websites look. Some of them are actually good , fun , and useful sites . They just happen to look like every other website designed with A.I. (Claude Design, if my CSS palate identifies it correctly). You know that look. It’s been documented often, most famously in a New Yorker article that described it as a “Claudian sameness”: off-white/beige background, orange or bright green/yellow accent colour, italic serifs for titles (sometimes just partly), and spaced small-caps subtitles. And don’t forget the cute little capsule buttons, with the thin outline that does something fancy on hover. How original . This bookmark folder was initiated only as a way to document these many encounters, for future reference if you will. I’m not blaming the people behind these sites for using this style. They want something quick, something that looks good enough, so they use A.I. to do the HTML/CSS/JavaScript layout, and call it a day. I have no problem with that, but regardless, the look of a website tells a lot about the author’s intention. The excellent newsletter Weekly Thing , from Jamie Thingelstad, recently featured a new Markdown editor called Beauty, so of course it got my attention , especially with this great and on-point introduction: Feels like there are so many Markdown editors that we will end up with everyone having their own. So I visited the web page promoting this new app , and, surprise, it is another Claudian clone, and it sets one word in italics in every heading. Brilliant. Quick tip: if you want people to use your vibe-coded app and you’re telling them beauty is central to the experience — heck, the app is named Beauty after all — maybe treat your web page the same way, instead of reaching for the Calibri font-equivalent of web design. Besides, wouldn’t the audience of a new Markdown app be particularly aware of this overused Claude design? I guess it’s an OK look if you want to present something to your kid’s school or to your banker, but a Markdown editor audience? Read the room. It gets worse. This is how the app is described: A Markdown editor for people who notice things. Free, on your device, and written in plain Markdown you can read without it. I guess I’m one of the people who notice things then, and that second sentence just isn’t good, is it? Also, what is plain Markdown? Isn’t all Markdown “plain”? I guess the Claude aesthetic isn’t the only thing bothering me about this web page. I mean look at this: Machines are welcome everywhere else in the day. This is the room where you think — where a sentence gets moved four times because the fourth position is the right one, and nothing offers to finish it for you. To finish what? The sentence? Isn’t a computer a machine already? What? To me, this whole site is lazy at best. Using Claude Design for a website is OK. I think it looks bad, but who am I to judge? But using Claude Design while pretending to build a sophisticated, design-centric app? Not cool. I could maybe forgive the Claudian style if the copy weren’t so careless. This is why I have to point and laugh, Nelson Muntz style.

0 views
Takuya Matsuyama 1 months ago

Hackers and photographers

Hey, what's up? It's Takuya here. Agentic coding has become a crucial workflow these days. It has completely changed the landscape and perspective of software development, even for indie developers like me. At the same time, many of us are anxious about this drastic economic change. For most of us, this is the biggest paradigm shift we've experienced as programmers. I struggled to accept it, and it took me a long time to get through bargaining and depression. But after using Opus 5.5, I felt AI had become smart enough for me to quit writing code myself. Now I've mainly been reviewing generated code in Neovim. It will keep evolving, and I'm certain I'll be touching lines of code less and less in the future. Now, I'd like to discuss what we should learn and how we should change our mental model of programming. Also, I thought it'd be interesting to take a snapshot of my thoughts and feelings in this unique moment. There is a popular book called  Hackers & Painters  by Paul Graham . It argues that hackers are makers, like painters, rather than scientists or mathematicians. One quote beautifully describes how we built software in the pre-AI age: Like painters, we discovered things during the process: I loved sketching directly in HTML to design a website. It gave me so many ideas along the way. That's because code wasn't just the output. It was how we thought: So our code represented our thoughts, or the history of our thoughts. No wonder we got attached to it. With agentic coding, I still sketch and refine, but no longer in code. I've stopped thinking through code. Instead, I think in natural language, like English and Japanese. That's why some people say English is now the best programming language. Now you can ask your agent to build a web page, and it's done in minutes. In this process, you skip thinking about variable names, which tags to use, how the DOM should be structured, CSS properties, and so on. These were our brushstrokes. As DHH pointed out in  his keynote at Rails World 2026 , portrait-making went through the same change around 1900, when Kodak's Brownie camera made photography affordable. Anyone could get a realistic portrait cheaply, without learning to paint. Painters realized that: The same thing is happening to programming. As Nolan Lawson wrote in  his blog post : Like the painters, they needed another domain. This is a clear sign that, with AI, hackers' work has changed from painting to photography. At the same time, almost anyone can make software without knowing how to write code. Let's look at what non-professionals have been making with their new technology. Because it's so easy to build things with AI, people have been publishing a massive number of products. According to  RevenueCat's State of Subscription Apps 2026 , new subscription app launches grew from about 2,000 per month in January 2022 to over 14,700 by January 2026. Some of these apps look incredible and unique, but many are just yet another to-do app or habit tracker, and people call them AI slop. And the flood hasn't turned into revenue: apps launched before 2020 still generate 69% of subscription revenue, while apps launched in 2025 or later account for just 3%. This has been happening in photography for years. Having a good camera doesn't make you a great photographer. Your smartphone, with multiple lenses and a 48MP sensor, can take stunning AI-enhanced photos with just a few taps. My parents have iPhones too, and they take photos that just put the subject in the center (called Hinomaru-kozu/日の丸構図 in Japanese), without caring about lighting or composition. They just capture whatever is in front of them. The photos are technically sharp and well exposed, because the phone handles that. But they don't say anything. Interestingly, nobody calls these photos "photo slop", even when they're posted on Instagram for everyone to see. We're used to seeing them everywhere. People call apps "AI slop" because, until now, publishing software has mainly meant making something for other people to use. But this landscape is going to change. In a world where everyone can make software as easily as taking a photo, we'll get used to seeing tasteless apps, just as we got used to snapshots. I have no doubt my kids will enjoy making their own "apps" without knowing JavaScript or any other language, and nobody will call them slop. Then, what role do professional software developers play? I've been taking photos  since 2015 , and I also publish videos on YouTube as devaslife . If you've watched my channel, you may recognize my video style. It mainly comes from what I've learned through photography. There are still a lot of domains where you have to learn photography. For example, if you run a business and use Instagram to attract customers, you have to post "good" photos (or videos). Unlike snapshots, these are made for other people. To get photos that work for your business, you can't avoid learning shutter speed, aperture, ISO, composition, lighting, and so on, so you can get the result you want instead of relying on the defaults. On top of these skills, you'll need to develop your "taste". It's a vague concept, but  Mitchell Hashimoto  defines it as: In photography, I believe taste is knowing what makes a picture pleasing when you see one, and being able to reproduce it. It can't be measured. It's not scientific or mathematical. When you enjoy something, you have to carefully observe your mind, then decompose and analyze the feeling. Reproducing that essence is another level. It takes a lot of effort to reliably get the result you want by yourself. This is where professional software developers now have to compete. You need not only your own taste, but also the ability to reproduce it in your work as a professional. As mentioned earlier, a programming language is not for thinking of programs anymore. Your agent translates your thoughts into code efficiently. Now your job is to write out the directions. The knowledge and experience you accumulated by writing code should be articulated in natural language, so your agent can understand and apply it. You are the only one who can define the right goals, directions, issues, and questions. So, for your agent's output to reflect your taste, you need to be good at telling it what you want. Just as a 48MP sensor doesn't make you a great photographer, Opus 10 won't make you a great developer. (I've personally been doing this by taking tech notes, but that's another story.) For beginners : You are lucky. You don't have any old habits to unlearn, so you can start thinking in natural language from day one. Build as many things as possible with AI, just like taking lots of photos with a camera. Find good examples, and try replicating them, again and again. If I were a beginner, I would do that. At some point, you'll start noticing quirks you can't fix just by prompting. That's when you need to learn how things work under the hood. I didn't know anything about RAW development until I bought my first Leica, and  the photos straight out of the camera stopped satisfying me . I no longer grieve when I see my agent rewrite my code. My app is still mine, because it reflects my taste and ideas. No one can predict the future, but I feel it's time to change gears. Hackers were like painters Hackers are now like photographers Nobody calls snapshots "photo slop" Know why it feels right Articulate your taste in natural language

0 views