Skip to content

Commit 8c8a85d

Browse files
committed
[css2] Removed column-align property; used text-align instead with <string> value, added example of column alignment
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%40842
1 parent 90cade1 commit 8c8a85d

2 files changed

Lines changed: 53 additions & 26 deletions

File tree

css2/properties/properties.db

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ allowed on 'font-size' and 'line-height' ;; visual
197197
[<color> || <length> <length> <length>?] | inherit;; none;; all;; no (see
198198
prose);; N/A;; visual */
199199

200-
/* text-align;; left | right | center | justify | inherit;;
200+
/* text-align;; left | right | center | justify | <string> | inherit;;
201201
depends on user agent;;
202202
block-level elements;;
203203
yes;; N/A;; visual
@@ -341,9 +341,6 @@ no;; N/A;; visual */
341341
/* table-layout;; auto | fixed | inherit ;; auto;; 'table'
342342
and 'inline-table' elements;;
343343
no;; N/A;; visual */
344-
/* column-align;; none | <string> | inherit;; none;; 'table-column'
345-
elements;; yes;; N/A;; visual */
346-
347344

348345
#For widows/orphans:
349346
/* widows;; <integer> | inherit;; 2;; block-level elements;; yes;; N/A ;; visual, paged */

css2/tables.src

Lines changed: 52 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22
<html lang="en">
3-
<!-- $Id: tables.src,v 2.2 1998-02-09 23:48:51 ijacobs Exp $ -->
3+
<!-- $Id: tables.src,v 2.3 1998-02-10 00:53:42 ijacobs Exp $ -->
44
<head>
55
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
66
<title>Tables</title>
@@ -883,34 +883,64 @@ class="propinst-text-align">'text-align'</span> property.
883883

884884
<P>Cell boxes in the same column may also be aligned horizontally
885885
along a common axis, specified by the <span
886-
class="propinst-column-align">'column-align'</span> property.
886+
class="propinst-text-align">'text-align'</span> property. The <span
887+
class="index-inst" title="&lt;string&gt;"><span
888+
class="value-inst-string">&lt;string&gt;</span></span> value of this
889+
property specifies how cell boxes in the same column will align
890+
horizontally; it only applies to column and column group elements.
891+
892+
<P>When specified, cell content is aligned along the beginning of the
893+
specified string (the beginning depends on the <span
894+
class="propinst-direction">'direction'</span> property). If the
895+
string occurs more than once in the cell's content, the cell is
896+
aligned on the first occurrence. If the string doesn't occur, the
897+
cell is aligned at the end of the content.
887898

888-
<!-- #include src=properties/column-align.srb -->
899+
<p>Aligning text in this way is only useful if the text only spans one
900+
line. The result is undefined if the text spans more than one line.
889901

890-
<P>Specifies how cell boxes in the same column will align
891-
horizontally. Values have the following meanings:</p>
902+
<div class="example"><P>
903+
The following style sheet:</p>
892904

893-
<dl>
894-
<dt><span class="index-inst" title="&lt;string&gt;"><span
895-
class="value-inst-string"><strong>&lt;string&gt;</strong></span></span>
905+
<PRE>
906+
COL { text-align: "." }
907+
TD :before { text-align: right; content: "$" }
908+
</PRE>
896909

897-
<dd>Align cell content along the beginning of the specified string
898-
(the beginning depends on the <span
899-
class="propinst-direction">'direction'</span> property).
900-
If the string occurs more than once in the cell's content, the
901-
cell is aligned on the first occurrence.
902-
If the string doesn't occur, the cell is aligned at the end of the
903-
content.
910+
<P>will cause the column of dollar figures
911+
in the following HTML table:</p>
904912

905-
<p>Aligning text in this way is only useful if the text only spans one
906-
line. The result is undefined if the text spans more than one line.
907-
</dd>
913+
<PRE class="html-example">
914+
&lt;TABLE&gt;
915+
&lt;COL width="40"&gt;
916+
&lt;TR&gt; &lt;TH&gt;Long distance calls
917+
&lt;TR&gt; &lt;TD&gt; 1.30
918+
&lt;TR&gt; &lt;TD&gt; 2.50
919+
&lt;TR&gt; &lt;TD&gt; 10.80
920+
&lt;TR&gt; &lt;TD&gt; 111.01
921+
&lt;TR&gt; &lt;TD&gt; 85.
922+
&lt;TR&gt; &lt;TD&gt; 90
923+
&lt;TR&gt; &lt;TD&gt; .05
924+
&lt;TR&gt; &lt;TD&gt; .06
925+
&lt;/TABLE&gt;
926+
</PRE>
908927

909-
<dt><strong>none</strong>
910-
<dd>No column alignment.
911-
</dl>
928+
<P>to align along the decimal point. For fun,
929+
we have used the <span class="index-inst" title=":before">:before</span>
930+
pseudo-class to insert a dollar sign before each figure:</P>
912931

913-
<!-- Add example -IJ -->
932+
<PRE>
933+
Long distance calls
934+
$1.30
935+
$2.50
936+
$10.80
937+
$111.01
938+
$85.
939+
$90
940+
$.05
941+
$.06
942+
</PRE>
943+
</div>
914944

915945
<h3><a name="dynamic-effects">Dynamic row and column effects</a></h3>
916946

0 commit comments

Comments
 (0)