473,382 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

TD CSS Shorthands... Thoughts?

Hello! :)
I am working on an app that uses dozens of tables, some with hundreds
(or even thousands!) of rows. I am interested in formatting the tables
using as much CSS as possible, so the HTML is barebones and
easy-to-read/modify. While thinking up how to do it, I came up with
this idea, which I welcome comments on:

QUESTION: What are the pros and cons of using one letter class names
for common TD cell formatting, like "nowrap" or "align=right", etc.

Something like this:

..l { text-align : left; }
..c { text-align : center; }
..r { text-align : right; }

..t { vertical-align : top; }
..m { vertical-align : middle; }
..b { vertical-align : bottom; }

..w { white-space : wrap; }
..nw { white-space : nowrap; }

This would enable you to do "shorthand" for formatting cells, like
this:

<td class="c t nw">100 million</td>

where this particular cell centered horizontally, middled vertically,
and with no wrapping...

What do you think?

My biggest fear is it will get expensive processor-wise.

Anyone done something like this, who would care to comment, good or
bad?

Thank you,
Ann

Apr 27 '06 #1
36 1867
Giggle Girl wrote:
Hello! :)
I am working on an app that uses dozens of tables, some with hundreds
(or even thousands!) of rows. I am interested in formatting the tables
using as much CSS as possible, so the HTML is barebones and
easy-to-read/modify. While thinking up how to do it, I came up with
this idea, which I welcome comments on:

QUESTION: What are the pros and cons of using one letter class names
for common TD cell formatting, like "nowrap" or "align=right", etc.

Something like this:

.l { text-align : left; }
.c { text-align : center; }
.r { text-align : right; }

.t { vertical-align : top; }
.m { vertical-align : middle; }
.b { vertical-align : bottom; }

.w { white-space : wrap; }
.nw { white-space : nowrap; }

This would enable you to do "shorthand" for formatting cells, like
this:

<td class="c t nw">100 million</td>

where this particular cell centered horizontally, middled vertically,
and with no wrapping...

What do you think?
I do it all the time. Works fine.
My biggest fear is it will get expensive processor-wise.
How so?
Anyone done something like this, who would care to comment, good or
bad?


See above :)
Apr 27 '06 #2
Giggle Girl wrote:
Hello! :)
I am working on an app that uses dozens of tables, some with hundreds
(or even thousands!) of rows. I am interested in formatting the tables
using as much CSS as possible, so the HTML is barebones and
easy-to-read/modify. While thinking up how to do it, I came up with
this idea, which I welcome comments on:

QUESTION: What are the pros and cons of using one letter class names
for common TD cell formatting, like "nowrap" or "align=right", etc.

Something like this:

.l { text-align : left; }
.c { text-align : center; }
.r { text-align : right; }

.t { vertical-align : top; }
.m { vertical-align : middle; }
.b { vertical-align : bottom; }

.w { white-space : wrap; }
.nw { white-space : nowrap; }

This would enable you to do "shorthand" for formatting cells, like
this:

<td class="c t nw">100 million</td>

where this particular cell centered horizontally, middled vertically,
and with no wrapping...

What do you think?
The point of using styles is to separate content from presentation. One
of the advantages of that is that you can change the appearance entirely
by altering the stylesheet without having to touch the HTML, and in
particular without having to hunt through it and make changes to every
element whose appearance you want to alter.

If you put classes in your HTML that refer directly to appearance, then
suppose you decide you want all the cells that used to be right-aligned
to be center-aligned. You have to go through your HTML and change all
the classes. You *could* just change one line in your CSS to read

.r { text-align : center; }

if you meant for the change to be universal. But that would be silly,
wouldn't it?

Unless your cell formatting is completely haphazard, the changes are
that you are applying these styles for a reason. Perhaps you want
numeric cells to be top-right-aligned, and you want column headers to be
bottom-center-aligned. So what would make sense would be to designate
cells with class="numeric" and class="colhead" and then have

.numeric { text-align: right; vertical-align: top; }
.colhead { text-align: center; vertical-align: bottom; }
My biggest fear is it will get expensive processor-wise.


Not particularly.
Apr 28 '06 #3
On 27 Apr 2006 13:17:24 -0700, "Giggle Girl" <mi*******@gmail.com>
wrote:

: My biggest fear is it will get expensive processor-wise.

How much do you play for each millisecond?

Sid
Apr 28 '06 #4

Giggle Girl wrote:
QUESTION: What are the pros and cons of using one letter class names
for common TD cell formatting, like "nowrap" or "align=right", etc.


Dreadful! Total mis-use of CSS.

CSS is about _styles_ Not about attaching individual inline CSS
properties to every element that uses them. That approach would couple
content and presentation together as closely and badly as doing it with
<font> tags.

