Re: CSS, css, etc. [css layout should be symmetrical]

On Wednesday 20 February 2002 21:10, Ian Hickson wrote:
|   Vadim Plessky wrote:
[..]
|   > Well, I can understand when you speak on behalf of Mozilla
|
|   Nothing I say is ever on behalf of Mozilla. I have no authority to speak
| on behalf of the mozilla.org project.

ok. thanks for clarification.
|
|    > - but please do not make such long-term judgements basing on it.
|
|   I have no idea what this means.

I wrongly made assumption that you were speaking on behalf of Mozilla, and 
you were saying that Mozilla is not going to drop support for tables in the 
future.
Hopefully, I was mistaken, and there is a chance that we will get 
Mozilla-Lite at some point in the future, without any bloated features (like 
Tables)  :-))

|
|   > If you can check WAI-IG mailing list archives: many people use Lynx
|
|   Including me. What has that got to do with anything to do with CSS?

Obviously, Lynx doesn't support CSS.
And some people clearly indicated that they need *simple* browser, like Lynx, 
with support of key CSS features.
Some of those people use rather old equipment, and they can't install latest 
Mozilla or MS IE on WinNT. And they still want to use CSS!..

[...]
|   > The fact that Tables are *mandatory* in CSS2 means that we need skip
|   > CSS2 (from implementor's point of view) and accelerate adoption of
|   > CSS3.
|
|   They could also skip CSS3 altogether and simply implement CSS4. Or skip
| the whole of CSS and go back to HTML 3.2. I doubt they will, though.

Has W3C announced CSS4? Something new for me.
I also do not understand your proposal to "skip the whole of CSS and go back 
to HTML 3.2".
I guess you just mixing Structural and Presentation layout/markup.
HTML is more about structure (but indeed has some presentation attributes), 
CSS defines presentational (VIsual or Aureal) rendering.

If we want to replace CSS, I guess the only alternative can be (in some way) 
Display Postscript (DPS).
Obviously, you can build up translation engine which will convert XML + some 
extra attributes to PostScript (DPS).
Apple demonstrated something similar with Quartz - but I don't have Mac and 
can't make any judgement so far.
Due to closed-source of Quartz, it's unlikely it will get any kind of 
adoption outside of niche Mac/Graphics Arts market. 

|
|   > Who cares about CSS2 nowdays?
|
|   CSS2 is the latest revision of CSS. Anybody who is implementing CSS
| should be basing their implementation on CSS2.

Tell this to Microsoft, Netscape/Mozilla and Opera.
It would be nice to hear their response than.

|
|   > There is a CSS3, and there is no reason to implement *old* stuff when
|   > you can go directly to a newer one.
|
|   There is no CSS3 REC.

well, if we follow Microsoft development temps/dev.cycles (refer here to 
Windows platform only), we will have their implementation 5-7 years after the 
release of REC.
I simply can't wait so long.
I need working solutions now, not in 5 years time frame.

Mozilla project also doesn't have a promise to deliver working solution soon.
So, what's your proposal?
Skip CSS and go back to HTML 4.0?

|
|   >> No. The special properties were added so that table-like grid layout
|   >> could be done in CSS for _any_ markup language, including HTML and
|   >> XHTML.
|   >
|   > Theoretically, that's right.
|   > But I did some research in that direction - and it shows that neither
|   > Mozilla nor MS IE can render CSS2 'table-*' properties. Konqueror
|   > handles it much better but still fails on some tetss.
|
|   That is incorrect. I have already pointed you to one of my CSS
| table-based pages, here is another:
|
|       http://www.mozillaquestquest.com/

well, take my example below and enjoy.
I had a lot of fun developing this example, and testing it in different 
browsers.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>New Puzzle - emulate TABLE layout with { display: table-cell } * XHTML 
strict</title>

<style TYPE="text/css">
body, p {
	  	font-family: "Arial", "Helvetica", sans-serif;
		font-size: 10pt;
	  }
 h4 {
		font-family: "Arial", "Helvetica", "Geneva", sans-serif;;
		font-size: 10pt;
 	}
/* center tables */
 table { margin-left: auto;
 	margin-right: auto; }

/* TABLE A - container  */
  .a {  width: 300px;
  	border: 5px solid yellow;
  	background: #B0E0FF;
/* instead of centering, put left margin at 200px -
    - it should be ok for modern (1024x768) displays
 */
	margin-left: 200px;
	margin-right: auto;
 	}
/* TABLE B - table with cells 1,2,3,4,5,6,7,8,9  */
  .b {  border: 5px solid brown;
 	}

.pseudotd 	{
/* most important part effecting differences in layout
   between Konqueror and MS IE 5.x, 6.0 - display : block;
 */
	display : block;
 	font-family: "Arial", "Helvetica", "Geneva", sans-serif;
	font-size: 16pt;
 	font-weight : bold;
 	display : block;
 	margin: 5px;
	border: 4px solid lime;
 	padding: 5px;
 	text-align: center;
 	vertical-align: middle;
 	}

.realtd 	{
/* "realtd" has { display: table-cell } definition, while
    "pseudotd" - display : block;
 */
	display : table-cell;
 	font-family: "Arial", "Helvetica", "Geneva", sans-serif;
	font-size: 16pt;
 	font-weight : bold;
 	display : block;
 	margin: 5px;
	border: 4px solid lime;
 	padding: 5px;
 	text-align: center;
 	vertical-align: middle;
 	}

.realtr { display: table-row }

.realtable { display: table }

 #nicebg {
 	background: #004080;
	border: 5px dashed red;
	}

 .white	{ color: white; }
 .red  	{ color: red; }
 .blue	{ color: blue; }
 .green	{ color: green; }
 .yellow	{ color: yellow; }

 div { 	margin-left: auto;
 	margin-right: auto;
	width: 300px;
	}

