[Webkit-unassigned] [Bug 130239] New: min-width on a display:table-cell element takes precedence over a width on an outer display:table; table-layout:fixed; element if the outer width is set after initial render
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Mar 14 08:27:13 PDT 2014
https://bugs.webkit.org/show_bug.cgi?id=130239
Summary: min-width on a display:table-cell element takes
precedence over a width on an outer
display:table;table-layout:fixed; element if the outer
width is set after initial render
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: New Bugs
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: pguerrant at gmail.com
In the following test case, the outer and inner elements should end up both being 100px wide, because of the width that is set on the outer element, however, because the width on the outer element is set after initial render, the min-width on the inner element wins and both inner and outer elements end up being 200px wide.
<style>
#outer {
display: table;
table-layout: fixed;
}
#inner {
display: table-cell;
height: 50px;
background-color: green;
min-width: 200px;
}
</style>
<div id="outer">
<div id="inner"></div>
</div>
<script>
window.onload = function() {
outer = document.getElementById('outer');
outer.style.width = '100px';
};
</script>
The following actions can be taken to work around the bug:
1. set the outer element's width in the stylesheet, or inline style, instead of setting the width after initial render
2. after setting the width on the outer element, hiding and showing it by setting display to "none" and then back to "table" will cause it to refresh and layout properly.
This bug is reproducible in the latest webkit nightly (March 7, 2014) and in the latest versions of Safari and Chrome.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list