cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Johnston <>
Subject Re: RFC: CForms Roadmap
Date Thu, 11 Jan 2007 01:25:21 GMT
Alexander Klimetschek wrote:
> Hi Jeremy, hi all,
> I have another feature request for Cforms: change the widget hierarchy 
> separator from "." to something else ("_"), eg. having a form called 
> "myform" containing a widget named "somefield" would result in the fully 
> qualified widget id "myform_somefield".
> The problem is that having a dot in the ids makes it very hard to do CSS 
> styling for the final HTML version of the form. This is because CSS id 
> selectors cannot contain a ".", that is reserved for class selectors. 

Can't you just escape the "."?

#myform\.somefield {...}

I remember CSS selectability was discussed back when the id naming rules 
were being proposed, and I thought I remembered this working correctly 
in the major browsers.

Here's some thread linkage:

> For example:
> #myform.somefield {
>   // styling...
> }
> is incorrect CSS or at least is interpreted as
> #myform .somefield {
>   // styling..
> }
> aka "element with id myform and below any element with the class 
> somefield".
> A way to work around is either to define your special classes via 
> fi:styling or to write complicated selectors that take the structure of 
> the HTML document into account (div.someclass div.foobar input.forms 
> ...). Both are very limited: fi:styling is difficult if you are using 
> custom styled elements (=custom XSL) where you cannot easily set a class 
> and it does not work if you want to use it together with the standard 
> classes like "active" or "output". And it requires the CSS designer to 
> change the form templates probably on each modification, which IMHO 
> violates separation of concerns. The other solution I don't wanna talk 
> about... ;-)
> Jeremy you said that the dot separator is basic assumption for all the 
> cforms java code, so that it would be a massive change. Nevertheless I 
> find it quite a major flaw in the cforms design (the only one I know of 
> ;-).
> Alex

View raw message