<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>171430</bug_id>
          
          <creation_ts>2017-04-28 06:47:46 -0700</creation_ts>
          <short_desc>Buttons with zero width still affect parent&apos;s width</short_desc>
          <delta_ts>2022-07-15 11:16:43 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>Safari 10</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Cedric Reichenbach">cedric.reichenbach+webkit-bugzilla</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1302562</commentid>
    <comment_count>0</comment_count>
    <who name="Cedric Reichenbach">cedric.reichenbach+webkit-bugzilla</who>
    <bug_when>2017-04-28 06:47:46 -0700</bug_when>
    <thetext>When setting `width: 0` on buttons in a container with variable with, they still occupy space (but are invisible). As a consequence, the container element has the same with as if those buttons had default width.

Example:

HTML:

&lt;div class=&quot;parent&quot;&gt;
  &lt;button class=&quot;child&quot;&gt;a&lt;/button&gt;
  &lt;button class=&quot;child&quot;&gt;b&lt;/button&gt;
  &lt;button class=&quot;child&quot;&gt;c&lt;/button&gt;
&lt;/div&gt;


CSS:

.parent {
  float: left;
  border: 2px solid darkblue;
}

.child {
  float: left;
  width: 0px;
  padding: 0;
  margin: 0;
  border: none;
  overflow: hidden;
}

.parent:hover .child {
  width: auto;
}


The a sample in JSFiddle can be found here: https://jsfiddle.net/4rsd84yg/9/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1884112</commentid>
    <comment_count>1</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2022-07-15 11:16:43 -0700</bug_when>
    <thetext>In Safari 15.5+ all buttons show zero width, and the &apos;parent&apos; container has zero width.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>