[Seaside] CSS classes naming convention

radoslav hodnicak rh at 4096.sk
Fri Mar 18 16:50:30 CET 2005


On Fri, 18 Mar 2005, Avi Bryant wrote:

> I wonder about using prefixes vs. multiple classes.  For example, if
> instead we did
>
> <div class="container WADateEntry">...</div>
>
> Then we could have some css styles that applied to *all* containers,
> and some specific to WADateEntry:
>
> .container {border: solid 1px}
> .WADateEntry {background-color: green}
>
> It would also allow multiple categorization and thus a richer taxonomy:
>
> <div class="container date input validated WADateEntry">...</div>

Yes.

> To define a skin, just add that skin's class as a prefix to every CSS selector:
>
> .small .container {border: dashed}
> .small .WADateEntry {margin: 2px}

And yes.

Multiple classes and nested definitions is the way to go. I won't write
things like

html divClass: 'container-editor-form-button-warning' with: ...

rado



More information about the Seaside mailing list