#3512: [patch] Add HTML classes to fields in newforms as_methods: "required" &
"error"
-------------------------------------------------+--------------------------
Reporter: Waylan Limberg <[EMAIL PROTECTED]> | Owner:
adrian
Status: new | Component:
django.newforms
Version: SVN | Resolution:
Keywords: | Stage:
Design decision needed
Has_patch: 1 | Needs_docs: 1
Needs_tests: 1 | Needs_better_patch: 0
-------------------------------------------------+--------------------------
Comment (by Waylan Limberg <[EMAIL PROTECTED]>):
IMO anyone who says having the class names directly on the form elements
gives them more control needs to brush up on their css skills. Given the
following html:
{{{
<li class="required"><label><input...></label></li>
}}}
I can do any of the following:
{{{
# style the wrapping block with
.required {...}
# style the label
.required label {...}
# style the form element
.required input {...}
}}}
They're called "'''Cascading''' Style Sheets" for a reason. Remember there
is only one form element per wrapping block. I could see a problem if that
wasn't the case, but it is.
With #3515's approach, if you want to style the wrapping block element
(li, tr, p) or the label you can't. I understand some people may not be
using the as_methods and thats why they like 3515, but if they're building
their own html, then IMO they should be building their own html.
--
Ticket URL: <http://code.djangoproject.com/ticket/3512#comment:10>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---