[rt-users] maintainably tagging custom fields for CSS
Nicholas Clark
nick at ccl4.org
Thu Aug 16 09:31:38 EDT 2007
On Thu, Aug 16, 2007 at 09:18:05AM +0200, Espen Wiborg wrote:
> Nicholas Clark <nick at ccl4.org> writes:
> > Jesse, on IRC, has the alternative suggestion of using a class. It has the
> > advantage that it won't be invalid XML if two fields happen to end up with
> > the same ID. But what's going to be impractical in class names for CSS?
> >
> > I did this to map & and "
> <-snip->
> > But my HTML can be:
> >
> > <tr id="CF-9-EditRow" class="What next">
> >
> > Is that space in the class name going to be a problem?
> >
> > What's a sensible restriction on what can go in? Is there a CSS grammar for
> > what is(n't) valid in a class name?
>
> You can find the formal syntax and grammar for CSS2 here:
> http://www.w3.org/TR/REC-CSS2/grammar.html
>
> >From that definition and the examples given in
> http://www.w3.org/TR/REC-CSS2/syndata.html, you can do things like:
ident {nmstart}{nmchar}*
name {nmchar}+
nmstart [a-zA-Z]|{nonascii}|{escape}
nonascii [^\0-\177]
unicode \\[0-9a-f]{1,6}[ \n\r\t\f]?
escape {unicode}|\\[ -~\200-\4177777]
nmchar [a-z0-9-]|{nonascii}|{escape}
Mmm. Are they serious that upper case ASCII is only allowed in nmstart and
not nmchar?
Nicholas Clark
More information about the rt-users
mailing list