I also doubt if you really need per-cell control of random formatting
combinations. If there isn't some overall consistency here, then it's a
funny sort of table. If you have this consistency, then label its scope
(i.e. rows as "odd" or "even") and then bind the CSS properties to the
CSS classes in the stylesheet, where it belongs.

One letter class names are OK, but don't actually gain you that much.

Apr 28 '06 #5
On Fri, 28 Apr 2006, Andy Dingley <di*****@codesmiths.com> wrote:
(i.e. rows as "odd" or "even")


Isn't it a pity that there's no way to specify that (for rows or
columns) directly in CSS?

The nearest I've got to it is specifying styles for e.g:

tr, tr+tr+tr, tr+tr+tr+tr+tr etc. for the odd rows,
tr+tr, tr+tr+tr+tr etc. for the even rows.

OK, so assigning a class to the *rows* would be no big deal; but when
you want to style the *columns* too, then it gets to be a chore (and a
waste of HTML) having to add class=odd|even to every wretched cell.
Then the tr+tr+tr or td+td+td selectors seem to me, out of the
available toolkit, to be quite a tolerable compromise.

(Forgetting the browser-like operating system component for now, of
course).

http://ppewww.ph.gla.ac.uk/~flavell/tests/tablefun.html for a
small and simple demo "which I made earlier".
Apr 28 '06 #6
Alan J. Flavell wrote:
Isn't it a pity that there's no way to specify that (for rows or
columns) directly in CSS?


Given the negligible support of the attribute selectors we do have,
then I doubt it would matter much whether there ought to be or not.

I handle this sort of task with XSLT. Long-winded CSS is no problem to
me, I just add it at the step before.

Apr 28 '06 #7
On Fri, 28 Apr 2006, Andy Dingley <di*****@codesmiths.com> wrote:
Alan J. Flavell wrote:
Isn't it a pity that there's no way to specify that (for rows or
columns) directly in CSS?


Given the negligible support of the attribute selectors we do have,
then I doubt it would matter much whether there ought to be or not.

I handle this sort of task with XSLT. Long-winded CSS is no problem to
me, I just add it at the step before.


Oh, sure: long-winded HTML (i.e in this case with a class= on every
damned table cell) is also no problem to anyone who can write a
program to spew it out. But it's more a matter of taking a little
pride in what one extrudes out onto the world wild web - - and I'm
sure you really feel that way yourself, despite your occasional
remarks that might be interpreted to suggest otherwise :-}

Apr 28 '06 #8

Alan J. Flavell wrote:
But it's more a matter of taking a little
pride in what one extrudes out onto the world wild web - - and I'm
sure you really feel that way yourself, despite your occasional
remarks that might be interpreted to suggest otherwise :-}


I'm pragmatic. If ugly is the best the standard offers and it works,
then I'll make ugly. _Publishing_ live sites on the web is no place
for arguing as to how things ought to be, you just have to work with
what you have.

Apr 28 '06 #9
Andy Dingley <di*****@codesmiths.com> wrote:
Alan J. Flavell wrote:

But it's more a matter of taking a little
pride in what one extrudes out onto the world wild web - - and I'm
sure you really feel that way yourself, despite your occasional
remarks that might be interpreted to suggest otherwise :-}

I'm pragmatic. If ugly is the best the standard offers and it works,
then I'll make ugly. _Publishing_ live sites on the web is no place
for arguing as to how things ought to be, you just have to work with
what you have.


Another pragmatic POV:

I write HTML, JavaScript & CSS as the client-side rendering, and there
are a team of developers who use what I write to make the application
work. If I can provide simple classes like .r { text-align:right; } for
them to place programatically as THEY need it, it simplifies the work
for everyone involved. And if you store that class declaration as a
constant, then all you have to do is change that single constant to
change the way the site renders.

Granted, it's not exactly what CSS is best for, but sometimes you make
the best use of the tools to accomplish a task it was never intended to
accomplish.
Apr 28 '06 #10
On Fri, 28 Apr 2006 10:52:33 -0700, Tony
<to****@dslextreme.WHATISTHIS.com> wrote:
If I can provide simple classes like .r { text-align:right; }


That's not pragmatic, it's f*&%ing stupid.

Apr 28 '06 #11
On Fri, 28 Apr 2006, Tony wrote:
Another pragmatic POV:

I write HTML, JavaScript & CSS as the client-side rendering, and
there are a team of developers who use what I write to make the
application work. If I can provide simple classes like .r {
text-align:right; } for them to place programatically as THEY need
it, it simplifies the work for everyone involved.
You're showing no indication of listening. In particular to the
principle of separation of content from presentation, as designed into
the HTML/CSS design. As such, it seems that further discussion with
you would be pointless, and I'll try to keep that in mind from now on.
And if you store that class declaration as a constant, then all you
have to do is change that single constant to change the way the site
renders.


uh-uh, so next week you'd be happy to code stuff like:

.r { text-align: center; }

