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

Lou Vanek vanek at acd.net
Thu Jun 8 21:37:01 UTC 2006


I agree a css-class slot is fundamental and would be welcome by me.
I don't consider adding a css-class slot bloated because you're then
able to push off a lot of html-cosmetic stuff out of the code (and
into the css file where it belongs).

I'm not far enough along to comment knowledgably about your last point
(I'm still trying to get the examples to run on clisp/araneida). But
I agree that wrapping-DIVs should be avoided if the HTML spec allows
the characteristic/class/attribute to be specified in the target
HTML widget/INPUT/etc.

-lv
-- 
Our lives begin to end the day we become silent about the things that matter.
     Dr. ML King, from a jail cell in Birmingham, Alabama in 1963.


Marijn Haverbeke wrote:

> 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
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> bese-devel mailing list
> bese-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/bese-devel




More information about the bese-devel mailing list