<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Dimon</title>
    <description>The latest articles on DEV Community by Dimon (@dimonb19a).</description>
    <link>https://dev.to/dimonb19a</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3963235%2Fef7373cd-e19d-4adb-bd0b-1d9ae1e5c5e1.png</url>
      <title>DEV Community: Dimon</title>
      <link>https://dev.to/dimonb19a</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dimonb19a"/>
    <language>en</language>
    <item>
      <title>Why I stopped fighting the browser</title>
      <dc:creator>Dimon</dc:creator>
      <pubDate>Tue, 02 Jun 2026 23:06:22 +0000</pubDate>
      <link>https://dev.to/dimonb19a/why-i-stopped-fighting-the-browser-4l1e</link>
      <guid>https://dev.to/dimonb19a/why-i-stopped-fighting-the-browser-4l1e</guid>
      <description>&lt;p&gt;A while ago I was about to install another dropdown library. I'd already added one for modals and one for tooltips. Somewhere between &lt;code&gt;npm install&lt;/code&gt; and opening the docs, I stopped and asked myself a dumb question: &lt;em&gt;why am I doing this?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The browser already has a dropdown. It already has a modal. It already has an accordion. I was about to spend a weekend — and a few hundred kilobytes of JavaScript — rebuilding things my browser ships for free.&lt;/p&gt;

&lt;p&gt;That was the moment I realized I'd been &lt;strong&gt;fighting the browser&lt;/strong&gt; for years without noticing.&lt;/p&gt;




&lt;h2&gt;
  
  
  What "fighting the browser" looks like
&lt;/h2&gt;

&lt;p&gt;Modern frontend has a reflex: reach for a library for everything. And to make those libraries look custom, you reset all the defaults, override the styles, and reimplement the behavior — keyboard navigation, focus trapping, ARIA roles, form integration.&lt;/p&gt;

&lt;p&gt;The problem is that you get that behavior subtly wrong. I'm one developer. I am not going to out-engineer the people who built the browser's &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt;. Every time I reimplemented one of these, I quietly reintroduced accessibility bugs the browser had already solved — and shipped more code to do it.&lt;/p&gt;




&lt;h2&gt;
  
  
  The shift: adapt, don't fight
&lt;/h2&gt;

&lt;p&gt;So I gave myself one rule: &lt;strong&gt;the browser owns the behavior, I only own the looks.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Need a modal? &lt;code&gt;&amp;lt;dialog&amp;gt;&lt;/code&gt;. It already does focus trapping, Esc-to-close, a backdrop, and it renders above everything in the top layer. I just style how it looks.&lt;/li&gt;
&lt;li&gt;Need an FAQ or accordion? &lt;code&gt;&amp;lt;details&amp;gt;&lt;/code&gt; + &lt;code&gt;&amp;lt;summary&amp;gt;&lt;/code&gt;. Open/close and keyboard support, free.&lt;/li&gt;
&lt;li&gt;Need a dropdown? &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt;. Accessible, keyboard-friendly, uses the native picker on mobile, and submits with the form. I would never have built it that well.&lt;/li&gt;
&lt;li&gt;Need a slider? &lt;code&gt;&amp;lt;input type="range"&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz0vuacwou833ojep42ou.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz0vuacwou833ojep42ou.jpg" alt=" " width="800" height="474"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The objection I had to get over
&lt;/h2&gt;

&lt;p&gt;You're probably thinking what I thought: &lt;em&gt;"but native elements are ugly and you can't style them."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That was true years ago. It mostly isn't now. Modern CSS lets you style form controls, a dialog's &lt;code&gt;::backdrop&lt;/code&gt;, accent colors, the open/close states — way more than most of us realize. In 2026, "you can't style native elements" is a habit, not a fact.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Native-first does not mean unstyled.&lt;/strong&gt; I style mine heavily. It means the browser keeps the behavior, and I take the paint.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnr6c9st8rn07x4q1muem.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnr6c9st8rn07x4q1muem.jpg" alt=" " width="800" height="722"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Where I still go custom
&lt;/h2&gt;

&lt;p&gt;I'm not a purist about it. Some things genuinely have no native equivalent — a filterable combobox, a command palette (Cmd+K), a multi-handle slider. Those I build. But even then I wrap and extend the native pieces instead of starting from zero.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4wtbjv0bl6560violz1b.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4wtbjv0bl6560violz1b.jpg" alt=" " width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The point isn't "never write JavaScript." It's "don't rebuild what you already have."&lt;/p&gt;




&lt;h2&gt;
  
  
  Why this mattered so much for me
&lt;/h2&gt;

&lt;p&gt;I built my whole design system solo. Native-first is the only reason that was even possible. Leaning on native elements means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;less JavaScript to ship and maintain,&lt;/li&gt;
&lt;li&gt;accessibility I get mostly for free instead of bolting it on later and getting it wrong,&lt;/li&gt;
&lt;li&gt;forms and mobile that just work.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My components got thinner. My bugs went down. And the few things I did build custom got the attention they deserved — because I wasn't burning it re-creating a dropdown.&lt;/p&gt;

&lt;p&gt;This isn't a thought experiment for me. It's the foundation of a design system I've been building. It's not out yet, but native-first is the principle everything else sits on — and I'll be writing about the rest as I go.&lt;/p&gt;

&lt;p&gt;If you take one thing from this: next time you reach for a dropdown library, open the docs for &lt;code&gt;&amp;lt;select&amp;gt;&lt;/code&gt; first. Next time you need a modal, try &lt;code&gt;&amp;lt;dialog&amp;gt;&lt;/code&gt;. You might delete more code than you write — and that's the good kind of progress.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>html</category>
      <category>a11y</category>
    </item>
  </channel>
</rss>