and

.blue { color: yellow; }

and so on?

Not for me, anyhow.
Apr 28 '06 #12
Harlan Messinger wrote:

you want column headers to be bottom-center-aligned.

.colhead { text-align: center; vertical-align: bottom; }


Better would be to use proper column header markup, with <thead> and
<th> elements. Then you may not need class selectors at all.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Apr 28 '06 #13
kchayka wrote:
Harlan Messinger wrote:
you want column headers to be bottom-center-aligned.

.colhead { text-align: center; vertical-align: bottom; }


Better would be to use proper column header markup, with <thead> and
<th> elements. Then you may not need class selectors at all.


At least not for headers.
Apr 28 '06 #14
In comp.infosystems.www.authoring.stylesheets Harlan Messinger <hm*******************@comcast.net> wrote:
| kchayka wrote:
|> Harlan Messinger wrote:
|>> you want column headers to be bottom-center-aligned.
|>>
|>> .colhead { text-align: center; vertical-align: bottom; }
|>
|> Better would be to use proper column header markup, with <thead> and
|> <th> elements. Then you may not need class selectors at all.
|
| At least not for headers.

At least not if all headers were styled one way and all the remaining
cells were styled one other way.

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------
Apr 29 '06 #15
In comp.infosystems.www.authoring.stylesheets Giggle Girl <mi*******@gmail.com> wrote:
| Hello! :)
| I am working on an app that uses dozens of tables, some with hundreds
| (or even thousands!) of rows. I am interested in formatting the tables
| using as much CSS as possible, so the HTML is barebones and
| easy-to-read/modify. While thinking up how to do it, I came up with
| this idea, which I welcome comments on:
|
| QUESTION: What are the pros and cons of using one letter class names
| for common TD cell formatting, like "nowrap" or "align=right", etc.
|
| Something like this:
|
| .l { text-align : left; }
| .c { text-align : center; }
| .r { text-align : right; }
|
| .t { vertical-align : top; }
| .m { vertical-align : middle; }
| .b { vertical-align : bottom; }
|
| .w { white-space : wrap; }
| .nw { white-space : nowrap; }
|
| This would enable you to do "shorthand" for formatting cells, like
| this:
|
| <td class="c t nw">100 million</td>
|
| where this particular cell centered horizontally, middled vertically,
| and with no wrapping...
|
| What do you think?

I'm working on learning a lot of CSS right now (as opposed to having just
picked up a few tidbits in the past and not really applying them right).
My impression is that CSS is for styling purposes. It is not intended as
an HTML macro capability. You could effectively use it that way in a few
cases such as this, but that's not it's purpose.

The issue is to separate style and content. Content is what changes when
you have different data that should be shown the same way. Style is how
you want to present the content. Style would be changed if you want to
present the same content in a different way ... a different style. That
would be a guideline for what goes into HTML content and what goes into
CSS style.

All the TD cells that will always be styled the same way within a given page
should all be in the same one class. Then all the style settings for that
class would be in one CSS block for that class. The idea is to be able to
change the _style_ without changing the content. This is especially valuable
when the content is generated by software that is readily changed (e.g. a
page produced by server side scripting which could be in a compiled language
such as Java or C).

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------
Apr 29 '06 #16
In comp.infosystems.www.authoring.stylesheets Alan J. Flavell <fl*****@physics.gla.ac.uk> wrote:
| On Fri, 28 Apr 2006, Andy Dingley <di*****@codesmiths.com> wrote:
|
|> Alan J. Flavell wrote:
|>
|> > Isn't it a pity that there's no way to specify that (for rows or
|> > columns) directly in CSS?
|>
|> Given the negligible support of the attribute selectors we do have,
|> then I doubt it would matter much whether there ought to be or not.
|>
|> I handle this sort of task with XSLT. Long-winded CSS is no problem to
|> me, I just add it at the step before.
|
| Oh, sure: long-winded HTML (i.e in this case with a class= on every
| damned table cell) is also no problem to anyone who can write a
| program to spew it out. But it's more a matter of taking a little
| pride in what one extrudes out onto the world wild web - - and I'm
| sure you really feel that way yourself, despite your occasional
| remarks that might be interpreted to suggest otherwise :-}

I'd rather put the class on the TABLE element just once instead of having
it on each and every TD element. As I'm learning CSS right now, I think
that could work with: TABLE.myclass * TD { ... }

And if you have only one table, then why even bother with a class.

Of course if each _column_ in a multi column table needs to be styled in
a slightly different way, that gets harder. I saw some things that looked
like it could still be handled by specifying instance numbers in CSS. But
if the specific column positions could vary and need to be handled by name,
then you probably end up having to put the column name in each TD class.

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------
Apr 29 '06 #17
In comp.infosystems.www.authoring.stylesheets Tony <to****@dslextreme.whatisthis.com> wrote:

