Welcome to WebHeadStart.org

Web Technologies

Sponsored By

WebHeadStart.org is currently in beta.
Please pardon our appearance as we work to provide you with the most comprehensive reference on today's web technologies.

Interested in advertising on WebHeadStart? Become an advertising partner today!

[WWW-HTML Mailing List Archive Home] [Messages By Thread] [Messages By Date]

Re: proposal for change of Flow.model

From: Christian Ottosson <christian@ottosson.name>
Date: Thu, 29 Jul 2004 23:22:15 +0200
Message-Id: <a05100300bd2e628673e4@[213.116.251.252]>
To: www-html@w3.org

At 09:37 +0200 2004-07-28, fantasai wrote:
>Karl Dubost wrote:
>>  Le 26 juil. 2004, à 13:11, fantasai a écrit :
>>>  How would you distinguish between an inline code snippet
>>>  and a block of code, which needs to be formatted as a
>>>  block and needs all its whitespace presented, etc.?
>>  display: block;
>>  display: inline;
>
>What, you mean to use a 'style' attribute to distinguish
>whether the code is a short fragment or a complete block?

Hello fantasai and others!

Is there a semantic difference between a short and a long sequence of code?

Whitespace should of course be presented appropriate for good 
readability. In my markup I will probably consider code inside a 
paragraph as a short/inline fragment and code directly in a section 
as a complete block. Exceptions can be classed different. Thus I will 
write:

<section>
   <p>To increase <var>i</var> I use <code>i++</code> in each loop.</p>
</section>

and

<section>
   <h>Adding a bike</h>
   <p>I have written a separate method to add a bike.</p>
   <code>
     private void addBike() {
         /* very interesting code here */
     }
   </code>
</section>

As css I can use (and [hope my browser will/tell by browser to] use 
as default):

section > code {
   display: block;
   /* whitespace as appropriate */
}

section p code {
   display: inline;
   /* whitespace as appropriate */
}

-- 
Christian Ottosson
http://christian.ottosson.name/ 
()  ASCII Ribbon Campaign -- against HTML mail & vCards
/\                  http://arc.pasp.de/ 
Received on Thursday, 29 July 2004 17:24:38 GMT
Valid XHTML 1.0! Valid CSS! Site Map | Privacy Policy | Terms of Use | WebHeadStart.org © 2005 All Rights Reserved.