<?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: Rahman Mahmutović</title>
    <description>The latest articles on DEV Community by Rahman Mahmutović (@mahmutovicr).</description>
    <link>https://dev.to/mahmutovicr</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3994134%2F53f48e04-8294-455b-8fa8-38bbba2a91c3.jpg</url>
      <title>DEV Community: Rahman Mahmutović</title>
      <link>https://dev.to/mahmutovicr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mahmutovicr"/>
    <language>en</language>
    <item>
      <title>"How I contributed to Firefox DevTools"</title>
      <dc:creator>Rahman Mahmutović</dc:creator>
      <pubDate>Sat, 20 Jun 2026 13:30:48 +0000</pubDate>
      <link>https://dev.to/mahmutovicr/how-i-contributed-to-firefox-devtools-3ok6</link>
      <guid>https://dev.to/mahmutovicr/how-i-contributed-to-firefox-devtools-3ok6</guid>
      <description>&lt;h1&gt;
  
  
  I Fixed a Firefox DevTools Bug (Bug 1717176)
&lt;/h1&gt;

&lt;p&gt;When an element had &lt;code&gt;box-sizing: border-box&lt;/code&gt;, the width and height &lt;br&gt;
fields in Firefox DevTools Box Model panel were not editable at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Fix
&lt;/h2&gt;

&lt;p&gt;Two things needed to change:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Unlock editing&lt;/strong&gt; — &lt;code&gt;BoxModelMain.js&lt;/code&gt; was explicitly blocking &lt;br&gt;
border-box elements from being editable.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Correct the value&lt;/strong&gt; — &lt;code&gt;border-box&lt;/code&gt; width includes padding and &lt;br&gt;
borders, so I had to subtract them when opening the editor, and add &lt;br&gt;
them back when writing the new value.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;isBorderBox&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;property&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;width&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;initialValue&lt;/span&gt; &lt;span class="o"&gt;-=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getNonContentWidth&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// show content size&lt;/span&gt;
  &lt;span class="c1"&gt;// on change: value += getNonContentWidth() // write correct CSS&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Result
&lt;/h2&gt;

&lt;p&gt;You can now click and edit width/height on any &lt;code&gt;border-box&lt;/code&gt; element &lt;br&gt;
directly in the Box Model panel.&lt;/p&gt;

&lt;p&gt;Commit: &lt;a href="https://github.com/mozilla-firefox/firefox/commit/905f035605df" rel="noopener noreferrer"&gt;905f035&lt;/a&gt;  &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>opensource</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