| I write HTML, JavaScript & CSS as the client-side rendering, and there
| are a team of developers who use what I write to make the application
| work. If I can provide simple classes like .r { text-align:right; } for
| them to place programatically as THEY need it, it simplifies the work
| for everyone involved. And if you store that class declaration as a
| constant, then all you have to do is change that single constant to
| change the way the site renders.

Sounds like they need a programming toolkit to dynamically construct the
style. But I would think it should be possible to copy the default style
first, then generate the programmatically specific changed following it
(maybe within STYLE elements in the HTML so the CSS file can be the default
and remain static).
| Granted, it's not exactly what CSS is best for, but sometimes you make
| the best use of the tools to accomplish a task it was never intended to
| accomplish.

Sounds like you're not a programmer, and your programmers are not making
good use of abstractions in their application design.

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------
Apr 29 '06 #18
Fri, 28 Apr 2006 11:26:08 +0200 from Sid Ismail <el***@nospam.co.za>:
On 27 Apr 2006 13:17:24 -0700, "Giggle Girl" <mi*******@gmail.com>
wrote:

: My biggest fear is it will get expensive processor-wise.

How much do you play for each millisecond?


I'll assume you actually don't know the expression and weren't just
being snarky.

Programmers have long used the terms "cheap" and "expensive" to mean
"using little processor time" and "using much processor time". It's a
metaphor. True, it dates back to the days when many people did pay
for processor time by the minute or hour, but today it has nothing
more to do with money than the expression "beating a dead horse" has
to do with abuse of animals.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Apr 29 '06 #19
Alan J. Flavell wrote:
On Fri, 28 Apr 2006, Tony wrote:

Another pragmatic POV:

I write HTML, JavaScript & CSS as the client-side rendering, and
there are a team of developers who use what I write to make the
application work. If I can provide simple classes like .r {
text-align:right; } for them to place programatically as THEY need
it, it simplifies the work for everyone involved.

You're showing no indication of listening. In particular to the
principle of separation of content from presentation, as designed into
the HTML/CSS design. As such, it seems that further discussion with
you would be pointless, and I'll try to keep that in mind from now on.


I am fully aware of the separation of content & presentation. However it
seems that you are not very aware of some of the practical implications
of working with a large team of coders.
And if you store that class declaration as a constant, then all you
have to do is change that single constant to change the way the site
renders.


uh-uh, so next week you'd be happy to code stuff like:

.r { text-align: center; }

and

.blue { color: yellow; }


Seems that you're the one not listening. If the change were to be made,
it would be made on the server side, by changing a constant definition
so that it would render as class="c" or class="yellow"
Apr 29 '06 #20
ph**************@ipal.net wrote:
In comp.infosystems.www.authoring.stylesheets Tony <to****@dslextreme.whatisthis.com> wrote:

| Granted, it's not exactly what CSS is best for, but sometimes you make
| the best use of the tools to accomplish a task it was never intended to
| accomplish.

Sounds like you're not a programmer, and your programmers are not making
good use of abstractions in their application design.


Well, you're certainly entitled to your opinion.

Apr 29 '06 #21
Gazing into my crystal ball I observed Tony
<to****@dslextreme.WHATISTHIS.com> writing in
news:12*************@corp.supernews.com:
I am fully aware of the separation of content & presentation. However
it seems that you are not very aware of some of the practical
implications of working with a large team of coders.
And if you store that class declaration as a constant, then all you
have to do is change that single constant to change the way the site
renders.


uh-uh, so next week you'd be happy to code stuff like:

.r { text-align: center; }

and

.blue { color: yellow; }


Seems that you're the one not listening. If the change were to be
made, it would be made on the server side, by changing a constant
definition so that it would render as class="c" or class="yellow"


That's not the point of CSS. The programmers should not be involved
with the client side stuff at all. All they should be doing is the
server side stuff that generates the HTML that the stylesheet decorates,
and javascript (if applicable) enhances.

For example, at http://www.hfglendale.org, which uses different
stylesheets depending on the liturgical calendar, there is a snippet
that says:

for i = 0 to howmanyrows
if i mod 2 = 0 then
theclass = "colora"
else
theclass = "colorb"
end if
<tr class="<%=theclass%>">...</tr>
next

The definition for classb changes according to which stylesheet is in
use. Colora is always #fff, but colorb changes according according to
the liturical color, during Lent colorb is pale violet, during Easter
and Chrismas, it's pale gold, during Ordinary time, its pale green, and
for Pentacost, it's pale red. The point is, I still get a greenbar
style table, but it's _only_ the CSS that has the definition. If the
church suddenly decided to add another season, and make it blue, it
would be a very simple matter of defining a pale blue for colorb in the
blue stylesheet, there would really be no need for much other code.

