[Webkit-unassigned] [Bug 171430] New: Buttons with zero width still affect parent's width

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 28 06:47:46 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=171430

            Bug ID: 171430
           Summary: Buttons with zero width still affect parent's width
           Product: WebKit
           Version: Safari 10
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: cedric.reichenbach+webkit-bugzilla at gmail.com

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:

<div class="parent">
  <button class="child">a</button>
  <button class="child">b</button>
  <button class="child">c</button>
</div>


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/

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170428/a900ec98/attachment-0001.html>


More information about the webkit-unassigned mailing list