Hi all,
We have recently moved from quirks to strict doctype and wanted to
revert the behaviour of paragraph margins in table cells.
I found the webkit-margin-collapse property and from the description,
it looks exactly what I want -
"This property allows you to emulate the behavior of some browsers in
quirks mode where table cell margins are collapsed into the borders of
vertically adjacent cells."
Setting it to "separate", it does what it is meant to (non collapsed
margins). However, setting it to discard has no effect what so ever.
I just wanted to confirm its intended behaviour before I raised a bug.
Below is the simplest example of the problem. When viewed (on trunk
and stable) you will notice that the first paragraph has a top-margin,
and the bottom paragraph has a bottom margin. Change the doctype to
quirks (remove - "http://www.w3.org/TR/html4/loose.dtd") and the
margins disappear.
Cheers guys,
Nick
JIRA Developer
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
</head>
<body>
<style type="text/css">
table, tr, td {
border-style:solid;
}
p {
-webkit-margin-top-collapse: discard;
-webkit-margin-bottom-collapse: discard;
border-style:solid
}
</style>
<table>
<tr>
<td>
<p>Test paragraph 1</p>
<p>Test paragraph 2</p>
<p>Test paragraph 3</p>
</td>
</tr>
</table>
</body>
</html>
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev