[Bese-devel] Changing the css-class of input fields (when they are wrapped in field objects)

Marijn Haverbeke marijnh at gmail.com
Thu Jun 8 21:01:40 UTC 2006


Again about the form-field classes - they currently inherit from
widget-component, which gives them a css-class slot. Only in a lot of cases
the behaviour this implements is not what you want - wrapping something in a
DIV with a class is rarely equivalent to just giving it that class, and I
need some of my input fields to have a certain class. (And I dislike
superfluous DIV elements anyway.)

Maybe add an extra slot called field-class or something to
generic-html-input, and have the render functions include it in the output?
This (combined with the events slot I suggested in another mail) is kind of
starting to sound like a bloated interface... But both events and class are
rather fundamental properties of HTML that you're going to have to be able
to have control over sooner or later in practically every project.

Now that I'm thinking about this, do input field objects really need to
inherit from widget-component? In my experience just wrapping something in a
DIV to apply style to it is usually not such a great idea, and the
widget-component functionality is rather orthogonal to what the
generic-html-input classes are implementing - people could inherit from both
if they really wanted an input field with a DIV around it. Thoughts?

Marijn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/bese-devel/attachments/20060608/d65a3b86/attachment.html>


More information about the bese-devel mailing list