--
Adrienne Boswell
Please respond to the group so others can share
http://www.cavalcade-of-coding.info
Apr 30 '06 #22
On Sat, 29 Apr 2006, ph**************@ipal.net wrote:
In comp.infosystems.www.authoring.stylesheets Alan J. Flavell
<fl*****@physics.gla.ac.uk> wrote:

| Oh, sure: long-winded HTML (i.e in this case with a class= on every
| damned table cell) is also no problem to anyone who can write a
| program to spew it out. But it's more a matter of taking a little
| pride in what one extrudes out onto the world wild web - - and I'm
| sure you really feel that way yourself, despite your occasional
| remarks that might be interpreted to suggest otherwise :-}

I'd rather put the class on the TABLE element just once instead of
having it on each and every TD element.
This thread seems to have lost its way. I was following-up to a
suggestion about marking rows or columns as "odd" or "even" so that
they could be styled distinctively. You can't do that by merely
sticking a class on the whole table.

You /could/ do it by putting a class on every cell[1]. /Or/ you could
do it (in supporting browsers) by use of selectors like td+td,
td+td+td etc. as I already showed.
Of course if each _column_ in a multi column table needs to be
styled in a slightly different way, that gets harder. I saw some
things that looked like it could still be handled by specifying
instance numbers in CSS.


Do you have a cite for that?
[1] or just on alternate cells, if you don't mind being unsymmetrical.
Apr 30 '06 #23
On Sat, 29 Apr 2006, Tony wrote:
Alan J. Flavell wrote:
You're showing no indication of listening. In particular to the
principle of separation of content from presentation, as designed
into the HTML/CSS design.
I am fully aware of the separation of content & presentation.


You're not showing it much...
However it seems that you are not very aware of some of the
practical implications of working with a large team of coders.


Out here we aren't tied-down by the shortcomings of your internal
process: we're more interested in the quality of what you finally
extrude onto the web. If that's at variance with the underlying
principles, then I'd say we'd have every right to comment on that, no
matter that you attempt to set your own incompatible criteria.
And if you store that class declaration as a constant, then all
you have to do is change that single constant to change the way
the site renders.


uh-uh, so next week you'd be happy to code stuff like:

.r { text-align: center; }

and
.blue { color: yellow; }


Seems that you're the one not listening. If the change were to be
made, it would be made on the server side, by changing a constant
definition so that it would render as class="c" or class="yellow"


You pretty-much make my point for me. It looks as if you really don't
understand that you have put the presentation (which should be
basically in the stylesheet) right back into the content (HTML),
thereby causing you to rewrite all the web pages in order to make
changes to the stylesheet. This has all kinds of consequences in
terms of cacheability, stability relative to web indexing services,
and so on. Quite apart from being apparently predicated on the
assumption that there would be only one valid presentation in effect
at any given time.

If this is what your internal process has led you to do, I say you
would be advised to review your internal process. Andy D has made the
point rather more emphatically, but the meaning is, I think, much the
same.
Apr 30 '06 #24
To further the education of mankind, "Alan J. Flavell"
<fl*****@physics.gla.ac.uk> vouchsafed:
[1] or just on alternate cells, if you don't mind being unsymmetrical.


I prefer being asymmetrical, but modifying equally-alternating items in the
same way is not that. :)

--
Neredbojias
Infinity has its limits.
Apr 30 '06 #25
In comp.infosystems.www.authoring.stylesheets Alan J. Flavell <fl*****@physics.gla.ac.uk> wrote:
| On Sat, 29 Apr 2006, ph**************@ipal.net wrote:
|
|> In comp.infosystems.www.authoring.stylesheets Alan J. Flavell
|> <fl*****@physics.gla.ac.uk> wrote:
|>
|> | Oh, sure: long-winded HTML (i.e in this case with a class= on every
|> | damned table cell) is also no problem to anyone who can write a
|> | program to spew it out. But it's more a matter of taking a little
|> | pride in what one extrudes out onto the world wild web - - and I'm
|> | sure you really feel that way yourself, despite your occasional
|> | remarks that might be interpreted to suggest otherwise :-}
|>
|> I'd rather put the class on the TABLE element just once instead of
|> having it on each and every TD element.
|
| This thread seems to have lost its way. I was following-up to a
| suggestion about marking rows or columns as "odd" or "even" so that
| they could be styled distinctively. You can't do that by merely
| sticking a class on the whole table.

It might be doable if CSS had :even and :odd selectors which worked in
a way similar to :first-child. Getting the next row to reverse that
sense would be an extra set of selectors based on both row and column
selections.

So maybe someone will add this to CSS3?

It might also help if they go the whole way and allow arithmetic
expressions in selectors to select which instance of child to be
matched with that selector.

I could also argue that certain things, like the colors of a Chess board,
are content, not style.

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------
Apr 30 '06 #26
ph**************@ipal.net writes:
I could also argue that certain things, like the colors of a Chess board,
are content, not style.


