-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
layout: Set padding to zero on tables in collapsed-borders mode
https://drafts.csswg.org/css2/#collapsing-borders > in this model, a table does not have padding https://drafts.csswg.org/css-tables/#collapsed-style-overrides > The padding of the table-root is ignored (as if it was set to 0px). Signed-off-by: Oriol Brufau <[email protected]>
- Loading branch information
1 parent
e79ed20
commit 10af445
Showing
4 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<title>CSS Test: Tables under the collapsing borders model don't have padding</title> | ||
<link rel="author" title="Oriol Brufau" href="[email protected]"> | ||
<link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#collapsing-borders"> | ||
<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html"> | ||
<style> | ||
table { | ||
border-collapse: collapse; | ||
box-sizing: content-box; | ||
width: 100px; | ||
height: 100px; | ||
padding: 100px; | ||
background: green; | ||
} | ||
</style> | ||
<p>Test passes if there is a filled green square.</p> | ||
<table></table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<title>CSS Test: Tables under the collapsing borders model don't have padding</title> | ||
<link rel="author" title="Oriol Brufau" href="[email protected]"> | ||
<link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#collapsing-borders"> | ||
<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html"> | ||
<style> | ||
table { | ||
border-collapse: collapse; | ||
box-sizing: border-box; | ||
width: 100px; | ||
height: 100px; | ||
padding: 100px; | ||
background: green; | ||
} | ||
</style> | ||
<p>Test passes if there is a filled green square.</p> | ||
<table></table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<title>CSS Test: Tables under the collapsing borders model don't have padding</title> | ||
<link rel="author" title="Oriol Brufau" href="[email protected]"> | ||
<link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#collapsing-borders"> | ||
<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html"> | ||
<style> | ||
div { | ||
float: left; | ||
background: green; | ||
} | ||
table { | ||
border-collapse: collapse; | ||
box-sizing: content-box; | ||
width: 100px; | ||
height: 100px; | ||
padding: 100px; | ||
} | ||
</style> | ||
<p>Test passes if there is a filled green square.</p> | ||
<div> | ||
<table></table> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<title>CSS Test: Tables under the collapsing borders model don't have padding</title> | ||
<link rel="author" title="Oriol Brufau" href="[email protected]"> | ||
<link rel="help" href="http://www.w3.org/TR/CSS21/tables.html#collapsing-borders"> | ||
<link rel="match" href="../../reference/ref-filled-green-100px-square-only.html"> | ||
<style> | ||
div { | ||
float: left; | ||
background: green; | ||
} | ||
table { | ||
border-collapse: collapse; | ||
box-sizing: border-box; | ||
width: 100px; | ||
height: 100px; | ||
padding: 100px; | ||
} | ||
</style> | ||
<p>Test passes if there is a filled green square.</p> | ||
<div> | ||
<table></table> | ||
</div> |