[Seaside] Support for CSS?

Kamil Kukura kamk@volny.cz
Fri, 26 Apr 2002 07:49:17 +0200


--------------090205080300000604000405
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

>
>
>On Thu, 25 Apr 2002, Nevin Pratt wrote:
>
>>So, does Seaside support CSS?  (either as an external file reference or
>>inline)
>>    
>>
>Both work, in SSVS.  <link> works just like <image>, so you can put
>external .css files wherever you're putting  your .jpgs, and inline style
>blocks work mostly because of the same hack that messes up <body>, which
>is that all of the head blocks from nested subcomponents are collected
>into the top-level <head>.  This means that little widgets/subcomponents
>can add their own <style> or <link> tags without too much trouble.
>
>The other thing Seaside does to support it is automatically insert CSS id
>attributes to match the sea:id attributes on dynamic tags, so <a
>href="@foo"> becomes <a href="/some/generated/url" id="foo">.
>  
>
According to HTML4, section 7.5.2:

    id = name [CS]
    This attribute assigns a name to an element. This name must be
    unique in a document.

So better is to use "class" attribute, which can appear with the same 
value multiple times. Although it can contain slash character (in case 
of "iterator/collection"), the stylesheets won't work with it. So 
probably it should be reformatted as class="iterator-collection".

    The class attribute, on the other hand, assigns one or more class
    names to an element; the element may be said to belong to these
    classes. A class name may be shared by several element instances.
    The class attribute has several roles in HTML:

        * As a style sheet selector (when an author wishes to assign
          style information to a set of elements).
        * For general purpose processing by user agents.

Then question is if class attribute is already specified should the 
implicit class be appended to the list of already specified classes or 
should it be omited. That is <a class="k1 k2" href="@foo"> could be either
<a class="k1 k2 foo" href="/some/generated/url">
or
<a class="k1 k2" href="/some/generated/url">

-- 
Kamil


--------------090205080300000604000405
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body>
<blockquote type="cite"
 cite="midPine.LNX.4.30.0204251043580.26341-100000@cable.beta4.com">
  <pre wrap="">On Thu, 25 Apr 2002, Nevin Pratt wrote:</pre>
  <blockquote type="cite">
    <pre wrap="">So, does Seaside support CSS?  (either as an external file reference or
inline)
    </pre>
  </blockquote>
  <pre wrap=""><!---->Both work, in SSVS.  &lt;link&gt; works just like &lt;image&gt;, so you can put
external .css files wherever you're putting  your .jpgs, and inline style
blocks work mostly because of the same hack that messes up &lt;body&gt;, which
is that all of the head blocks from nested subcomponents are collected
into the top-level &lt;head&gt;.  This means that little widgets/subcomponents
can add their own &lt;style&gt; or &lt;link&gt; tags without too much trouble.

The other thing Seaside does to support it is automatically insert CSS id
attributes to match the sea:id attributes on dynamic tags, so &lt;a
href="@foo"&gt; becomes &lt;a href="/some/generated/url" id="foo"&gt;.
  </pre>
</blockquote>
According to HTML4, section 7.5.2:
<blockquote><font color="#000099">id = name [CS] <br>
This attribute assigns a name to an element. This name must be unique in
a document.</font><br>
</blockquote>
So better is to use "class" attribute, which can appear with the same value
multiple times. Although it can contain slash character (in case of "iterator/collection"),
the stylesheets won't work with it. So probably it should be reformatted
as class="iterator-collection".<br>
<blockquote><font color="#000099">The class attribute, on the other hand,
assigns one or more class names to an element; the element may be said to
belong to these classes. A class name may be shared by several element instances.
The class attribute has several roles in HTML:<br>
  </font>
  <ul>
    <li><font color="#000099">As a style sheet selector (when an author wishes
to assign style information to a set of elements).</font></li>
    <li><font color="#000099">For general purpose processing by user agents.</font></li>
  </ul>
</blockquote>
Then question is if class attribute is already specified should the implicit
class be appended to the list of already specified classes or should it be
omited. That is <tt>&lt;a class="k1 k2" href="@foo"&gt;</tt> could be either<br>
<tt>&lt;a class="k1 k2 foo" href="/some/generated/url</tt><tt>"&gt;</tt><br>
or<br>
<tt>&lt;a class="k1 k2" href="/some/generated/url</tt><tt>"&gt;</tt><br>
<br>
-- <br>
Kamil<br>
<br>
</body>
</html>

--------------090205080300000604000405--