You could argue, but you couldn't make a point. Squares on a chess
board are identified by the number of the row and the letter of the
column. Their colors are totally irrelevant even for a beginner.

What needs to be identified on an abstract level is the player at move
(counting from one, neither white nor nil :) and the initial and new
alphanumeric position of the piece. Shapes, colors and even names are
but e(ye|ar) candy; that's why good players can play without the
hardware in the first place.

Even if you want to represent just one frame of a match, the real
information is still provided by the position of the pieces, and the
conventional assignment to 'white' and 'black' has seldomly any
resemblance with colors of a nice physical wooden edition, has it?

It's just the same with markup and style sheets. You have information,
and you have supporting representation (admittedly, HTML is very poor at
its descriptive value).
--
||| hexadecimal EBB
o-o decimal 3771
--oOo--( )--oOo-- octal 7273
205 goodbye binary 111010111011
Apr 30 '06 #27
Adrienne Boswell wrote:

That's not the point of CSS. The programmers should not be involved
with the client side stuff at all. All they should be doing is the
server side stuff that generates the HTML that the stylesheet decorates,
and javascript (if applicable) enhances.


I agree in principle. In practice, the fact that I have to provide HTML,
javascript & CSS to five developers, all on a deadline, means that I
can't always stop what I'm doing to provide them with new classes for
something they're working on, without holding someone up (and causing
them to miss deadlines). So I provide convenient shorthands for those times.

I PREFER to use CSS in the proper manner, but classroom theory doesn't
always hold up when it meets with real-world pressures.
May 1 '06 #28
Alan J. Flavell wrote:
On Sat, 29 Apr 2006, Tony wrote:

Alan J. Flavell wrote:
You're showing no indication of listening. In particular to the
principle of separation of content from presentation, as designed
into the HTML/CSS design.


I am fully aware of the separation of content & presentation.


You're not showing it much...

However it seems that you are not very aware of some of the
practical implications of working with a large team of coders.


Out here we aren't tied-down by the shortcomings of your internal
process:


And you made my point rather well with that statement.
May 1 '06 #29
Sun, 30 Apr 2006 21:31:33 +0200 from Eric B. Bednarz <bednarz@fahr-
zur-hoelle.org>:
ph**************@ipal.net writes:
I could also argue that certain things, like the colors of a Chess board,
are content, not style.


You could argue, but you couldn't make a point. Squares on a chess
board are identified by the number of the row and the letter of the
column. Their colors are totally irrelevant even for a beginner.


Oh? What about "the queen starts on her own color" and "a bishop
always stays on its own color"?

Yes, it's _possible_ to frame those rules in different ways, but the
use of color is the most natural.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
May 2 '06 #30
In comp.infosystems.www.authoring.stylesheets Tony <to****@dslextreme.whatisthis.com> wrote:
| Adrienne Boswell wrote:
|>
|> That's not the point of CSS. The programmers should not be involved
|> with the client side stuff at all. All they should be doing is the
|> server side stuff that generates the HTML that the stylesheet decorates,
|> and javascript (if applicable) enhances.
|
| I agree in principle. In practice, the fact that I have to provide HTML,
| javascript & CSS to five developers, all on a deadline, means that I
| can't always stop what I'm doing to provide them with new classes for
| something they're working on, without holding someone up (and causing
| them to miss deadlines). So I provide convenient shorthands for those times.
|
| I PREFER to use CSS in the proper manner, but classroom theory doesn't
| always hold up when it meets with real-world pressures.

And cross-over skills can mean that your best Javascript people could well
be your programmers.

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------
May 2 '06 #31
In comp.infosystems.www.authoring.stylesheets Stan Brown <th************@fastmail.fm> wrote:
| Sun, 30 Apr 2006 21:31:33 +0200 from Eric B. Bednarz <bednarz@fahr-
| zur-hoelle.org>:
|> ph**************@ipal.net writes:
|>
|> > I could also argue that certain things, like the colors of a Chess board,
|> > are content, not style.
|>
|> You could argue, but you couldn't make a point. Squares on a chess
|> board are identified by the number of the row and the letter of the
|> column. Their colors are totally irrelevant even for a beginner.
|
| Oh? What about "the queen starts on her own color" and "a bishop
| always stays on its own color"?

He has funny colored pieces?

He's probably matching lightest board color to lightest piece color
and such.

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------
May 2 '06 #32
Stan Brown wrote:
Sun, 30 Apr 2006 21:31:33 +0200 from Eric B. Bednarz <bednarz@fahr-
zur-hoelle.org>:
ph**************@ipal.net writes:

I could also argue that certain things, like the colors of a Chess board,
are content, not style.
You could argue, but you couldn't make a point. Squares on a chess
board are identified by the number of the row and the letter of the
column. Their colors are totally irrelevant even for a beginner.

