<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Notes From the Browser - Medium]]></title>
        <description><![CDATA[A publication about frontend development ,  the quiet bugs, the misunderstood features, and the lessons you only learn after shipping real interfaces. - Medium]]></description>
        <link>https://medium.com/notes-from-the-browser?source=rss----eae4fdbdd628---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Notes From the Browser - Medium</title>
            <link>https://medium.com/notes-from-the-browser?source=rss----eae4fdbdd628---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 18:09:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/notes-from-the-browser" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[I Never Once Questioned Using Sass. That Might Have Been the Problem.]]></title>
            <link>https://medium.com/notes-from-the-browser/i-never-once-questioned-using-sass-that-might-have-been-the-problem-6fdf061a32ef?source=rss----eae4fdbdd628---4</link>
            <guid isPermaLink="false">https://medium.com/p/6fdf061a32ef</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Mutasim Billah Toha]]></dc:creator>
            <pubDate>Wed, 01 Apr 2026 20:10:31 GMT</pubDate>
            <atom:updated>2026-04-01T20:10:31.480Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Years of muscle memory. Then one afternoon I actually stopped and asked: why?</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kuC0Vi7pvdURorrvoir6VA.png" /></figure><p>Every new project, same move. Terminal open, same three commands, Sass configured before I’d even thought about what I was building.</p><p>I didn’t decide to use Sass. I just… used it. The way you reach for your phone first thing in the morning without deciding to. It was automatic. It was muscle memory. It was just what you do.</p><p>That went on for years.</p><p>And then recently, mid-project, I found myself staring at a _variables.scss file I&#39;d just created out of habit, and something made me pause. Not a revelation. Just a small, quiet question.</p><blockquote><em>Do I actually need this?</em></blockquote><h3>I couldn’t remember the last time I asked that</h3><p>The honest answer is: I never asked it. Not once. Sass was just part of the stack the way a linter is part of the stack. You don’t debate it. You set it up and move on.</p><p>Which made sense for a long time, because the alternative was genuinely painful. Repeating the same color value in forty places. Writing magic numbers with no explanation. Managing stylesheets that turned unreadable the moment you stepped away for a month.</p><p>Sass fixed that. So I used Sass. Every time, for everything, without thinking.</p><p>The problem with never questioning something is that you also never notice when the world around it changes.</p><h3>CSS has been quietly catching up , and then some</h3><p>Variables. Nesting. Container queries. Color functions. Each one shipped and I noticed, used it a little, then kept the Sass setup running underneath out of sheer inertia.</p><p>But here’s what finally made me stop: the difference between Sass and CSS isn’t just a feature list anymore. It’s about <em>when</em> they run.</p><p>Sass is a preprocessor. It does its job before the browser ever gets involved. By the time your user loads the page, Sass is long gone. It can’t see their color scheme. It can’t see the viewport. It can’t see anything.</p><p>CSS runs in the browser. It sees everything.</p><p>That gap used to not matter much. Now it does. Native CSS functions , which are actually in Chrome prototypes right now , can contain media queries, respond to user preferences, adapt to context at render time. You can write a function that returns one value in light mode and another in dark mode, called from a single property.</p><p>Sass can’t do that. It never could. It wasn’t built to.</p><p>CSS isn’t just catching up. In the places that matter most , runtime, context, the actual user in front of an actual screen , it’s pulling ahead.</p><h3>So I sat with the question</h3><p>What am I actually getting from Sass on most of my projects?</p><p>Take the most basic example. For years I wrote:</p><pre>$primary: #4f46e5;<br><br>.button {<br>  background: $primary;<br>}</pre><p>And that felt better than repeating the hex everywhere. It <em>was</em> better. But today I write:</p><pre>:root {<br>  --primary: #4f46e5;<br>}<br><br>.button {<br>  background: var(--primary);<br>}</pre><p>Same idea. No build step. No dependency. And unlike the Sass variable, this one is live , I can update it in JavaScript, scope it to a component, override it inside a media query. The Sass version is static. This one breathes.</p><p>That’s one example, and maybe a small one. But it’s the kind of thing I was doing constantly without asking whether CSS could just handle it.</p><p>Mostly, it can.</p><p>What’s left? Loops. The ability to iterate over a list and generate utility classes from a single source of truth. That’s real, and CSS isn’t doing it. But I reach for loops maybe once every few months. For the rest, I’ve been running a whole build pipeline so I can write $primary instead of --primary.</p><p>That’s not a good trade. I’d just never looked at it that way before.</p><h3>Dropping a habit is stranger than it sounds</h3><p>I’m not writing this because I’ve switched everything over and life is perfect now. I’m writing it because the moment of realizing you’ve been doing something on autopilot , for years , is genuinely disorienting.</p><p>Not dramatic. Just strange.</p><p>Like finding out the long route you drive to work isn’t actually faster. It never was. You just picked it up once and never reconsidered.</p><p>I’m reconsidering it now. The last two projects I’ve started without reaching for Sass first. It’s been fine. More than fine. One less dependency. One less thing to configure. One less layer between me and what the browser is actually doing.</p><p>Will I ditch it entirely? Probably not. There are still cases where it earns its place , design systems with real complexity, teams that need loops and logic that CSS won’t touch.</p><p>But those cases are specific now, not assumed. I have to justify it before it goes in.</p><h3>Maybe that’s the real question</h3><p>Not “is Sass dying?” That’s a headline.</p><p>The more useful question is: <em>when did you last actually decide to use it?</em></p><p>Not reached for it. Decided. Weighed it against the alternative and made a call.</p><p>If you can’t remember deciding , there’s your answer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6fdf061a32ef" width="1" height="1" alt=""><hr><p><a href="https://medium.com/notes-from-the-browser/i-never-once-questioned-using-sass-that-might-have-been-the-problem-6fdf061a32ef">I Never Once Questioned Using Sass. That Might Have Been the Problem.</a> was originally published in <a href="https://medium.com/notes-from-the-browser">Notes From the Browser</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Date Nightmare Is Over. Temporal Just Changed JavaScript Forever.]]></title>
            <link>https://medium.com/notes-from-the-browser/the-date-nightmare-is-over-temporal-just-changed-javascript-forever-ceda1a0a775d?source=rss----eae4fdbdd628---4</link>
            <guid isPermaLink="false">https://medium.com/p/ceda1a0a775d</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Mutasim Billah Toha]]></dc:creator>
            <pubDate>Wed, 18 Mar 2026 14:53:00 GMT</pubDate>
            <atom:updated>2026-03-18T14:53:57.801Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>And yes, you should probably stop using Moment.js now.</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BFYQonOHSIM2bfKWwul5Sg.png" /></figure><p>You’re shipping a feature. Booking confirmations. A scheduling app. A simple “meeting at 3pm” kind of thing.</p><p>You write the code. It works in testing. You deploy it.</p><p>Then a user in London books a meeting and it shows up in your system as yesterday. Another user in New York gets an email for a meeting that doesn’t exist. A user in Dhaka , where there’s no DST , is somehow the only one getting the right time.</p><p>You spend three hours debugging. You find the bug. It’s Date.</p><p>It’s always Date.</p><h3>The 10-Day Mistake That Haunted Us for 30 Years</h3><p>Here’s a piece of JavaScript history that’ll make you feel things.</p><p>In 1995, Brendan Eich was given <strong>10 days</strong> to build a programming language. Ten days. He named it Mocha. It would later become JavaScript. Under pressure, he made a call that seemed perfectly reasonable at the time: port Java’s Date implementation directly into the language.</p><p>A straight copy-paste. Bugs and all.</p><p>That decision , made in a sprint, under a deadline, for a web that barely existed , is why you’re still reaching for Moment.js in 2026.</p><p>The web grew up. Date didn&#39;t.</p><p>By the time we were building banking dashboards, flight booking systems, and real-time collaboration tools that span every time zone on earth, we were still wrestling with an API built for a simpler time. An API that:</p><ul><li><strong>Mutates itself silently</strong> , you think you’re creating a new date, you’re actually destroying the old one</li><li><strong>Has zero-indexed months</strong> , January is 0, because why would it be 1?</li><li><strong>Parses ambiguously</strong> , new Date(&quot;2026-06-25 15:15:00&quot;) might give you UTC, local time, or an outright error depending on which browser you&#39;re using</li><li><strong>Rolls over silently</strong> , try to set February 31st, and it quietly becomes March 3rd. No error. No warning. Just wrong.</li></ul><p>To prove this isn’t just vibes, the State of JS survey consistently ranks <strong>date handling as the #2 pain point in the entire language</strong> , behind only the lack of static typing.</p><p>Number two. In the whole language. An API from 1995 is still the second-biggest headache for JavaScript developers in 2026.</p><h3>The Library Era: Patching a Broken Pipe</h3><p>The community did what communities do. They shipped libraries.</p><p><strong>Moment.js</strong> arrived in 2011 and felt like a revelation. Expressive API. Powerful parsing. Actual immutability support (kind of). Developers adopted it everywhere.</p><p>At peak popularity, Moment.js was being downloaded <strong>25+ million times per week</strong>.</p><p>But Moment came with its own tax: <strong>size</strong>. It can’t tree-shake its locale and timezone data , it doesn’t know which ones you’ll need at bundle time, so it ships everything. Every time. 4+ MB installed. 294KB minified. You pay that price even if you only use moment().format(&#39;YYYY-MM-DD&#39;) once.</p><p>And in 2020, the Moment.js maintainers did something remarkable: they admitted it.</p><p>They put the library into maintenance mode. No new features. They explicitly recommend against using it for new projects.</p><p>The library that saved us from Date was now itself asking to be replaced.</p><p>Date-fns came along. Luxon. Day.js. Together, these libraries pull in over <strong>100 million downloads per week</strong> , a mountain of community effort to paper over a crack in the language itself.</p><p>That crack is now finally being filled.</p><h3>What Just Shipped: The Temporal API</h3><p>In March 2026, <strong>Temporal reached Stage 4 in TC39</strong> , the final stage, meaning it’s officially part of ECMAScript. It’s shipping in ES2026.</p><p>But here’s the thing: you can use it right now.</p><ul><li>Chrome 144+: <strong>Shipped</strong></li><li>Firefox 139+: <strong>Shipped</strong></li><li>Edge 144+: <strong>Shipped</strong></li><li>TypeScript 6.0 Beta: <strong>Shipped</strong></li><li>Safari: partial (Technology Preview)</li><li>Node.js v26: coming soon</li></ul><p>This wasn’t a quick fix. It took <strong>9 years</strong> , from the first TC39 proposal in 2017 to standardization in 2026 , to get right. Bloomberg, Google, Microsoft, Mozilla, and Igalia all had engineers at the table. They rewrote the Temporal spec so many times it became the <strong>largest addition to ECMAScript in the language’s history</strong>, with over 4,500 tests in the official test suite.</p><p>For context, Date has 594 tests. Temporal has 4,496.</p><p>They were serious about getting this right.</p><h3>The Mental Shift: One API, Many Types</h3><p>The most important thing to understand about Temporal is that it doesn’t give you <em>a</em> date object. It gives you <strong>the right date object for the right situation</strong>.</p><p>This is where most people’s heads spin a little. Stick with me.</p><p>The old way: new Date() gives you one thing that tries to be everything , a timestamp, a local time, a UTC time, all at once, mutable, ambiguous.</p><p>The Temporal way: <strong>different types for different needs</strong>.</p><p>Think of it like this , a mental map before we go deep:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*STJfTNwN_uR3usJqObIfCA.png" /></figure><p><strong>Rule of thumb:</strong> User-facing times? ZonedDateTime. Storing to a DB or log? Instant. Calendar concept with no timezone? Plain*. Comparing or measuring gaps? Duration.</p><p>Now let’s see each one in action.</p><h3>Temporal.Instant , The Raw Moment in Time</h3><p>Think of this like a GPS coordinate in time. No timezone. No calendar. Just an exact point, measured in nanoseconds since the Unix epoch.</p><pre>const now = Temporal.Now.instant();<br><br>console.log(now.epochNanoseconds);<br>// 1771466342612000000n<br>console.log(now.toString());<br>// 2026-02-19T01:55:27.844Z</pre><p>Use this when you’re storing timestamps in databases, comparing events globally, or logging when something happened.</p><h3>Temporal.ZonedDateTime , The One You&#39;ll Use Most</h3><p>This is your new best friend. It’s the closest thing to a “full replacement” for Date, but it gets time zones right.</p><pre>// Old way ,  implicit timezone, mutability waiting to bite you<br>const now = new Date();<br><br>// New way ,  explicit timezone, immutable<br>const now = Temporal.Now.zonedDateTimeISO();<br>// → 2026-03-18T15:30:00+06:00[Asia/Dhaka]</pre><p>Here’s where ZonedDateTime earns its keep , Daylight Saving Time:</p><pre>// London clocks spring forward on 2026-03-29 at 1am → 2am<br>const zdt = Temporal.ZonedDateTime.from(<br>  &quot;2026-03-29T00:30:00+00:00[Europe/London]&quot;<br>);<br><br>const plus1h = zdt.add({ hours: 1 });<br>console.log(plus1h.toString());<br>// &quot;2026-03-29T02:30:00+01:00[Europe/London]&quot;<br>// Correctly skips 01:30, which doesn&#39;t exist that night</pre><p>With Date, behavior here is inconsistent across environments , you might land at 01:30 (a time that doesn&#39;t exist), get a silently wrong offset, or see different results in Node vs. the browser. The kind of bug that only surfaces in March, once a year, for users in Europe.</p><h3>The Plain Family , Wall Clock Time</h3><p>Sometimes you don’t <em>want</em> timezone awareness. A birthday. A business hour. A date on a contract. The time on the wall.</p><pre>const birthday = Temporal.PlainDate.from({ year: 1990, month: 6, day: 15 });<br>// No timezone drama needed<br><br>const lunchTime = Temporal.PlainTime.from({ hour: 12, minute: 30 });<br>// Just &quot;12:30&quot; ,  not &quot;12:30 in New York&quot; or &quot;12:30 UTC&quot;<br>const meeting = Temporal.PlainDateTime.from({<br>  year: 2026, month: 3, day: 25,<br>  hour: 14, minute: 0<br>});</pre><p>The beautiful thing here: PlainDate can&#39;t accidentally do timezone math. You can&#39;t misuse it. The type itself prevents the class of bugs.</p><h3>Temporal.Duration , Time Differences That Make Sense</h3><p>How long between two events? In the old world, you’d subtract timestamps and get a number in milliseconds, then do the math yourself.</p><pre>const start = Temporal.PlainDateTime.from(&#39;2026-02-21T09:00:00&#39;);<br>const end = Temporal.PlainDateTime.from(&#39;2026-02-22T10:30:00&#39;);<br><br>const diff = end.since(start, { largestUnit: &#39;day&#39; });<br>console.log(diff.days);    // 1<br>console.log(diff.hours);   // 1<br>console.log(diff.minutes); // 30<br>console.log(diff.toString()); // P1DT1H30M (ISO 8601 duration)</pre><p>Human-readable. Structured. No millisecond arithmetic.</p><h3>The Real Cost of moment.utc()</h3><p>Let me show you something that has bitten every JavaScript developer at least once.</p><p><strong>Moment.js (before):</strong></p><pre>const eventTime = moment.tz(&#39;2026-03-05T15:00-05:00&#39;, &#39;America/New_York&#39;);<br>const londonTime = eventTime.clone().tz(&#39;Europe/London&#39;); // clone is REQUIRED<br><br>// Forget the clone and you get this:<br>const eventTime = moment.tz(&#39;2026-03-05T15:00-05:00&#39;, &#39;America/New_York&#39;);<br>const londonTime = eventTime.tz(&#39;Europe/London&#39;); // ← mutates eventTime!<br>console.log(eventTime.format(&#39;h:mm a z&#39;)); // 8:00 pm GMT <br>// That&#39;s WRONG. eventTime should be 3:00pm EST.</pre><p>This bug , forgetting .clone() before .tz() , has caused real production incidents. I&#39;ve seen it in codebases at multiple companies. It&#39;s subtle. It passes code review. It surfaces in user reports.</p><p><strong>Temporal (after):</strong></p><pre>const instant = Temporal.Instant.from(&#39;2026-03-05T15:00-05:00&#39;);<br>const eventTime = instant.toZonedDateTimeISO(&#39;America/New_York&#39;);<br>const londonTime = eventTime.withTimeZone(&#39;Europe/London&#39;); // always returns NEW object<br><br>console.log(eventTime.toLocaleString());  // Mar 5, 2026, 3:00:00 PM EST<br>console.log(londonTime.toLocaleString()); // Mar 5, 2026, 8:00:00 PM GMT</pre><p>eventTime is untouched. Always. By design. You can&#39;t mutate it even if you try.</p><h3>Calendars Are a First-Class Citizen Now</h3><p>This one doesn’t get enough attention.</p><p>The world doesn’t run on the Gregorian calendar alone. The Hebrew calendar, the Islamic calendar, the Persian calendar, the Japanese imperial calendar , these matter to billions of people, and JavaScript has always treated them as formatting afterthoughts.</p><p>With Temporal, calendar arithmetic is actually correct:</p><pre>// Old way: format looks right, math is wrong<br>const legacyDate = new Date(2026, 2, 11); // March 11<br>legacyDate.toLocaleDateString(&quot;en&quot;, { calendar: &quot;hebrew&quot; }); // &#39;22 Adar 5786&#39;<br>legacyDate.setMonth(legacyDate.getMonth() + 1); // adds a Gregorian month<br>legacyDate.toLocaleDateString(&quot;en&quot;, { calendar: &quot;hebrew&quot; }); // &#39;24 Nisan 5786&#39;<br><br>// New way: arithmetic is calendar-aware<br>const today = Temporal.PlainDate.from(&quot;2026-03-11[u-ca=hebrew]&quot;);<br>const nextMonth = today.add({ months: 1 }); // adds a Hebrew month<br>nextMonth.toLocaleString(&quot;en&quot;, { calendar: &quot;hebrew&quot; }); // &#39;22 Nisan 5786&#39;</pre><p>The result lands on day 22 of the next month, not day 24. Because one Hebrew month isn’t the same length as one Gregorian month.</p><p>For anyone building apps for users outside Western defaults, this is enormous.</p><h3>The Honest Cons (Because There Are Some)</h3><p>Temporal isn’t perfect. Let’s be real about the trade-offs.</p><p><strong>It’s more verbose.</strong> Moment’s moment().format(&#39;MM/DD/YYYY&#39;) is genuinely more concise than Temporal&#39;s date.toLocaleString(&#39;en-US&#39;, { month: &#39;2-digit&#39;, day: &#39;2-digit&#39;, year: &#39;numeric&#39; }). If you&#39;re writing quick scripts, you&#39;ll miss the terseness.</p><p><strong>Parsing is strict.</strong> Moment will try to guess what you mean. Temporal will throw a RangeError. This is <em>correct behavior</em>, but it means you&#39;ll need to normalize non-ISO strings before passing them to Temporal , more work upfront.</p><pre>Temporal.PlainTime.from(&#39;9:00&#39;);       // RangeError<br>Temporal.PlainTime.from(&#39;09:00:00&#39;);   // Correct</pre><p><strong>The polyfill has a cost.</strong> If you need Safari support today, you’ll reach for @js-temporal/polyfill. At 154KB minified (44KB gzipped), it&#39;s still smaller than Moment, but it&#39;s not zero , and it&#39;s currently in alpha.</p><p><strong>The type system takes getting used to.</strong> Choosing between Instant, ZonedDateTime, PlainDateTime, and PlainDate is genuinely confusing at first. The right mental model is: start with ZonedDateTime for everything user-facing, Instant for everything stored or logged, and Plain* types for anything that should be calendar-context-free.</p><p><strong>No custom format strings.</strong> Moment’s &#39;MMM Do YYYY, h:mm:ss a&#39; doesn&#39;t translate directly. Temporal leans on the Intl.DateTimeFormat API, which is locale-aware and beautiful , but if you need something like &quot;Q1 2026&quot; or a bespoke format, you&#39;re writing custom code.</p><h3>Should You Migrate Moment.js Right Now?</h3><p>Honest answer: <strong>not necessarily today, but start planning.</strong></p><p>If you’re starting a new project: use Temporal with the polyfill for Safari. The polyfill is smaller than Moment. Your future self will thank you.</p><p>If you have an existing Moment.js codebase: don’t panic-migrate. The key operations map cleanly:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m4hmoeAhq9EIV0iwbxlYvw.png" /></figure><p>Migrate the critical paths first , anywhere you’re doing timezone math, date arithmetic for billing or scheduling, or anything calendar-adjacent. Those are where Moment’s footguns are loaded.</p><h3>What Makes This Different</h3><p>I’ve been around long enough to be skeptical of “the new library/API that fixes everything.” JavaScript history is full of them.</p><p>But Temporal feels different. Not because it’s clever , it is , but because of <em>how</em> it got here.</p><p>This took 9 years. Not because the engineers were slow. Because they refused to ship something that would create the next generation of Date bugs. They had Bloomberg engineers handling nanosecond-precision timestamps across financial markets. Google&#39;s internationalization team ensuring calendar arithmetic was right for billions of users. Mozilla and V8 teams actually implementing it in engines. An independent contributor who&#39;d watched startups waste thousands of engineering hours on timezone bugs.</p><p>They even built a shared Rust library , temporal_rs , that multiple JavaScript engines now use, so the behavior is consistent everywhere. That&#39;s basically unprecedented in the history of how TC39 proposals get implemented.</p><p>The result is an API that makes the pit of success <em>the easy path</em>. You can’t accidentally mutate a Temporal.ZonedDateTime. You can&#39;t silently get UTC when you meant local time. If you give it garbage input, it throws. If your code runs, you can trust the dates.</p><h3>The Line That Stuck With Me</h3><p>From <a href="https://bloomberg.github.io/js-blog/post/temporal/"><strong>Bloomberg’s</strong></a> writeup on the journey:</p><blockquote><strong><em>“After nearly 30 years, JavaScript finally has a modern datetime API. And this time, we got it right.”</em></strong></blockquote><p>That’s not marketing. That’s the exhaustion and pride of people who spent nearly a decade making sure that when you write const now = Temporal.Now.zonedDateTimeISO(), you get exactly what you asked for.</p><p>No surprises. No midnight bug reports about the wrong month. No .clone() before every mutation.</p><p>Just time. Working correctly.</p><p>Think about what that sentence actually means.</p><p>If Temporal had existed in 2005, thousands of production incidents would never have happened. Millions of debugging hours , yours, mine, everyone’s , would never have been spent. Entire libraries like Moment.js, date-fns, and Luxon would never have needed to exist. The 100 million weekly downloads of datetime libraries? That’s 100 million weekly symptoms of a language-level wound.</p><p>That’s how deep this change goes.</p><p>It’s not just a new API. It’s the closure of a 30-year chapter of JavaScript history. A 10-day sprint in 1995 created a debt that the entire ecosystem has been paying ever since. That debt is now, finally, settled.</p><p><strong>Go open DevTools right now.</strong> Chrome and Firefox ship Temporal natively. Type Temporal.Now.zonedDateTimeISO(). Watch it work.</p><p>Then think about how many hours of your career you’ve spent on date bugs.</p><p>That’s the real number. That’s what just changed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ceda1a0a775d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/notes-from-the-browser/the-date-nightmare-is-over-temporal-just-changed-javascript-forever-ceda1a0a775d">The Date Nightmare Is Over. Temporal Just Changed JavaScript Forever.</a> was originally published in <a href="https://medium.com/notes-from-the-browser">Notes From the Browser</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The npm Browser That 105 Strangers Built in 16 Days]]></title>
            <link>https://medium.com/notes-from-the-browser/the-npm-browser-that-105-strangers-built-in-16-days-4415bbb899c4?source=rss----eae4fdbdd628---4</link>
            <guid isPermaLink="false">https://medium.com/p/4415bbb899c4</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[npm]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Mutasim Billah Toha]]></dc:creator>
            <pubDate>Fri, 06 Mar 2026 17:11:33 GMT</pubDate>
            <atom:updated>2026-03-06T17:12:07.383Z</atom:updated>
            <content:encoded><![CDATA[<h4>One question on Bluesky. 49 pull requests in 24 hours. Meet the npm browser developers actually wanted.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LYeTGUhhkgKKN7fQ_k3-0w.png" /></figure><p>You open npmjs.com to check a package. You want install size. Module format. Whether it still works with the latest version of your stack. Whether the maintainer is still alive.</p><p>None of that is there. Or it’s buried. Or it’s wrong.</p><p>So you open four other tabs, cobble together an answer, and wonder why this is still such a mess in 2026.</p><p>That frustration is exactly what started npmx.</p><h3>It Started With a Question on Bluesky</h3><p>On January 22nd, 2026, Daniel Roe , open-source maintainer and leader of the Nuxt core team , made the first commit to a new repository. The next day, he posted on Bluesky asking a simple question: what are your biggest frustrations with the npm experience?</p><p>The responses poured in. Code browsing. Missing data. No trust signals. Dependency visibility. The general friction of publishing.</p><p>People weren’t just complaining. They wanted to help build something better.</p><p>Within 24 hours, 49 pull requests had been opened. Two weeks later, the community had contributed 1,000 issues and PRs , roughly one every 20 minutes, around the clock. With over 105 contributors and 1,500 stars in just 16 days, npmx became one of the most active early open-source projects in recent memory.</p><p>That’s not a product launch. That’s a nerve being hit.</p><h3>What npmx Actually Does</h3><p>npmx is a fast, modern browser for the npm registry. And “modern” here isn’t just aesthetic , it means the information you actually need is right there, no tab-switching required.</p><p>When you look up a package, you get:</p><ul><li><strong>Install size</strong> , before you commit to the dependency</li><li><strong>Module format</strong> , ESM, CJS, or both</li><li><strong>Outdated dependency warnings</strong> , so you know what you’re inheriting</li><li><strong>JSR cross-reference</strong> , for packages also available on JSR</li><li><strong>Version range resolution</strong> , no more mental math</li><li><strong>Performance recommendations</strong> , powered by the e18e project</li></ul><p>Here’s what that looks like in practice. This is the recharts package page on npmx:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fqWTCTd3S82Oz_YDRc1Nlg.png" /></figure><p><em>Everything you’d normally hunt across four tabs , in one place.</em></p><p>In a single view you can see the install size (6.4 MB / 20.7 MB unpacked), that it supports both ESM and CJS, has TypeScript types, zero known vulnerabilities, 11 direct dependencies out of 37 total, Node.js ≥18 compatibility, and a weekly download trend of nearly 17 million. The version history panel on the right tells you which release is latest, which is beta, which is alpha , all without clicking anywhere.</p><p><strong>That’s the whole point. Information density, zero friction.</strong></p><p>You can launch StackBlitz or CodeSandbox directly from a package README. You can compare packages side by side. There are social features , likes, community signals , because the people behind packages matter too.</p><p>npmx is available in 19 languages, has light and dark mode, and is designed to be keyboard-friendly throughout.</p><p>That last part is more significant than it sounds. We’ll get to it.</p><h3>The Thing That Made It Grow So Fast</h3><p>Speed matters. Features matter. But there’s something else here.</p><p>From the start, npmx prioritized accessibility, internationalization, and working in the open. This attracted people who care about those things , and who are good at collaborating because of it. The result is a genuinely diverse, global community.</p><p>This is the part that most open-source projects get backwards.</p><p>Most projects build the thing, then bolt on accessibility. Add i18n when someone asks. Open up contributions after the architecture is settled. By then, the culture is already set , and it usually excludes the people who care most about inclusion.</p><p>npmx started with those values on day one. And the community it attracted reflects that.</p><p>Developer Abbey Perini, who joined the project after it caught her eye on Bluesky, wrote about what she found when she opened her first pull request: automated accessibility tests already running. A dedicated accessibility channel. Other contributors already making sure interactive elements were built correctly. She didn’t have to justify why any of it mattered.</p><p>For anyone who’s spent years being the lone accessibility advocate on a team, that’s not a small thing. That’s the whole thing.</p><h3>Why “Keyboard-Friendly Throughout” Is a Design Statement</h3><p>It’s easy to say a product is accessible. It’s harder to build it that way from the start.</p><p>The npmx team treats accessibility as architecture, not afterthought. That means:</p><ul><li>Automated a11y testing baked into the pull request workflow</li><li>Accessibility experts tagged into conversations <em>before</em> issues ship, not after</li><li>Dedicated space in the community for accessibility discussion</li><li>Components designed to enforce accessible behavior by default</li></ul><p>The “keyboard-friendly throughout” in their feature list isn’t a checkbox. It’s a signal about how the team thinks. When you can navigate an entire product with a keyboard, it means landmark regions were done right, focus management was thought through, and skip links actually work.</p><p>Most developer tools fail this test. npmx treats it as baseline.</p><h3>Open Source Done Right, Not Just Done Fast</h3><p>Things moved fast. But speed without culture usually produces a mess.</p><p>What’s interesting about npmx isn’t just the velocity , it’s what the velocity reveals. When 105 contributors show up in 16 days, you learn a lot about what kind of project you’ve built. Did people feel welcome? Was the onboarding clear? Were contributions respected or ignored?</p><p>The answer, based on what contributors have written and said: yes, yes, and yes.</p><p>The project ran in public from the start. Issues were open, discussions were visible, and no contribution was too small. First-time open-source contributors shipped code alongside experienced maintainers. The community didn’t form around the product , the community <em>is</em> the product.</p><p>The npmx team didn’t think this happened by accident. Neither do I.</p><h3>It’s Still Alpha. That’s the Point.</h3><p>npmx launched its alpha on March 3rd, 2026. The team is explicit: this is intentionally early.</p><p>Right now they’re building for their peers , open-source developers who work with packages daily and are willing to try something early and say what’s working and what isn’t. That feedback is how they’ll get to beta.</p><p>This is the right instinct. The worst thing that can happen to a project with real momentum is shipping a polished v1 that nobody helped shape. Real feedback, messy and early, is worth more than clean silence.</p><p>The npmx team wants to hear what’s broken. They want PRs. They want people who’ve never contributed to open source before to show up anyway.</p><h3>Go Try It</h3><p>If you work with npm packages , and if you’re reading this, you probably do , npmx is worth your time right now.</p><p>Not because it’s finished. Because it’s the browser you’ve wanted for years, being built by people who are doing it right, and they want your help deciding what “right” actually looks like.</p><p>Go search a package at <a href="https://npmx.dev/">npmx.dev</a>. See the install size before you commit. Check the module format without opening three other tabs. Notice that you can do everything with a keyboard.</p><p>Then go tell them what’s missing. That’s how this works.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4415bbb899c4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/notes-from-the-browser/the-npm-browser-that-105-strangers-built-in-16-days-4415bbb899c4">The npm Browser That 105 Strangers Built in 16 Days</a> was originally published in <a href="https://medium.com/notes-from-the-browser">Notes From the Browser</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What “Stable CSS” Means in 2026 Just Changed]]></title>
            <link>https://medium.com/notes-from-the-browser/what-stable-css-means-in-2026-just-changed-fbbe1601fbee?source=rss----eae4fdbdd628---4</link>
            <guid isPermaLink="false">https://medium.com/p/fbbe1601fbee</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Mutasim Billah Toha]]></dc:creator>
            <pubDate>Sun, 01 Mar 2026 20:24:48 GMT</pubDate>
            <atom:updated>2026-03-01T20:24:48.612Z</atom:updated>
            <content:encoded><![CDATA[<h4>The quiet document that redraws the boundary between shipping and official.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hl1PoNA4nO4M9boo0-Y0KQ.png" /></figure><p>I was scrolling through a W3C feed last week , the kind of thing you do when you’re procrastinating on something harder , and I noticed a new <a href="https://www.w3.org/TR/2026/NOTE-css-2026-20260226/"><strong>document</strong></a> had been published. It was dated February 26, 2026. It was called the CSS Snapshot 2026. It was published as a Group Note, not a Recommendation, which is a distinction that matters more than it sounds.</p><p>I bookmarked it. Went back to what I was doing. Came back to it an hour later.</p><p>I thought it was a routine maintenance document.</p><p>The W3C publishes these periodically , snapshots of what CSS “officially is” at a given point in time. They’re administrative artifacts as much as technical ones. I’ve read previous editions and found them useful but unremarkable.</p><p>Then I started reading this one carefully, and I realized it was doing something the previous snapshots hadn’t quite done:</p><h4>It was drawing a very precise, slightly uncomfortable line between what CSS is and what CSS is becoming.</h4><p>That line is not where most working developers think it is.</p><h3>A Quick Refresher: What’s a CSS Snapshot?</h3><p>The W3C CSS Working Group publishes CSS not as a single monolithic specification , that ended with CSS2 , but as a collection of independent modules, each at its own level of maturity.</p><p>Selectors Level 4.<br>Grid Layout Level 2. <br>Color Level 5.</p><p>Each moves through a defined progression: Working Draft, Candidate Recommendation, Recommendation.</p><p>The CSS Snapshot exists to answer a single practical question:</p><h4>if you had to say “this is CSS” at this moment in time, what would you point to?</h4><p>It classifies modules into roughly <strong>five</strong> tiers: stable and official, reliably implemented at Candidate Recommendation, fairly stable but thin on real-world testing, rough interoperability across browsers, and explicitly safe-to-ship pre-CR exceptions.</p><p><strong>That last category is the interesting one.</strong> It’s a list of features the CSS Working Group has said:</p><p><strong>yes, implement this now, don’t wait for the standards process to complete.</strong></p><p>The 2026 snapshot just published that list. It’s longer than you’d expect.</p><h3>What the Snapshot Actually Contains</h3><p>The official stable core of CSS in 2026 is essentially what you’d expect if you’d been paying attention for the last decade. CSS2 (still the backbone). Selectors Level 3. Flexbox Level 1. Grid Level 1. Custom Properties Level 1. Color Level 4. Transforms Level 1. These are the settled, interoperable, don’t-worry-about-it pieces.</p><p>But the snapshot is not really about those.</p><p>What’s worth reading is the Reliable Candidate Recommendations tier, which in 2026 includes Grid Level 2 , meaning subgrid , along with Cascade Level 5, which introduced cascade layers. These were both features that generated significant skepticism when they were proposed.</p><p><strong>Cascade layers </strong>especially: the reaction from a large portion of the developer community in 2021 and 2022 was roughly “why would anyone need this.” <strong>By 2026, they’re in the stable-ish tier of the official snapshot.</strong> That happened fast.</p><p>Media Queries Level 4 is also in this tier. That means the full range of modern media feature syntax , not, and, or, range comparisons like (width &gt;= 600px) , is now considered reliably implemented. Browsers have shipped it. It works. The snapshot is formally acknowledging that.</p><p>Then there’s the “Fairly Stable” tier, which includes View Transitions Level 1. That one is worth stopping on.</p><h3>The View Transitions Situation</h3><p>View Transitions hit Chromium-based browsers in 2023. <br>Safari shipped them in 2024. <br>Firefox added partial support shortly after.</p><p>By early 2026, you have a feature that started as a Chrome experiment and has now been formally included in the W3C CSS Snapshot as a fairly stable module.</p><p>The time from initial browser experiment to official snapshot inclusion is getting shorter.</p><p>That’s not a coincidence. It reflects a deliberate W3C strategy to reduce the friction between “browsers ship something” and “W3C acknowledges it exists.” The older model, where a feature might ship in browsers in 2015 and show up in a Recommendation in 2021, produced years of ambiguity where developers were using things that technically weren’t “official CSS.” That ambiguity was bad for everyone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bAzATyKFQxA_h2LUEKrajA.png" /></figure><p>The 2026 snapshot is trying to close that gap. The inclusion of View Transitions in the fairly-stable tier , alongside the explicit safe-to-release pre-CR exceptions list , signals that the working group is more comfortable moving quickly than it used to be.</p><h3>The Safe-to-Release List Is Longer Than You Think</h3><p>This is the part most developers skip, and they shouldn’t.</p><p>The CSS Snapshot 2026 includes an explicit list of features the working group has cleared for broad release before they’ve formally completed Candidate Recommendation. This is the W3C saying: we know the process hasn’t finished, but we’re confident enough in these features that we’re telling implementers to ship them anyway.</p><blockquote><em>In practical terms, “safe-to-release” means the CSS Working Group considers a feature mature enough for browser vendors to ship unprefixed in production, even though it hasn’t formally completed the Candidate Recommendation stage.</em></blockquote><p>The 2026 list includes :has(), :is(), and :where() pseudo-classes. It includes color-mix(). It includes relative color syntax. It includes text-box-trim and text-box-edge, the properties that finally give typographers meaningful control over the space between text and its container. It includes the env() function, including safe area insets for notched devices. It includes aspect-ratio. It includes translate, rotate, and scale as individual properties.</p><p>Most of these are already widely used. The list feels like formal permission for something that was already happening.</p><p>But that’s the point. The formalization matters. When a feature is on this list, browser vendors can ship it unprefixed with the working group’s explicit blessing. When it’s not on this list, there’s ambiguity , is this a vendor experiment, or is this approaching settled CSS?</p><p>The 2026 snapshot has the longest safe-to-release list of any previous snapshot I can find. That’s a statement about the pace of the field.</p><h3>This Is Where It Gets Weird</h3><p>I write CSS. I’ve written it for a long time. I can tell you, with some confidence, when the profession of “CSS developer” stopped being unusual and became expected. It was roughly when Flexbox shipped reliably across browsers , somewhere between 2015 and 2017, depending on what you were building and who your users were.</p><p>That convergence took years because the standards process was slow and browser implementations were inconsistent. You used to have to prefix things. You used to have to write fallbacks. You used to have to test in browsers that disagreed with each other about what a feature meant.</p><h4>The 2026 snapshot is evidence that this is not the normal timeline anymore.</h4><p><strong>Subgrid</strong> , a feature that required rethinking how grid tracks propagate through nested elements, a genuinely hard problem , went from proposal to fairly stable implementation in most major browsers in roughly <strong>four years</strong>. View Transitions, which involves capturing and animating the state of arbitrary DOM subtrees across navigation events, shipped across all major browsers within about two years of its initial Chrome release.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vQksJpmsCCXOOlGq.png" /><figcaption>Generated by AI</figcaption></figure><p>:has(), the relational pseudo-class that the CSS Working Group explicitly said for years it couldn&#39;t specify in a performant way, shipped. It&#39;s in the safe-to-release list. Browsers figured out how to make it fast enough.</p><p>The stuff that was supposed to be too hard is not taking as long as the stuff that was supposed to be easy used to take.</p><h3>The Numbers</h3><p>CSS Color Level 4 defines support for wide-gamut color spaces , Display P3, Rec. 2020, Lab, LCH, OKLab, OKLCH. As of the 2026 snapshot, this is in the stable official definition of CSS. That means web developers can now specify colors in a gamut that covers roughly 50% more of visible light than sRGB.</p><p>The photography industry spent decades building workflows around wide-gamut color. Web developers got it in a standards snapshot after a few years of module development.</p><p>CSS Grid Level 2, with subgrid, is in the reliable tier. A feature that allows child elements to participate in the grid tracks of their parents , something web developers had been hacking around with JavaScript for years , is now reliably implemented across browsers and formally acknowledged as stable-ish by the W3C.</p><p>The text-box-trim and text-box-edge properties , on the safe-to-release list , address something typographers have been complaining about for the entire history of CSS: that the default spacing around text is determined by font metrics that are invisible to authors. These properties expose control over the &quot;half-leading&quot; above and below text. A design problem that has existed since before I started writing CSS is now on the W3C&#39;s formally-cleared-to-ship list.</p><h3>What Stays Hard</h3><p>The snapshot is honest about its own limitations, which is part of what makes it worth reading.</p><p>The “<strong>Rough Interoperability</strong>” section , the bottom tier , includes CSS Transitions and CSS Animations, which have been widely deployed for years but still have unresolved specification details. They’re in browsers. They mostly work. The spec still has gaps. The snapshot acknowledges both things simultaneously.</p><p>The snapshot explicitly notes that profiles , defined subsets of CSS for specific classes of user agents , have been discontinued. The working group tried to define minimal subsets of CSS that printers, screen readers, and other non-browser environments should implement. It didn’t work. The profiles became unmaintained. <strong>The 2026 snapshot formally removes them</strong>.</p><p>The document also notes that the <strong>W3C process is designed to be slow in specific ways</strong>. The Candidate Recommendation stage requires two correct, independent implementations of each feature. The Recommendation stage requires the Advisory Committee to approve. These gates exist for good reasons. The snapshot is not replacing this process , it’s adding a parallel track for features that are moving faster than the process can accommodate.</p><p>The <strong>safe-to-release</strong> list is not a replacement for the standards process. It’s an acknowledgment that the standards process was designed for a different velocity than the one browsers currently operate at.</p><h3>What This Actually Changes</h3><p>The formal division of CSS into stable and unstable, official and experimental, safe-to-ship and speculative, has always existed. What changes with each new snapshot is where specific features fall in that division.</p><p>The 2026 snapshot moves a lot of things from experimental to stable. It does this in a year where @layer, :has(), color-mix(), text-box-trim, View Transitions, and wide-gamut color are not theoretical features but things developers are using in production codebases.</p><p>What this actually changes, practically: <strong>browser vendors have cleaner guidance about what to ship unprefixed</strong>. Developers have cleaner guidance about what to depend on in production. Linting tools, documentation projects, and educational resources now have a formal citation for what CSS is in 2026.</p><p>Less visibly: the gap between “browsers implement it” and “the W3C acknowledges it” is narrowing. That gap used to be a site of real confusion. Developers would ship features the W3C hadn’t blessed, browsers would change behavior as specifications evolved, stylesheets would break in subtle ways. The snapshot mechanism is one attempt to manage that confusion more systematically.</p><p>It doesn’t eliminate the confusion. It maps it.</p><h3>Where This Breaks</h3><p>A few things worth being clear-eyed about.</p><p>The snapshot describes what is, not what works everywhere.</p><blockquote><strong>A feature being in the official stable tier doesn’t mean every user is running a browser that supports it</strong>.</blockquote><p>Legacy environments exist. Corporate intranets run old browsers. If your user base skews toward low-powered devices on older mobile OS versions, some of these “stable” features will still require fallbacks.</p><p>The safe-to-release list is not a promise. The working group explicitly says features on this list are cleared for broad release but may still change before their specifications reach Candidate Recommendation. In exceptional cases, syntax or behavior could shift. The history of vendor prefixes exists precisely because this happened at scale in a previous era of the web.</p><p>The snapshot also doesn’t cover the JavaScript side of CSS. CSSOM , the CSS Object Model, the APIs that let JavaScript read and manipulate stylesheets , is in the rough interoperability tier. The spec is present. Implementation details across browsers still diverge in places. Houdini, the set of lower-level CSS APIs that would let developers hook into the browser’s styling, layout, and paint engines directly, barely appears in the snapshot at all. That work is ongoing and fragmented across different modules at different maturity levels.</p><p>The snapshot tells you where CSS the declarative language is. It is less informative about CSS the programmatic surface.</p><h3>An Observation About Pace</h3><p>I keep coming back to the safe-to-release list, because it’s the part of the document that feels most like a symptom of something larger.</p><p>The CSS Working Group is a body that operates by consensus among browser vendors, independent experts, and representatives from companies with stakes in how the web works. It moves deliberately. The fact that it has published a safe-to-release list at all , that it has created a mechanism for saying “yes, ship this before the process finishes” , suggests the process designers recognized that browsers were moving faster than specification work could track.</p><p>The 2026 list includes features that address typography, color science, layout, animation, element state, and environmental conditions of the device. That’s a wide surface area of CSS to be formally pre-cleared for shipping.</p><p>The web is not slowing down to wait for its specifications to catch up. The specifications are adapting to acknowledge that.</p><p>I came back to this document three times before writing about it. It’s published as a Group Note, which is W3C terminology for a document that is informative rather than normative , it describes a state of affairs rather than mandating one. It has no binding authority. Browsers don’t have to follow it.</p><p>And yet it’s the closest thing the field has to an official answer to “what is CSS in 2026.” The working group wrote it. The major browser vendors participate in the working group. The features on the safe-to-release list are on that list because the people building the browsers agreed they should be.</p><p>This is a document that isn’t supposed to matter much, published without fanfare, on a W3C URL that looks like every other W3C URL. I’ve read it more carefully than I’ve read most things published this year.</p><p>This is how CSS works. Quietly, through consensus, in documents most developers never read. And then one day you open a browser and the feature is just there, stable, unprefixed, and you can’t quite remember when it arrived.</p><p>The 2026 snapshot is the paper trail for that feeling.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fbbe1601fbee" width="1" height="1" alt=""><hr><p><a href="https://medium.com/notes-from-the-browser/what-stable-css-means-in-2026-just-changed-fbbe1601fbee">What “Stable CSS” Means in 2026 Just Changed</a> was originally published in <a href="https://medium.com/notes-from-the-browser">Notes From the Browser</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your CSS Is a Crime Scene. Here’s How to Stop Making It Worse.]]></title>
            <link>https://medium.com/notes-from-the-browser/your-css-is-a-crime-scene-heres-how-to-stop-making-it-worse-b14194f7ff98?source=rss----eae4fdbdd628---4</link>
            <guid isPermaLink="false">https://medium.com/p/b14194f7ff98</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[front-end-development]]></category>
            <dc:creator><![CDATA[Mutasim Billah Toha]]></dc:creator>
            <pubDate>Sat, 21 Feb 2026 17:57:28 GMT</pubDate>
            <atom:updated>2026-02-21T17:57:28.077Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>How </em><em>!important, Magic Numbers, and z-index Wars Are Slowly Destroying Your Codebase</em></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DamD7MSxFZEdBKwkRRQ_Zg.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@silverkblack?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Vitaly Gariev</a> on <a href="https://unsplash.com/photos/man-rubbing-his-face-in-front-of-laptop-bl7h_R-PKpU?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>You open a colleague’s stylesheet for the first time.</p><p>Line 17: margin-top: -23px; <br>Line 112: z-index: 99999; <br>Line 203: color: red !important !important ,</p><p>wait, is that two !importants?</p><p>You scroll. It keeps going. Every bad habit you’ve ever been warned about, alive and thriving, stacked on top of each other like a structural disaster waiting for one font-size change to trigger a full collapse.</p><p>Here’s the uncomfortable part: you’ve written this file too. Maybe not this exact one. But something close.</p><p>CSS bad practices aren’t a beginner problem. They’re a <em>pressure</em> problem. Deadlines hit, something breaks at 4pm, and suddenly !important feels like a totally reasonable life choice. The issue is that each shortcut leaves a trap for the next person , and that person is usually future you, six months later, completely baffled by your own code.</p><p>Let’s talk about the habits that are quietly wrecking your stylesheets. And how to actually fix them.</p><h3>The !important Addiction</h3><p>Here’s how it starts.</p><p>You write a perfectly reasonable rule. It doesn’t apply. You inspect the element, see four other rules fighting over the same property, can’t figure out which one is winning, and type !important because you need this fixed <em>right now.</em></p><p>The button turns red. You ship. Done.</p><p>Except you’ve just set a trap.</p><p>The whole point of CSS is its cascading nature , styles inherit, build upon each other, and resolve conflicts through a clear set of rules based on specificity and source order. When you slap !important on something, you don&#39;t fix the conflict. You nuke the entire system and declare martial law on that one property.</p><p>Now the next developer who needs to change that color has two options: figure out why you used !important (they won&#39;t, there&#39;s no comment), or add their own !important to beat yours. And then someone adds another one on top of that. This is called a <strong>specificity war</strong> , and once it starts, it compounds. You end up with stylesheets where half the rules are in a shouting match and nobody knows who&#39;s supposed to win.</p><p><strong>The bad way:</strong></p><pre>/* Day 1: Quick fix */<br>.button { color: red !important; }<br>/* Day 30: Override the fix */<br>.nav .button { color: blue !important; }<br>/* Day 90: Override the override */<br>#header .nav .button { color: green !important; }</pre><p><strong>The right way:</strong> Ask <em>why</em> your rule isn’t applying. Usually it’s because something more specific is overriding it. Fix the specificity. Write a more targeted selector. Or use @layer to establish a deliberate cascade order , CSS now has this natively and it&#39;s exactly the tool !important was a workaround for.</p><p>The rule on !important is simple: if you find yourself reaching for it, that&#39;s a signal your CSS architecture needs a conversation, not a band-aid.</p><h3>Magic Numbers That Only You Understand</h3><p>Let’s talk about this kind of code:</p><pre>.hero-text {<br>  margin-top: -23px;<br>  padding-left: 47px;<br>  height: 59px;<br>  z-index: 9999;<br>}</pre><p>Where did -23px come from? Why 47px and not 48? What would happen if you changed the font size above it?</p><p>Nobody knows. Not you in six months. Not anyone else on your team.</p><p>These are <strong>magic numbers</strong> , values plucked from trial and error that “work” right now, in this browser, at this screen size, with this specific font rendering. They’re fragile by definition. They work because of an invisible dependency that you never documented, and they’ll break as soon as that dependency shifts.</p><p>The real danger isn’t just the number itself. It’s that magic numbers are usually symptoms of a brute-forced layout , code that looks like someone was pushing and pulling on elements until they <em>stopped visually complaining</em>. As one seasoned developer at CSS Wizardry put it, this kind of heavy-handed, brute-forced CSS is a sign of either a poorly architected layout or a gap in understanding how the box model actually works.</p><p><strong>Ask yourself:</strong> <em>Why does this element need </em><em>-23px margin-top?</em> If the answer is &quot;to visually compensate for something above it,&quot; fix the thing above it. If it&#39;s to align with something, use flexbox or grid , tools designed for alignment , instead of playing pixel whack-a-mole.</p><p>And about that z-index: 9999? We&#39;ll get there.</p><h3>The z-index Escalation Problem</h3><p>Let’s be real for a second. You’ve done this:</p><pre>.modal { z-index: 100; }<br>/* Wasn&#39;t showing above the header */<br>.modal { z-index: 999; }<br>/* Still not showing above the sticky nav */<br>.modal { z-index: 9999; }<br>/* Tooltip now appears UNDER the modal somehow??? */<br>.tooltip { z-index: 99999; }</pre><p>And now your project looks like a bidding war where nobody knows what the starting price was.</p><p>Here’s what nobody tells you early enough: <strong>z-index only works within a stacking context</strong>, and many CSS properties create new stacking contexts without you realizing it , transform, opacity less than 1, filter, isolation, and more. So you can have a modal with z-index: 9999 that still appears under a nav bar with z-index: 10, if that modal lives inside a parent with a lower stacking context.</p><p>Throwing bigger numbers at it doesn’t fix this. It just masks the structural problem and makes the next developer’s life worse.</p><p>The real fix: use a centralized z-index scale with CSS custom properties, defined in one place:</p><pre>:root {<br>  --z-base: 1;<br>  --z-dropdown: 100;<br>  --z-sticky: 200;<br>  --z-modal: 300;<br>  --z-toast: 400;<br>}</pre><p>Now your entire team uses the same vocabulary. When someone needs to add a new layer, they look at the scale and pick where it fits , no guessing, no escalation, no z-index: 99999 in sight.</p><h3>Inline Styles: Death by a Thousand style=&quot;&quot; Attributes</h3><p>This one hurts because it feels so <em>convenient</em> in the moment.</p><p>You need to change the color of one specific element. You’re already in the HTML. You just type style=&quot;color: red;&quot; and move on. Fast. Clean. Done.</p><p>Except now you’ve locked that style at the highest possible specificity level. There is almost nothing in your CSS that can override an inline style without resorting to , you guessed it , !important. You&#39;ve just created the exact trap from mistake #1, except this time it&#39;s embedded directly in your HTML markup.</p><p>Inline styles also scatter your design logic across every template file. Want to change that “red” to your new brand color? Good luck finding every style=&quot;color: red;&quot; hiding in your HTML.</p><p>There is one legitimate exception: <strong>HTML emails</strong>. Email clients are notoriously bad at supporting external stylesheets, so inline styles are genuinely the right tool there. Everywhere else? Put it in a class. Always.</p><h3>Overqualified Selectors That Box You In</h3><p>Compare these two:</p><pre>/* Overqualified ,  bad */<br>div#header ul.nav li a.link { color: blue; }<br><br>/* What you actually need */<br>.nav-link { color: blue; }</pre><p>The first one is fragile in every direction. Change div to header, restructure the nav list, rename any one of those classes , the whole rule stops working. It also has unnecessarily high specificity, which means overriding it later requires yet another overqualified selector to beat it.</p><p>The rule is: <strong>write the least specific selector that does the job.</strong> If you can target an element with a single class, use a single class. Don’t qualify it with element types or parent IDs unless you have a specific reason to.</p><p>Overly specific selectors don’t make your CSS more precise , they make it more brittle. Every extra element in a selector chain is a dependency on your HTML structure staying exactly the way it is today. HTML structures change. Classes don’t have to.</p><h3>Repeating Yourself Everywhere</h3><p>You’re writing button styles. There’s a primary button, a secondary button, and a ghost button. They all have the same border radius, the same padding, the same font size, the same transition. But because their colors are different, you write three completely separate rule blocks.</p><p>Six months later, someone decides the padding should be 14px instead of 12px. They find the primary button, change it. Forget the other two. Now your UI is quietly inconsistent, and nobody notices until a designer does a walkthrough and flags it as a bug.</p><p>This is the opposite of DRY , Don’t Repeat Yourself , and in CSS it’s surprisingly common because the language makes it <em>easy</em> to just keep writing.</p><p>The fix has two parts. First, use <strong>CSS custom properties</strong> to centralize shared values:</p><pre>:root {<br>  --btn-padding: 12px 24px;<br>  --btn-radius: 6px;<br>  --btn-transition: background 180ms ease;<br>}</pre><p>Second, use a <strong>base class</strong> for shared structure, and variant classes for differences:</p><pre>/* Shared structure */<br>.btn {<br>  padding: var(--btn-padding);<br>  border-radius: var(--btn-radius);<br>  transition: var(--btn-transition);<br>}<br><br>/* Variants */<br>.btn-primary { background: var(--color-brand); }<br>.btn-ghost    { background: transparent; border: 1px solid currentColor; }</pre><p>Now changing the padding means changing one line. One. That’s the goal.</p><h3>Using px for Everything, Forever</h3><p>Fixed pixel values for font sizes are one of the oldest and most stubborn CSS habits in the industry. It seems harmless , font-size: 16px, clear and precise. Except users can set a default font size in their browser, and when you hardcode px everywhere, you override that preference entirely.</p><p>For someone who needs larger text to read comfortably, your 16px that refuses to scale is an accessibility problem.</p><p>Use rem for font sizes. It scales relative to the browser&#39;s root font size, which respects user preferences. Use em for things that should scale relative to their component context. Use clamp() for fluid typography that adjusts between viewport sizes without media queries:</p><pre>/* Before: rigid */<br>h1 { font-size: 42px; }<br><br>/* After: fluid and accessible */<br>h1 { font-size: clamp(1.75rem, 4vw + 1rem, 3.5rem); }</pre><p>The heading now scales smoothly between small and large screens, stays readable on every device, and respects the user’s browser preferences. Three problems, one line.</p><h3>The Real Cost of Bad CSS</h3><p>Here’s the thing about CSS bad habits: they’re invisible at first.</p><p>The site loads fine. The UI looks right. Nobody’s complaining. So the !importants stay. The magic numbers stay. The z-index: 99999 stays.</p><p>Then the codebase grows. A new developer joins. The design gets updated. You try to change one color and four other things break. You spend two hours in DevTools hunting a specificity conflict that started six months ago. You add !important to fix it , and the cycle continues.</p><p>Good CSS isn’t about perfection. It’s about writing code that still makes sense when you come back to it. Code that doesn’t trap the next developer. Code where changing one thing doesn’t accidentally break three others.</p><p>The habits above aren’t hard to fix. They’re just easy to ignore , until the day you’re in that codebase at 4pm, scrolling through a wall of !importants, wondering who wrote this.</p><p>Don’t be that person. And if you already are, now you know where to start.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b14194f7ff98" width="1" height="1" alt=""><hr><p><a href="https://medium.com/notes-from-the-browser/your-css-is-a-crime-scene-heres-how-to-stop-making-it-worse-b14194f7ff98">Your CSS Is a Crime Scene. Here’s How to Stop Making It Worse.</a> was originally published in <a href="https://medium.com/notes-from-the-browser">Notes From the Browser</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[You’ve Been Paying for a Build Step That CSS Doesn’t Need Anymore]]></title>
            <link>https://medium.com/notes-from-the-browser/youve-been-paying-for-a-build-step-that-css-doesn-t-need-anymore-6519bb77305f?source=rss----eae4fdbdd628---4</link>
            <guid isPermaLink="false">https://medium.com/p/6519bb77305f</guid>
            <category><![CDATA[css]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Mutasim Billah Toha]]></dc:creator>
            <pubDate>Fri, 20 Feb 2026 17:39:48 GMT</pubDate>
            <atom:updated>2026-02-20T17:39:48.623Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong><em>How Modern CSS Replaced the Parts of Sass You Actually Used</em></strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TFpR-FLEMFe6qIImzMXxiA.png" /></figure><p>You open your project. There it is , the node_modules folder. The package.json with Sass buried in the dependency tree. A build pipeline you didn’t write, humming away so your colors can have a little transparency.</p><p>Meanwhile, the browser has quietly been learning to do all of it on its own.</p><p>I’ve been in the Sass camp for a long time. Variables, nesting, mixins, color functions , Sass felt like CSS finally growing up. And for a long time, it was the right tool.</p><p>But something shifted.</p><p>A few months ago, a developer named<strong> Stuart Robson</strong> , someone who’d spent <em>fourteen years</em> as a Sass advocate, running workshops, curating Sass newsletters, editing Sass articles, <a href="https://www.alwaystwisted.com/articles/UnSassing-my-CSS"><strong>started a project without it</strong></a>. Not because he had to. Because he wanted to see if he could. What he discovered quietly undermines the case for Sass in a lot of modern projects.</p><p>Let me show you what he found, and why it matters to you.</p><h3>The Problem You Didn’t Know You Were Solving Twice</h3><p>Here’s the thing about Sass. Most of us adopted it to solve real problems: no variables in CSS, no color manipulation, no nesting. Sass filled those gaps brilliantly.</p><p>But CSS has been filling them too. Quietly. Consistently. And now, in 2025, a lot of what you’re running a preprocessor to accomplish, the browser can handle natively.</p><p>The gap is closing. Fast.</p><h3>The Transparency Trick , And Why You Don’t Need Sass For It Anymore</h3><p>One of the most common Sass workflows looks like this:</p><pre>// The Sass way<br>$primary-color: #c0ffee;<br>color: rgba($primary-color, 0.4);</pre><p>Clean. Familiar. It just works , because Sass intercepts that variable, reads it as a color, and handles the rgba math before anything hits the browser.</p><p>But now modern CSS has something even more elegant. Stuart discovered the color() function , specifically its <em>relative color syntax</em>:</p><pre>/* The CSS way */<br>:root {<br>  --color-primary: #bada55;<br>}<br>.component {<br>  background-color: color(from var(--color-primary) srgb r g b / 0.2);<br>}</pre><p>It looks more verbose at first glance. But here’s what’s actually happening: CSS is extracting the red, green, and blue channels from your custom property <em>at runtime</em>, in the browser, with zero compilation. The / 0.2 at the end sets the alpha channel , 20% opacity. Done. No build step touched it. MDN Web Docs covers the <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color">color()</a> function in full if you want to go deep.</p><h3>Four Ways CSS Handles Color Transparency Today</h3><p>It’s not just one approach either. Modern CSS gives you options. Here are the main ones, so you can choose what fits your codebase:</p><p><strong>1. The </strong><strong>color() function with relative color syntax</strong> , best for wide-gamut work and when you need precise channel-level control:</p><pre>background-color: color(from var(--color-primary) srgb r g b / 0.2);</pre><p><strong>2. Direct </strong><strong>rgba() with a custom property</strong> , the most familiar syntax for anyone coming from Sass:</p><pre>--color-primary: 186, 218, 85;<br>background-color: rgba(var(--color-primary), 0.4);</pre><p><strong>3. </strong><strong>hsla() with a custom property</strong> , useful if your design token is defined in HSL:</p><pre>:root { --color-primary: hsl(91, 52%, 59%); }<br>background-color: hsla(var(--color-primary), 0.4);</pre><p><strong>4. </strong><strong>color-mix() with </strong><strong>transparent</strong> , arguably the most readable of all:</p><pre>background-color: color-mix(in srgb, var(--color-primary) 20%, transparent);</pre><p>That last one deserves more attention than it usually gets.</p><h3>color-mix() Is the Real Story Here</h3><p>If you haven’t played with color-mix() yet, stop what you&#39;re doing.</p><p>This function doesn’t just handle transparency , it replaces Sass’s darken(), lighten(), and mix() functions entirely. Something that used to require a preprocessor to compute at build time now happens live in the browser.</p><p>Before, Sass hover states looked like this:</p><pre>// Sass ,  computed once, static forever<br>$brand: #0088cc;<br>button:hover { background: darken($brand, 20%); }</pre><p>Now, with color-mix():</p><pre>/* CSS ,  dynamic, no build step */<br>button:hover {<br>  background-color: color-mix(in oklab, var(--brand-color), black 20%);<br>}</pre><p>The difference? That CSS version responds to runtime changes. If you swap --brand-color via JavaScript, the hover state updates automatically. The Sass version can&#39;t do that , it was baked in at compile time.</p><p><a href="https://developer.chrome.com/docs/css-ui/css-color-mix">As the Chrome team documented</a>, color-mix() was specifically designed to bring what Sass did at build time into the browser itself. And <a href="https://modern-css.com/mixing-colors-without-a-preprocessor/">modern.css notes</a> that oklch is now the recommended color space for mixing because it&#39;s <em>perceptually uniform</em> , meaning a 50/50 mix of blue and yellow actually <em>looks</em> like a midpoint, instead of producing the muddy results you&#39;d get in sRGB.</p><p>One catch that <a href="https://rijsdam.nl/blog/replacing-sass-darken-and-lighten-functions-with-pure-css">Sjors Rijsdam discovered the hard way</a>: switching from darken() to color-mix() isn&#39;t a one-to-one translation. The percentages don&#39;t match up. Roughly doubling the value you&#39;d use in Sass gets you close when mixing with srgb, but you&#39;ll need to eyeball each color. It&#39;s not a search-and-replace migration , it&#39;s a thoughtful one.</p><h3>The Sass Deprecation You Might Have Missed</h3><p>Here’s something that should push you toward evaluating this shift sooner rather than later.</p><p>Sass itself is deprecating many of its legacy color functions. The rgba(), darken(), lighten(), and similar globals , the ones you&#39;ve been calling for years , are scheduled for removal in Dart Sass 2.0.0. <a href="https://sass-lang.com/documentation/breaking-changes/color-functions/">Sass&#39;s own breaking change documentation</a> explains that as CSS Color Level 4 added support for wide-gamut color spaces, Sass had to rethink how its color functions work. The old ones assumed every color lived in sRGB , that assumption no longer holds.</p><p>So the migration isn’t just optional. For long-lived codebases, it’s coming either way.</p><h3>The Case FOR Still Using Sass (Be Honest With Yourself)</h3><p>Stuart didn’t burn his Sass config and declare victory. He was clear about something important: tooling decisions should be made project by project.</p><p>Sass still earns its place when:</p><ul><li>You’re managing a large, complex design system with deep logic in your stylesheets</li><li>Your team is already fluent in Sass and the productivity gain is real</li><li>You need features modern CSS genuinely doesn’t have yet (some @each loop patterns, @forward/@use module architecture, etc.)</li><li>You’re maintaining a legacy codebase where introducing new CSS patterns would create inconsistency</li></ul><p>The honest answer is that Sass isn’t dying , it’s narrowing. Its territory is shrinking to the genuinely complex cases where a preprocessor still earns the build step overhead.</p><p>For a lot of projects, especially new ones? <a href="https://blog.jim-nielsen.com/2020/sass-color-functions-in-css/">As Jim Nielsen put it</a>: “You know what you’re not doing? Wrangling build plugins and updating dependencies to get Sass to build. What you write gets shipped directly to the browser and works as-is, now and for eternity.”</p><h3>How To Start</h3><p>You don’t have to rip out your entire Sass setup this afternoon. Here’s a sane path:</p><p><strong>Start with colors.</strong> Convert your $color-primary variables to CSS custom properties in :root. Swap rgba($var, 0.4) to color-mix(in srgb, var(--color), transparent 60%). Test visually , don&#39;t just trust the math.</p><p><strong>Check Baseline.</strong> Before replacing a Sass feature, look up the CSS equivalent on <a href="https://web.dev/baseline">web.dev/baseline</a> or MDN. “Widely available” means you don’t need a polyfill. “Newly available” means major browsers support it but older ones may not.</p><p><strong>Pick one component.</strong> Do it zero-Sass on one small component. Live with it for a week. See if the simplicity feels freeing or frustrating.</p><p><strong>Read the deprecation warnings.</strong> If you’re on Dart Sass, run your build with verbose mode and see what’s shouting at you. Those warnings are a roadmap for where to migrate first.</p><h3>The Actual Point</h3><p>Fourteen years of Sass advocacy, and Stuart Robson is now writing a series called “Un-Sass’ing.” Not because Sass failed , it didn’t. Because CSS finally caught up.</p><p>You’ve been maintaining a build pipeline, managing a dependency, and compiling stylesheets for features the browser now ships for free.</p><p>Every dependency adds cognitive load. Every build plugin adds surface area for breakage. Every compile step is another thing that can fail in CI. When the platform absorbs a feature, removing that layer isn’t just aesthetic , it’s operational.</p><p>That’s not bad practice. It was the right call for a long time.</p><p>But the browser grew up.</p><p><strong>The browser absorbed what Sass invented.<br>Now the build step has to justify its existence.</strong></p><p>And for a lot of what you’re building right now, the honest answer might be: not as much as it used to.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6519bb77305f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/notes-from-the-browser/youve-been-paying-for-a-build-step-that-css-doesn-t-need-anymore-6519bb77305f">You’ve Been Paying for a Build Step That CSS Doesn’t Need Anymore</a> was originally published in <a href="https://medium.com/notes-from-the-browser">Notes From the Browser</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Claude Sonnet 4.6 is OUT (The AI Model That Just Made the Expensive One Feel Unnecessary)]]></title>
            <link>https://medium.com/notes-from-the-browser/claude-sonnet-4-6-is-out-the-ai-model-that-just-made-the-expensive-one-feel-unnecessary-6a359babd5a1?source=rss----eae4fdbdd628---4</link>
            <guid isPermaLink="false">https://medium.com/p/6a359babd5a1</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[claude]]></category>
            <dc:creator><![CDATA[Mutasim Billah Toha]]></dc:creator>
            <pubDate>Tue, 17 Feb 2026 20:07:33 GMT</pubDate>
            <atom:updated>2026-02-17T20:07:33.391Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bJztKNpYJp57DLRe5QRqeQ.png" /></figure><p>You’ve been doing the mental math for months.</p><p>The cheap model is <em>almost</em> good enough. The smart model is <em>definitely</em> better. But “definitely better” costs 3–5x more , and for most of what you’re building, it’s hard to justify.</p><p>Anthropic just made that math irrelevant.</p><p>On February 17, 2026, they released Claude Sonnet 4.6. Same price as before. But the gap between “affordable” and “flagship” just got very, very small.</p><h3>Here’s the Stat That Stopped Me Cold</h3><p>In early testing, developers using Claude Code were asked to compare Sonnet 4.6 against Sonnet 4.5.</p><p>They preferred Sonnet 4.6 <strong>70% of the time</strong>. Fine. Expected. New model, new wins.</p><p>But then Anthropic ran a different test. They put Sonnet 4.6 up against <strong>Opus 4.5</strong> , their frontier flagship model from just three months ago. The expensive one. The one people reach for when the stakes are high.</p><p>Sonnet 4.6 won. <strong>59% of the time.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UsAJ-T6ZmMAA4lnR" /></figure><p>The mid-tier model beat the top-tier model , in the hands of real developers doing real work. Not a lab benchmark. Not a cherry-picked demo. Actual users, actual sessions.</p><p>And Sonnet 4.6 costs the same as it always did: <strong>$3/$15 per million tokens.</strong></p><h3>What Actually Changed (And Why It Matters)</h3><p>The previous Sonnet wasn’t bad. But developers had a consistent list of complaints that made long sessions quietly painful.</p><p>It would duplicate logic instead of consolidating it. It’d claim it finished something it hadn’t. It’d miss context that was sitting right there in the file. And after a while, it just got <em>lazy</em> , less follow-through, more vague gestures toward a solution.</p><p>Sonnet 4.6 addresses all of that directly. Users in early testing reported:</p><ul><li>It <strong>reads context before touching code</strong>, rather than diving in blind</li><li>It <strong>consolidates shared logic</strong> instead of copy-pasting it across files</li><li><strong>Fewer false claims of success</strong> , it knows when it’s done and when it isn’t</li><li><strong>More consistent follow-through</strong> on multi-step tasks</li><li>Significantly less “overengineering” on problems that don’t need it</li></ul><p>The CEO of Cognition , the company behind the AI software engineer Devin , put it plainly:</p><p><em>“Claude Sonnet 4.6 has meaningfully closed the gap with Opus on bug detection, letting us run more reviewers in parallel, catch a wider variety of bugs, and do it all without increasing cost.”</em></p><p>More reviewers. Wider bug coverage. Zero cost increase. That’s the upgrade in one sentence.</p><h3>The Computer Use Story Nobody’s Telling Right</h3><p>In October 2024, Anthropic released the first general-purpose AI that could use a computer like a person , clicking, typing, navigating, filling out forms.</p><p>They were honest about it at the time. They called it “still experimental , at times cumbersome and error-prone.”</p><p>It kind of was.</p><p>But here’s what sixteen months of iteration looks like on OSWorld, the gold-standard benchmark for AI computer use (testing real software: Chrome, LibreOffice, VS Code):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RlXJUeMNznwJmwMR" /></figure><p>That’s not incremental progress. That’s nearly <strong>5x improvement in 16 months.</strong></p><p>Early Sonnet 4.6 users are now reporting human-level capability on tasks like navigating complex spreadsheets, filling out multi-step web forms, and coordinating actions across multiple browser tabs.</p><p>Pace , a company building AI for insurance workflows , tested it on their own benchmark. The result? <strong>94% accuracy on computer use tasks.</strong> Their CEO called it “mission-critical” for workflows like submission intake and first notice of loss.</p><p>Think about what that unlocks. Almost every organization has legacy software , tools built before modern APIs existed, systems you can’t easily automate with code. A model that can just <em>use the software the way a person would</em> changes the entire equation. No custom connectors. No expensive integrations. Just: here’s the screen, do the thing.</p><h3>1 Million Tokens , And It Actually Uses Them</h3><p>Long context windows have been an AI marketing staple for a while now. Big number, impressive slide, mediocre real-world performance once you actually push past 100k tokens.</p><p>Sonnet 4.6 ships with a <strong>1 million token context window in beta</strong> , and the more interesting claim is that it <em>reasons effectively</em> across all of it.</p><p>Anthropic tested this in the Vending-Bench Arena: a competition where AI models run simulated businesses and compete for the biggest profits. Sonnet 4.6 developed a strategy nobody told it to use. It spent heavily on capacity for the first ten simulated months , more than any competitor , then pivoted sharply to profitability in the final stretch.</p><p>The timing of that pivot won it the competition.</p><p>No instructions. No hints. It read the context, modeled the arc of the competition, and made a call. That’s what a million tokens of real reasoning looks like.</p><p>For developers, that means entire codebases in a single request. For lawyers, entire contract histories. For analysts, dozens of research reports at once , without the model losing the thread.</p><h3>The Testimonials Are Unusually Specific</h3><p>Here’s something that stood out to me reading through the launch: the customer quotes aren’t the usual vague enthusiasm. They’re weirdly specific. Which usually means they’re real.</p><p><strong>GitHub</strong> (VP of Product): <em>“Claude Sonnet 4.6 is already excelling at complex code fixes, especially when searching across large codebases is essential. For teams running agentic coding at scale, we’re seeing strong resolution rates and the kind of consistency developers need.”</em></p><p><strong>Box</strong> (CTO): <em>“It demonstrated significant improvements, outperforming Claude Sonnet 4.5 in heavy reasoning Q&amp;A by 15 percentage points.”</em></p><p><strong>Zapier</strong> (CEO): <em>“We find it especially strong on branched and multi-step tasks like contract routing, conditional template selection, and CRM coordination , exactly where our customers need strong model sense and reliability.”</em></p><p><strong>Rakuten</strong> (General Manager, AI): <em>“Better spec compliance, better architecture, and it reached for modern tooling we didn’t ask for, all in one shot. The results genuinely surprised us.”</em></p><p><strong>Triple Whale</strong> (Co-founder): <em>“Claude Sonnet 4.6 has perfect design taste when building frontend pages and data reports, and it requires far less hand-holding to get there than anything we’ve tested before.”</em></p><p><strong>Replit</strong> (President): <em>“The performance-to-cost ratio of Claude Sonnet 4.6 is extraordinary , it’s hard to overstate how fast Claude models have been evolving in recent months.”</em></p><p>That last one is the one I keep coming back to. <em>Extraordinary performance-to-cost ratio.</em> From the president of a company that lives and dies by how good their AI-assisted coding is.</p><h3>The Design Thing Is Real</h3><p>One of the quieter upgrades , and one nobody coordinated , was design quality.</p><p>Early customers across completely different industries independently started saying the same thing: visual outputs from Sonnet 4.6 were noticeably more polished. Better layouts. Better animations. Better design judgment. And critically: fewer rounds of back-and-forth to get there.</p><p>Triple Whale called it “perfect design taste.” Harvey (an AI legal platform) noted it was “exceptionally responsive to direction.” Cursor’s CEO called it “a notable improvement over Sonnet 4.5 across the board, including long-horizon tasks and more difficult problems.”</p><p>If you’ve ever spent two hours nudging an AI toward a UI that doesn’t look like a 2011 WordPress template, you understand exactly how much “fewer rounds of iteration” is worth.</p><h3>What’s New on the Platform Side</h3><p>For developers, Sonnet 4.6 also ships with some meaningful infrastructure upgrades:</p><p><strong>Adaptive thinking</strong> is now supported alongside extended thinking , so you can dial the reasoning effort up or down depending on what you’re building. Sonnet 4.6 performs well even with extended thinking completely off, which means you can keep things fast and cost-efficient for simpler tasks without switching models.</p><p><strong>Context compaction</strong> (in beta) automatically summarizes older context as conversations approach limits. In practice: longer sessions without hitting walls.</p><p><strong>Web search and fetch tools</strong> now automatically write and execute code to filter results before they hit the context window , keeping only what’s relevant and improving both quality and token efficiency.</p><p><strong>Claude in Excel</strong> now supports MCP connectors, letting Claude pull data from S&amp;P Global, PitchBook, Moody’s, FactSet, and others without ever leaving the spreadsheet.</p><h3>So Where Does This Leave Opus?</h3><p>Opus 4.6 is still the right call when you need the deepest reasoning , codebase refactoring at scale, coordinating multiple agents in complex workflows, problems where being exactly right is worth the extra cost.</p><p>But the list of tasks where you <em>actually</em> need Opus just got shorter.</p><p>Anthropic’s own data shows Sonnet 4.6 matching Opus 4.6 on OfficeQA , a benchmark measuring how well a model reads enterprise documents (charts, PDFs, tables), pulls the right facts, and reasons from them. Databricks’ CTO called it “a meaningful upgrade for document comprehension workloads.”</p><p>Windsurf’s CEO framed it best: <em>“For the first time, Sonnet brings frontier-level reasoning in a smaller and more cost-effective form factor. It provides a viable alternative if you are a heavy Opus user.”</em></p><p>A <em>viable alternative</em> to Opus. At Sonnet prices.</p><h3>The Pattern That Should Have Your Attention</h3><p>This isn’t a one-time jump. It’s a pattern.</p><p>Six months ago, Opus-level tasks required Opus. Then Sonnet caught up on coding. Now it’s matching Opus on office tasks, document comprehension, and financial analysis too.</p><p>The ceiling keeps rising. The floor rises with it. Every generation, what costs $15/million tokens today starts costing $3/million tokens six months later.</p><p><strong>Sonnet 4.6 is available right now</strong> , on all Claude plans, Claude Code, Claude Cowork, the API, AWS Bedrock, Google Cloud Vertex AI, and every major cloud platform. The free tier defaults to Sonnet 4.6 now too, with file creation, connectors, skills, and compaction included.</p><p>The model you used to pay more for is now just… the model.</p><p>And if the last sixteen months are any indication, the one that costs more today will be the default six months from now.</p><p>That’s the bet worth paying attention to.</p><p><em>Claude Sonnet 4.6 is priced at $3 input / $15 output per million tokens , same as Sonnet 4.5. The 1M context window is in beta. Developers can access it via </em><em>claude-sonnet-4-6 on the Claude API.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a359babd5a1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/notes-from-the-browser/claude-sonnet-4-6-is-out-the-ai-model-that-just-made-the-expensive-one-feel-unnecessary-6a359babd5a1">Claude Sonnet 4.6 is OUT (The AI Model That Just Made the Expensive One Feel Unnecessary)</a> was originally published in <a href="https://medium.com/notes-from-the-browser">Notes From the Browser</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CSS Tricks That Actually Changed How I Write Stylesheets]]></title>
            <link>https://medium.com/notes-from-the-browser/css-tricks-that-actually-changed-how-i-write-stylesheets-f4827f870541?source=rss----eae4fdbdd628---4</link>
            <guid isPermaLink="false">https://medium.com/p/f4827f870541</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Mutasim Billah Toha]]></dc:creator>
            <pubDate>Sun, 15 Feb 2026 20:01:29 GMT</pubDate>
            <atom:updated>2026-02-15T20:01:29.335Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3OkL9wuRGLaGYOz_O2rqLw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@silverkblack?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Vitaly Gariev</a> on <a href="https://unsplash.com/photos/man-with-glasses-gives-two-thumbs-up-4mLpSsK43bE?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>You’ve been writing CSS for a while. You know flexbox. You’ve survived float-based layouts. You’ve googled “center div vertically” more times than you’ll admit.</p><p>And yet , every now and then , you stumble across a CSS trick that makes you go <em>why didn’t I know this earlier?</em></p><p>That happened to me recently while browsing a Reddit thread in <a href="https://www.reddit.com/r/css/"><strong>r/css</strong></a>. Developers were sharing their most underrated CSS moves, and honestly? Some of these stopped me mid-scroll.</p><p>Here are 6 that I can’t stop using now.</p><h3>1. aspect-ratio + object-fit , Stop Fighting with Cropped Images Forever</h3><p>You know the pain. You’re building a card grid. Images come in from the CMS in all kinds of sizes , some landscape, some portrait, some weirdly square. Your layout immediately breaks.</p><p>The old fix was a wrapper div, a padding-top hack, absolute positioning, and a silent prayer.</p><p><strong>The new fix:</strong></p><pre>img {<br>  aspect-ratio: 16 / 9;<br>  object-fit: cover;<br>  width: 100%;<br>}</pre><p>That’s it. Three lines.</p><p>aspect-ratio locks the dimensions. object-fit: cover tells the image to fill that box without distorting , it crops intelligently instead of squishing.</p><p>Before, every image-heavy layout felt like herding cats. Now, every card in my grid is perfectly uniform, and I don’t care what size the original image is. It just <em>works</em>.</p><p>The bonus trick? Combine it with object-position to control <em>where</em> the image crops. object-position: top for portraits. object-position: center (the default) for most things.</p><h3>2. clamp() , Delete Half Your Media Queries</h3><p>Here’s a real conversation I had with myself every time I wrote typography:</p><p><em>“Okay, 16px on mobile, 18px on tablet, 22px on desktop. Let me write three breakpoints , “</em></p><p>Stop. Just stop.</p><pre>font-size: clamp(1rem, 2.5vw, 1.4rem);</pre><p>clamp() takes three values: a minimum, a preferred (usually viewport-based), and a maximum. CSS figures out the rest. As the screen grows, the value scales up , but never below the min, never above the max.</p><p>No media queries. No @media (min-width: 768px) stacking up at the bottom of your file.</p><p>I’ve seen people use this for font sizes, padding, column widths, even gap values:</p><pre>width: clamp(200px, 15vw, 55ch);<br>padding: clamp(1rem, 4vw, 3rem);</pre><p>The difference between before and after is almost embarrassing:</p><p><strong>Before:</strong> 40 lines of media query overrides for a hero section<br><strong>After:</strong> One clamp() that handles every screen size gracefully</p><p>If you’re still writing separate breakpoints for typography, clamp() is the thing that&#39;ll make you feel like you wasted two years of your life. (Worth it. Learn it now.)</p><h3>3. :has() , The &quot;Parent Selector&quot; CSS Never Had</h3><p>For <em>years</em>, CSS developers begged for a parent selector. Something like: “style this container <em>if</em> it contains this child.”</p><p>JavaScript was the only answer. Detect the child, add a class to the parent, style that class. Messy. Fragile. Annoying.</p><p>Then :has() landed with solid browser support, and everything changed.</p><pre>/* Card looks different when it contains an image */<br>.card:has(img) {<br>  padding: 0;<br>}<br><br>/* Form field turns red when its input is invalid */<br>.field:has(input:invalid) {<br>  color: red;<br>  border-color: red;<br>}<br>/* Nav highlights when a child link is active */<br>nav:has(a.active) {<br>  background: #f0f0f0;<br>}</pre><p>Read that middle one again. A <em>parent</em> element changing its style based on the <em>state of a child</em>. In pure CSS. No JavaScript.</p><p>I used to reach for JS classes constantly for this kind of thing. Now I catch myself thinking in :has() first. It&#39;s genuinely changed how I structure component styles , less JS glue, more declarative CSS doing what it should have always been able to do.</p><h3>4. line-clamp , Clean Text Truncation Without JavaScript</h3><p>You’ve got a card with a description. Some descriptions are two sentences. Some are eight. Your design calls for exactly three lines of text, with an ellipsis after.</p><p>The old way: JavaScript. Measure text height. Slice the string. Add ... manually. Break when the font changes.</p><p>The actual way:</p><pre>.description {<br>  display: -webkit-box;<br>  -webkit-line-clamp: 3;<br>  -webkit-box-orient: vertical;<br>  overflow: hidden;<br>}</pre><p>Yes, the -webkit- prefix looks ancient and suspicious. Yes, it works everywhere. No, you don&#39;t need to feel bad about it.</p><p>Three lines of text, clean ellipsis, done. The content can be 10 words or 1000 , the UI stays exactly the same height.</p><p><strong>Before:</strong> A card grid where every card is a different height because descriptions vary<br><strong>After:</strong> Pixel-perfect uniform cards, no JavaScript, no string manipulation</p><p>I’ve shipped this in production more times than I can count. It just works. The day I discovered it, I deleted about 30 lines of a custom JS text-truncation utility and never looked back.</p><h3>5. * { outline: 1px solid red; } , The Fastest Debug Tool You Already Have</h3><p>Your layout is broken. Something is overflowing. You can’t figure out which element is pushing things off screen.</p><p>Before you open the DevTools panel and start clicking through the DOM tree , just paste this in your CSS:</p><pre>* { outline: 1px solid red; }</pre><p>Every element on the page gets a visible red border. Instantly. You can see exactly which box is too wide, which element is bleeding out, which container isn’t containing.</p><p>Some people use variations:</p><pre>* { outline: 1px solid tomato; }<br>* + * { outline-color: blue; }</pre><p>Or the nuclear rainbow version that color-codes by nesting depth. But honestly, the single red line is all you need 90% of the time.</p><p>I use outline instead of border here because outline doesn&#39;t affect layout , it sits outside the box model, so it won&#39;t accidentally <em>cause</em> more layout shifts while you&#39;re debugging.</p><p>Five seconds, one line of CSS, problem found. This one sounds obvious until the first time you use it and you feel like a genius.</p><h3>6. The Lobotomized Owl * + * , Spacing That Thinks for Itself</h3><p>This one has a ridiculous name and a brilliant idea behind it.</p><pre>.stack &gt; * + * {<br>  margin-top: 1.5rem;<br>}</pre><p>The * + * selector , lovingly named the &quot;lobotomized owl&quot; by Heydon Pickering , targets <em>any element that is immediately preceded by another element</em>. In plain English: every element except the first one gets a top margin.</p><p>The result? Consistent vertical rhythm through an entire container, automatically. Add items, remove items, reorder them , the spacing just adapts. No first-child exceptions. No last-child hacks. No manually managing which elements need margin-top.</p><pre>/* Without the owl ,  fragile, manual */<br>p { margin-bottom: 1rem; }<br>h2 { margin-top: 2rem; margin-bottom: 0.5rem; }<br>ul { margin-top: 0.5rem; }<br><br>/* With the owl ,  self-managing */<br>.article &gt; * + * { margin-top: 1em; }</pre><p>Modern layout with gap solves this for flex and grid children. But for mixed content , articles, blog posts, any container with varied elements , the owl still earns its place.</p><p>The first time I understood this selector, I stared at it for a full minute. Then I used it everywhere.</p><h3>The Honest Takeaway</h3><p>None of these are exotic. They’re not obscure hacks that’ll break in the next browser update. They’re just CSS features that somehow don’t show up in the tutorials most people learn from.</p><p>clamp() quietly eliminates media query sprawl. :has() kills whole categories of JavaScript glue code. aspect-ratio makes image layouts boring in the best possible way.</p><p>The gap between “I know CSS” and “I’m fluent in CSS” is often just a dozen tricks like these.</p><p>Pick one you haven’t used yet. Use it in your next project. Then wonder, like I did, why it took you this long to find it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f4827f870541" width="1" height="1" alt=""><hr><p><a href="https://medium.com/notes-from-the-browser/css-tricks-that-actually-changed-how-i-write-stylesheets-f4827f870541">CSS Tricks That Actually Changed How I Write Stylesheets</a> was originally published in <a href="https://medium.com/notes-from-the-browser">Notes From the Browser</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>