Skip to content
Permalink
Browse files

[giow] (2) Try to improve compat for legacy <table border='' rules=''…

… and frames=''> attributes.

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=13915

git-svn-id: http://svn.whatwg.org/webapps@6681 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 14, 2011
1 parent b4ecff4 commit ee67a04c24500d912de6e9e2841965e8a322efde
Showing with 170 additions and 101 deletions.
  1. +57 −34 complete.html
  2. +57 −34 index
  3. +56 −33 source

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 13 October 2011</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 14 October 2011</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
table {
border-spacing: 2px;
border-collapse: separate;
border-style: outset;
border-width: 0;
text-indent: initial;
}

td, th { padding: 1px; border-style: inset; }
td, th { padding: 1px; }
th { font-weight: bold; }

thead, tbody, tfoot, table &gt; tr { vertical-align: middle; }

table[rules=none i], table[rules=groups i], table[rules=rows i],
table[rules=cols i], table[rules=all i] {
border-style: none;
border-style: hidden;
border-collapse: collapse;
}
table[border] { border-style: outset; }
table[frame=void i] { border-style: hidden; }
table[frame=above i] { border-style: outset hidden hidden hidden; }
table[frame=below i] { border-style: hidden hidden outset hidden; }
table[frame=hsides i] { border-style: outset hidden outset hidden; }
table[frame=lhs i] { border-style: hidden hidden hidden outset; }
table[frame=rhs i] { border-style: hidden outset hidden hidden; }
table[frame=vsides i] { border-style: hidden outset; }
table[frame=box i], table[frame=border i] { border-style: outset; }

table[frame=void i] { border-style: hidden hidden hidden hidden; }
table[frame=above i] { border-style: solid hidden hidden hidden; }
table[frame=below i] { border-style: hidden hidden solid hidden; }
table[frame=hsides i] { border-style: solid hidden solid hidden; }
table[frame=lhs i] { border-style: hidden hidden hidden solid; }
table[frame=rhs i] { border-style: hidden solid hidden hidden; }
table[frame=vsides i] { border-style: hidden solid hidden solid; }
table[frame=box i],
table[frame=border i] { border-style: solid solid solid solid; }

table[border] &gt; tr &gt; td, table[border] &gt; tr &gt; th,
table[border] &gt; thead &gt; tr &gt; td, table[border] &gt; thead &gt; tr &gt; th,
table[border] &gt; tbody &gt; tr &gt; td, table[border] &gt; tbody &gt; tr &gt; th,
table[border] &gt; tfoot &gt; tr &gt; td, table[border] &gt; tfoot &gt; tr &gt; th {
border-width: 1px;
border-style: inset;
}
table[rules=none i] &gt; tr &gt; td, table[rules=none i] &gt; tr &gt; th,
table[rules=none i] &gt; thead &gt; tr &gt; td, table[rules=none i] &gt; thead &gt; tr &gt; th,
table[rules=none i] &gt; tbody &gt; tr &gt; td, table[rules=none i] &gt; tbody &gt; tr &gt; th,
table[rules=rows i] &gt; thead &gt; tr &gt; td, table[rules=rows i] &gt; thead &gt; tr &gt; th,
table[rules=rows i] &gt; tbody &gt; tr &gt; td, table[rules=rows i] &gt; tbody &gt; tr &gt; th,
table[rules=rows i] &gt; tfoot &gt; tr &gt; td, table[rules=rows i] &gt; tfoot &gt; tr &gt; th {
border-width: 1px;
border-style: none;
}

table[rules=groups i] &gt; colgroup, table[rules=groups i] &gt; thead,
table[rules=groups i] &gt; tbody, table[rules=groups i] &gt; tfoot {
border-style: solid;
}

table[rules=rows i] &gt; tr, table[rules=rows i] &gt; thead &gt; tr,
table[rules=rows i] &gt; tbody &gt; tr, table[rules=rows i] &gt; tfoot &gt; tr {
border-style: solid;
}

table[rules=cols i] &gt; tr &gt; td, table[rules=cols i] &gt; tr &gt; th,
table[rules=cols i] &gt; thead &gt; tr &gt; td, table[rules=cols i] &gt; thead &gt; tr &gt; th,
table[rules=cols i] &gt; tbody &gt; tr &gt; td, table[rules=cols i] &gt; tbody &gt; tr &gt; th,
table[rules=cols i] &gt; tfoot &gt; tr &gt; td, table[rules=cols i] &gt; tfoot &gt; tr &gt; th {
border-style: none solid none solid;
border-width: 1px;
border-style: none solid;
}