Oh? What about "the queen starts on her own color" and "a bishop
always stays on its own color"?


"white on right"?

Yes, it's _possible_ to frame those rules in different ways, but the
use of color is the most natural.

May 2 '06 #33
Stan Brown wrote:
Sun, 30 Apr 2006 21:31:33 +0200 from Eric B. Bednarz <bednarz@fahr-
zur-hoelle.org>:
ph**************@ipal.net writes:
I could also argue that certain things, like the colors of a
Chess board, are content, not style.

You could argue, but you couldn't make a point. Squares on a chess
board are identified by the number of the row and the letter of
the column. Their colors are totally irrelevant even for a
beginner.


Oh? What about "the queen starts on her own color" and "a bishop
always stays on its own color"?


Those are heuristics; the former doesn't state the rule about where on
the board the queen starts, and the latter doesn't state the permitted
moves for a bishop. They are useful (to a novice player, perhaps) in
visualising possible states of the board.

More to the point: the phrase "its own colour" doesn't name any
particular colour. It's a placeholder for a real colour, which one might
imagine being added after the fact, as it were by CSS.

--
Jack.
May 2 '06 #34
In comp.infosystems.www.authoring.html Tony <to****@dslextreme.whatisthis.com> wrote:
| Alan J. Flavell wrote:
|> On Sat, 29 Apr 2006, Tony wrote:
|>
|>
|>>Alan J. Flavell wrote:
|>>
|>>>You're showing no indication of listening. In particular to the
|>>>principle of separation of content from presentation, as designed
|>>>into the HTML/CSS design.
|>>
|>>I am fully aware of the separation of content & presentation.
|>
|> You're not showing it much...
|>
|>
|>>However it seems that you are not very aware of some of the
|>>practical implications of working with a large team of coders.
|>
|> Out here we aren't tied-down by the shortcomings of your internal
|> process:
|
| And you made my point rather well with that statement.

Just to clarify, there is so much of the "web standards" community that
is out of touch with the real world. I remember when people started to
push "web standards" faily heavily a few years ago (no one specific date,
it just came along gradually). At that time, much _more_ could be done
with the HTML tricks people had discovered than stylesheets were capable
of doing with the browsers of the day. And what I mean by browsers of
the day were NOT the ones just released, but rather, the ones that people
were actually using, many of which didn't support CSS at all. Yet tricks
like creating page layouts with every shim and wedge done in horribly
nested tables and transparent GIFs were at least working. All the while
a group of people were preaching the "web standards" religion only so far
as trying to convince developers how important it was, and doing little
or nothing to help actually get things moving to the point where such
"web standards" could be used. Back in those days, the browsers that did
support CSS were crap (example, Netscape 4, which was ... I know because
I benchmarked it ... an average of 22.5 times slower that the previous
Netscape 3 at rendering pages). So the suggestion made by the zealots of
"web standards" to "upgrade your browser" wasn't yet a viable option.
And these very same people refused to pressure the browser developers to
expedite these and other fixes that would make new browsers viable. But
given enough time passing, and new faster CPUs, we have (IMHO) reached a
level where the latest browser is one which I can feel good about urging
people I know to upgrade to ... Firefox 1.5 ... and 1.5.0.3 is now out.

But still, the "web standards" religion continues in the form of lack of
specific help by so many of them. They refuse to answer specific questions
on how to do things, or try to get you to back down on your layout needs
(that would work using the old HTML tricks, but may or may not work in the
latest CSS across a reasonable set of browsers). All they say is you need
to "understand" the principle, and that somehow all will fall into place.
Yet the details are lacking in how they help.

Business is about getting things done, not about promoting some religion.
Making something work, at least reasonably so, in a sufficient number of
browsers that cover the vast majority of (e.g. nearly all) users, is more
important than making the way it was coded fit someone else's idea of what
is correct or elegant.

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------
May 3 '06 #35
ph**************@ipal.net wrote:

Business is about getting things done, not about promoting some
religion. Making something work, at least reasonably so, in a
sufficient number of browsers that cover the vast majority of (e.g.
nearly all) users, is more important than making the way it was coded
fit someone else's idea of what is correct or elegant.

That depends on your POV, actually.

When writing instructions for a computer, it's much easier to code in a
regular language (one that obeys rules) than to express what you want
done precisely using (say) idiomatic French. Similarly, given a regular
language for describing web-pages, it's much easier to describe a page
using that language, than to do it using a language that's riddled with
quirks.

That's assuming that you are starting from zero, of course - that you
have to learn whichever language you decide to use. I'm also assuming
that the page is non-trivial; for a trivial page, it's often easiest to
just guess what the correct HTML would look like, see if it works, and
tweak it if it doesn't. Obviously these assumptions are counterfactuals;
lots of people are already familiar with quirky HTML, and many pages are
in fact trivial.