/* used for styling TD in Container's table */
 #cont {
/* comparing to puzzle-2.html, I disabled any definition for 'width' here */
/*
 	width: 100%;
 */
 	vertical-align: middle;
	border: 5px dashed brown;
 	}

 </style>
</head>

<body>
<!-- due to some DIV alignment glitches in several browsers,
   I use TABLE here to center results of rendering
-->
<table class="a" cellspacing="2" cellpadding="2">
  <TR>
    <TD id="cont">
	<p>Emulate TABLE layout with { display: table }, table-row. Table cells (TD) 
have
	{ display: table-cell } definition</p>
<!-- TABLE   -->
	<span class="realtable" id="nicebg">
<!-- TR  -->
		<span class="realtr">
	<!--	class="realtd"  display : table-cell;    -->
		    <span class="realtd" STYLE="color:red">1</span>
		    <span class="realtd" STYLE="color:green">2</span>
		    <span class="realtd" STYLE="color:yellow">3</span>
		</span>
		<span class="realtr">
		    <span class="realtd" STYLE="color:green">4</span>
		    <span class="realtd" STYLE="color:yellow">5</span>
		    <span class="realtd" STYLE="color:red">6</span>
		</span>
		<span class="realtr">
		    <span class="realtd" STYLE="color:yellow">7</span>
		    <span class="realtd" STYLE="color:red">8</span>
		    <span class="realtd" STYLE="color:green">9</span>
		</span>
	</span>  <!-- end of TABLE span  -->
</td></tr>
</table>
<!-- this document validates as HTML 4.0 Transitional  -->
<p>
   <a href="http://validator.w3.org/check/referer">
	<img src="valid-xhtml10.png" style="border:0"
        alt="Valid XHTML 1.0!" height="31" width="88" /></a>

 <a href="http://jigsaw.w3.org/css-validator/check/referer">
  <img style="border:0;width:88px;height:31px"
       src="vcss.gif"
       alt="Valid CSS!" /></a>
  </p>
</body>
</html>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  

|
|   > Can you explain Mozilla's position on this, please?
|
|   Mozilla has supported CSS2 table layout for years. Indeed it is used to
|   implement its HTML table support.


|
|   > Well, than we face more fundamental question: wether HTML should be
|   > used?..
|
|   Yes, HTML should be used.

Thanks for your opinion.
I would prefer HTML will die ASAP.
Together with XHTML, BTW.
We should go to XML, and forget about legacy support.

Designers do not tune their sites to W3C standards, anyway.
So it would be better to develop new standards without looking back at HTML, 
and use them in serious projects.
 
|
|   > I, personally, found even XHTML Basic too bloated, and would prefer to
|   > use XML when possible. (for example, on corporate Intranet, for
|   > presentations, etc.)
|
|   XHTML Basic _is_ XML.

It still have pre-defined elements.
This should _die_,  really!

Does XHTML explains how you should render this:

<table>
  <tr>
     <td>ha ha ha... How big am I?
     </td>
   </tr>
</table>

Should table be 100% of the screen?
Or just "wide enough" to render one <td> cell?

and, even more difficult:

<table>
  <tr>
     <td>ha ha ha... How big am I?
     </td>
     <td>me too!
      </td>
   </tr>
</table>

Should 2 <td> elements be equal in width?

BTW: I like MS IE solution when it renders XML with unknown DTD as a DOM 
tree, that's it. But MS IE will render XHTML treating it as HTML.
You will not get "XHTML parsing error" on not well-formed XHTML.
But you will get error on bad XML.

So I do no think your last statement was correct for 100%.
There are some differences in XHTML and *pure XML*,at least with rendering in 
modern browsers.
 
-- 

Vadim Plessky
http://kde2.newmail.ru  (English)
33 Window Decorations and 6 Widget Styles for KDE
http://kde2.newmail.ru/kde_themes.html
KDE mini-Themes
http://kde2.newmail.ru/themes/

Received on Thursday, 21 February 2002 11:10:43 UTC