W3C home > Mailing lists > Public > www-html@w3.org > July 2004

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@[]>
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 

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


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

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
()  ASCII Ribbon Campaign -- against HTML mail & vCards
/\                  http://arc.pasp.de/
Received on Thursday, 29 July 2004 17:24:38 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:08 UTC