Given that most of the HTML on the web is written using some language
that is not regular, and this stuff needs maintaining; and given that
there is a large pool of quirks-mode-only coders out there; it follows
that there is a natural resistance to the take-up of the practice of
standards-compliant web-coding. And that resistance means that effort
has to be applied to produce standards-compliant pages. The benefits of
doing this include real business benefits; but in the short term,
standards compliance may appear to be more costly, and therefore less
business-friendly.

That's just an illusion, though; and short-termism in business is
generally considered A Bad Thing.

I've not so far mentioned the biggest (business) benefit of coding using
a regular variant of HTML, which is that the most modern forms of HTML
'harmonise' with XML. Harmonising with XML makes it dramatically easier
to generate pages automatically, and therefore cheaply.

--
Jack.
May 3 '06 #36
In comp.infosystems.www.authoring.html Jack <mr*********@nospam.jackpot.uk.net> wrote:

| Given that most of the HTML on the web is written using some language
| that is not regular, and this stuff needs maintaining; and given that
| there is a large pool of quirks-mode-only coders out there; it follows
| that there is a natural resistance to the take-up of the practice of
| standards-compliant web-coding. And that resistance means that effort
| has to be applied to produce standards-compliant pages. The benefits of
| doing this include real business benefits; but in the short term,
| standards compliance may appear to be more costly, and therefore less
| business-friendly.

And business generally works in the short term, unfortunately. I can
understand the benefits of standards compliance. But compliance needs
more than just web site developers doing so ... it also needs browsers
to comply. If every major browser provider had a fully 100% standards
compliant browser out now, that was not also full of security issues,
performance issues, memory bloat, and bugs, then it would simply be a
matter of urging people to upgrade their browser to the latest version
of the _same_ browser (insted of trying to get them to switch to one
they are not familiar with). If it were that simple, moving on to more
standards compliant web sites would be a lot easier. But in business,
it's about getting the number of eyes seeing your product, not about
having some "behind the scenes code" few people ever see being "just
right". If you lose 5% of your readers/visitors because your site is
ugly or doesn't work in the old browsers lots of people still use, then
your competition, which is tweaking with quirks, can start to outsell
you.

Those who want to promote web standards need to be doing this promotion
most heavily on the browser makers. Having many web sites be strictly
web standards compliant certain is a component of that effort. But do
not expect everyone to do that on their web sites.
| That's just an illusion, though; and short-termism in business is
| generally considered A Bad Thing.

Nevertheless, business tends to operate that way, mostly because investors
want short term ROI.
| I've not so far mentioned the biggest (business) benefit of coding using
| a regular variant of HTML, which is that the most modern forms of HTML
| 'harmonise' with XML. Harmonising with XML makes it dramatically easier
| to generate pages automatically, and therefore cheaply.

At much short term cost.

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------
May 3 '06 #37

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

30
by: Stephen Horne | last post by:
Some more looping thoughts - this time on integer for loops... There may be some hint towards PEP284 (integer for loops) in a review of ideas from other languages, but I'm damned if i can figure...
39
by: Marco Aschwanden | last post by:
Hi I don't have to talk about the beauty of Python and its clear and readable syntax... but there are a few things that striked me while learning Python. I have collected those thoughts. I am...
1
by: Steve | last post by:
I'm still a database newbie so I would like to solicit thoughts about the smartest way to do something in sqlserver. My company has a web application that we customize for each client. We can...
4
by: Rajan | last post by:
Hi All C++ Experts Can anybody share some of your thoughts in Member Function Templates implementation.Can you also give some example on it Best Regards Raj
2
by: Ian | last post by:
Hi there, I wanted to get anybodys thoughts on using the following... <script src="http://test.com/myscript.js"></script> for including functions etc in the html page, of course I could...
35
by: Justin Weinberg | last post by:
My thoughts on this.... http://msdn.microsoft.com/vbasic/Future/default.aspx?pull=/library/en-us/dnvs05/html/vb9overview.asp My thoughts: 1. Regarding Implicit types, I don't use type...
36
by: Giggle Girl | last post by:
Hello! :) I am working on an app that uses dozens of tables, some with hundreds (or even thousands!) of rows. I am interested in formatting the tables using as much CSS as possible, so the HTML...
2
Stang02GT
by: Stang02GT | last post by:
Hello, I would just like to get your thoughts/ideas/suggestions on how I should go about createing a VERY SIMPLE purchasing system. A friend has asked me help him develop a simple purchasing...
1
Stang02GT
by: Stang02GT | last post by:
Hello, I'm looking for your thoughts, ideas, and suggestions on this situation. I have recently been given the task to "fix" a menu within the companies intranet site. The current menu...
0
by: grazzy.cool | last post by:
"Change your language and you change your thoughts." Learn English and free download Grammar & dictionary. Just click the website and share ur thoughts…. "Language shapes the way we think, and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.