Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-01-09 17:15:21

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

[textile] Colgroups and span

Playing around with the new table features. I haven’t done much with colgroup and col before, whether or not in Textile.

About the span attribute in colgroup, the HTML 4.01 spec notes:

User agents must ignore this attribute if the COLGROUP element contains one or more COL elements.

The number of columns in the column group may be specified in two, mutually exclusive ways:

  1. The element’s span attribute (default value 1) specifies the number of columns in the group.
  2. Each COL element in the COLGROUP represents one or more columns in the group.

htmlhelp.com adds:

The SPAN attribute should not be used if the COLGROUP contains any COL elements.

I can’t see anything in the declaration itself that states this, but I am none too adept at reading these. I know sometimes the notes seem to conflict with the declarations.


Code is topiary

Offline

#2 2011-01-09 18:18:21

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: [textile] Colgroups and span

BTW, not suggesting any changes are needed to Textile itself, just perhaps to the documentation and the example code on sitemonks.


Code is topiary

Offline

#3 2011-01-09 21:25:33

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [textile] Colgroups and span

Hi Jeff

do you mean the documentation in the initial comment block in classTextile.php?


Steve

Offline

#4 2011-01-10 00:53:05

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: [textile] Colgroups and span

Yes:

|:\5. 50 |(firstcol). |\2. 250||300|

Becomes:
	<colgroup span="5" width="50">
		<col class="firstcol" />
		<col span="2" width="250" />
		<col />
		<col width="300" />
	</colgroup>

But also from http://textile.sitemonks.com/?eg=tables

|:\3. 100 |{background:#ddd}|250||50|300|
...
  <colgroup span="3" width="100">
  <col style="background:#ddd;" />
  <col width="250" />
  <col />
  <col width="50" />
  <col width="300" />
  </colgroup>

Code is topiary

Offline

#5 2011-01-10 13:18:45

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [textile] Colgroups and span

Hi Jeff,

yes, they do indeed seem to be ignored by my browser. Noted, thanks.


Steve

Offline

#6 2011-01-10 14:44:29

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,454
Website GitHub

Re: [textile] Colgroups and span

My mistake, sorry. My glasses must have needed cleaning that day. You’re right that it’s probably not worth the hassle to alter Textile to detect whether <col> or span are used and remove the unused one. But yes the docs and examples are misleading.

/me slap


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#7 2011-01-10 15:12:52

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [textile] Colgroups and span

Jeff / All

Feel free to open new textile issues for stuff like this.


Steve

Offline

#8 2011-01-10 15:21:13

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: [textile] Colgroups and span

Bloke wrote:

You’re right that it’s probably not worth the hassle to alter Textile to detect whether <col> or span are used and remove the unused one.

No, users should be free to use invalid markup if they want, or don’t know better.

Steve: Unless someone else gets to it first, I’ll submit a documentation patch (at some point).


Code is topiary

Offline

#9 2011-01-10 15:25:41

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [textile] Colgroups and span

jsoo wrote:

Steve: Unless someone else gets to it first, I’ll submit a documentation patch (at some point).

Would be received with thanks if you do. I’ve just opened an issue for this on the code repo.

Looks like someone’s been busy documenting things elsewhere in cms land too (if I’m not mistaken.)


Steve

Offline

#10 2011-01-10 15:54:36

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: [textile] Colgroups and span

net-carver wrote:

Would be received with thanks if you do. I’ve just opened an issue for this on the code repo.

OK. Should be a pretty quick fix.

Looks like someone’s been busy documenting things elsewhere in cms land too (if I’m not mistaken.)

You’re not, if I’m not mistaken about the elsewhere in question :)


Code is topiary

Offline

#11 2011-01-10 17:07:43

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: [textile] Colgroups and span

colgroup and col support is a fantastic Textile feature.

Too bad WebKit support for those tags is so lousy, as I have just discovered. :(
(Firefox seems to get it right.)

Edit: unless WebKit gets it right and Firefox is too permissive. Not sure, but http://www.w3.org/TR/CSS2/tables.html#columns says:

Table cells may belong to two contexts: rows and columns. However, in the source document cells are descendants of rows, never of columns. Nevertheless, some aspects of cells can be influenced by setting properties on columns.

Last edited by jsoo (2011-01-10 17:12:55)


Code is topiary

Offline

#12 2011-01-21 00:20:52

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [textile] Colgroups and span

The corresponding issue (issue 8) on the github repo was closed by this commit from Jeff.


Steve

Offline

Board footer

Powered by FluxBB