table[rules=all i] &gt; tr &gt; td, table[rules=all i] &gt; tr &gt; th,
table[rules=all i] &gt; thead &gt; tr &gt; td, table[rules=all i] &gt; thead &gt; tr &gt; th,
table[rules=all i] &gt; tbody &gt; tr &gt; td, table[rules=all i] &gt; tbody &gt; tr &gt; th,
table[rules=all i] &gt; tfoot &gt; tr &gt; td, table[rules=all i] &gt; tfoot &gt; tr &gt; th {
border-width: 1px;
border-style: solid;
}

table[border] &gt; tr &gt; td, table[border] &gt; tr &gt; th,
table[border] &gt; thead &gt; tr &gt; td, table[border] &gt; thead &gt; tr &gt; th,
table[border] &gt; tbody &gt; tr &gt; td, table[border] &gt; tbody &gt; tr &gt; th,
table[border] &gt; tfoot &gt; tr &gt; td, table[border] &gt; tfoot &gt; tr &gt; th {
border-width: 1px;
table[rules=groups i] &gt; colgroup {
border-left-width: 1px;
border-left-style: solid;
border-right-width: 1px;
border-right-style: solid;
}
table[rules=groups i] &gt; thead,
table[rules=groups i] &gt; tbody,
table[rules=groups i] &gt; tfoot {
border-top-width: 1px;
border-top-style: solid;
border-bottom-width: 1px;
border-bottom-style: solid;
}

table[rules=rows i] &gt; tr, table[rules=rows i] &gt; thead &gt; tr,
table[rules=rows i] &gt; tbody &gt; tr, table[rules=rows i] &gt; tfoot &gt; tr {
border-top-width: 1px;
border-top-style: solid;
border-bottom-width: 1px;
border-bottom-style: solid;
}</pre>

<!--
Demos that the above must explain:
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1191
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1194
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1195
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1196
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1197
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1199
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1200
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1201
-->


<p>In <a href=#quirks-mode>quirks mode</a>, the following rules are also
expected to apply:</p>

91 index

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 13 October 2011</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 14 October 2011</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
table {
border-spacing: 2px;
border-collapse: separate;
border-style: outset;
border-width: 0;
text-indent: initial;
}

td, th { padding: 1px; border-style: inset; }
td, th { padding: 1px; }
th { font-weight: bold; }

thead, tbody, tfoot, table &gt; tr { vertical-align: middle; }

table[rules=none i], table[rules=groups i], table[rules=rows i],
table[rules=cols i], table[rules=all i] {
border-style: none;
border-style: hidden;
border-collapse: collapse;
}
table[border] { border-style: outset; }
table[frame=void i] { border-style: hidden; }
table[frame=above i] { border-style: outset hidden hidden hidden; }
table[frame=below i] { border-style: hidden hidden outset hidden; }
table[frame=hsides i] { border-style: outset hidden outset hidden; }
table[frame=lhs i] { border-style: hidden hidden hidden outset; }
table[frame=rhs i] { border-style: hidden outset hidden hidden; }
table[frame=vsides i] { border-style: hidden outset; }
table[frame=box i], table[frame=border i] { border-style: outset; }

table[frame=void i] { border-style: hidden hidden hidden hidden; }
table[frame=above i] { border-style: solid hidden hidden hidden; }
table[frame=below i] { border-style: hidden hidden solid hidden; }
table[frame=hsides i] { border-style: solid hidden solid hidden; }
table[frame=lhs i] { border-style: hidden hidden hidden solid; }
table[frame=rhs i] { border-style: hidden solid hidden hidden; }
table[frame=vsides i] { border-style: hidden solid hidden solid; }
table[frame=box i],
table[frame=border i] { border-style: solid solid solid solid; }

table[border] &gt; tr &gt; td, table[border] &gt; tr &gt; th,
table[border] &gt; thead &gt; tr &gt; td, table[border] &gt; thead &gt; tr &gt; th,
table[border] &gt; tbody &gt; tr &gt; td, table[border] &gt; tbody &gt; tr &gt; th,
table[border] &gt; tfoot &gt; tr &gt; td, table[border] &gt; tfoot &gt; tr &gt; th {
border-width: 1px;
border-style: inset;
}
table[rules=none i] &gt; tr &gt; td, table[rules=none i] &gt; tr &gt; th,
table[rules=none i] &gt; thead &gt; tr &gt; td, table[rules=none i] &gt; thead &gt; tr &gt; th,
table[rules=none i] &gt; tbody &gt; tr &gt; td, table[rules=none i] &gt; tbody &gt; tr &gt; th,
table[rules=rows i] &gt; thead &gt; tr &gt; td, table[rules=rows i] &gt; thead &gt; tr &gt; th,
table[rules=rows i] &gt; tbody &gt; tr &gt; td, table[rules=rows i] &gt; tbody &gt; tr &gt; th,
table[rules=rows i] &gt; tfoot &gt; tr &gt; td, table[rules=rows i] &gt; tfoot &gt; tr &gt; th {
border-width: 1px;
border-style: none;
}

table[rules=groups i] &gt; colgroup, table[rules=groups i] &gt; thead,
table[rules=groups i] &gt; tbody, table[rules=groups i] &gt; tfoot {
border-style: solid;
}

table[rules=rows i] &gt; tr, table[rules=rows i] &gt; thead &gt; tr,
table[rules=rows i] &gt; tbody &gt; tr, table[rules=rows i] &gt; tfoot &gt; tr {
border-style: solid;
}

table[rules=cols i] &gt; tr &gt; td, table[rules=cols i] &gt; tr &gt; th,
table[rules=cols i] &gt; thead &gt; tr &gt; td, table[rules=cols i] &gt; thead &gt; tr &gt; th,
table[rules=cols i] &gt; tbody &gt; tr &gt; td, table[rules=cols i] &gt; tbody &gt; tr &gt; th,
table[rules=cols i] &gt; tfoot &gt; tr &gt; td, table[rules=cols i] &gt; tfoot &gt; tr &gt; th {
border-style: none solid none solid;
border-width: 1px;
border-style: none solid;
}

table[rules=all i] &gt; tr &gt; td, table[rules=all i] &gt; tr &gt; th,
table[rules=all i] &gt; thead &gt; tr &gt; td, table[rules=all i] &gt; thead &gt; tr &gt; th,
table[rules=all i] &gt; tbody &gt; tr &gt; td, table[rules=all i] &gt; tbody &gt; tr &gt; th,
table[rules=all i] &gt; tfoot &gt; tr &gt; td, table[rules=all i] &gt; tfoot &gt; tr &gt; th {
border-width: 1px;
border-style: solid;
}

table[border] &gt; tr &gt; td, table[border] &gt; tr &gt; th,
table[border] &gt; thead &gt; tr &gt; td, table[border] &gt; thead &gt; tr &gt; th,
table[border] &gt; tbody &gt; tr &gt; td, table[border] &gt; tbody &gt; tr &gt; th,
table[border] &gt; tfoot &gt; tr &gt; td, table[border] &gt; tfoot &gt; tr &gt; th {
border-width: 1px;
table[rules=groups i] &gt; colgroup {
border-left-width: 1px;
border-left-style: solid;
border-right-width: 1px;
border-right-style: solid;
}
table[rules=groups i] &gt; thead,
table[rules=groups i] &gt; tbody,
table[rules=groups i] &gt; tfoot {
border-top-width: 1px;
border-top-style: solid;
border-bottom-width: 1px;
border-bottom-style: solid;
}

table[rules=rows i] &gt; tr, table[rules=rows i] &gt; thead &gt; tr,
table[rules=rows i] &gt; tbody &gt; tr, table[rules=rows i] &gt; tfoot &gt; tr {
border-top-width: 1px;
border-top-style: solid;
border-bottom-width: 1px;
border-bottom-style: solid;
}</pre>

<!--
Demos that the above must explain:
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1191
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1194
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1195
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1196
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1197
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1199
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1200
http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1201
-->


<p>In <a href=#quirks-mode>quirks mode</a>, the following rules are also
expected to apply:</p>

0 comments on commit ee67a04

Please sign in to comment.
You can’t perform that action at this time.