When using a multi-value field, the wrappers get an 'odd' or 'even' class assigned. The zurb_foundation_preprocess_field() function takes over the task of assigning these classes, but they added cumulatively. For example:
<ul class="field field-name-field-test field-type-text field-label-hidden field-wrapper">
<li class="field-item even">Lorem ipsum</li>
<li class="field-item even odd">dolor sit amet</li>
<li class="field-item even odd even"> Rhoncus ac magna</li>
<li class="field-item even odd even odd">massa habitasse diam</li>
<li class="field-item even odd even odd even">placerat velit</li>
</ul>I will add a patch for template.php to fix this.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | zurb_foundation-odd-even-classes-added-cumulatively-2648896-2.patch | 675 bytes | Koen.Pasman |
Comments
Comment #2
Koen.Pasman commentedPatch attached
Comment #3
micheas commentedIs there a reason for .odd and .even classes? They add to the DOM slowing things down and :even and :odd are widely supported by almost all browsers in use.
Wouldn't a better solution be to eliminate the unneeded classes? Or is there a reasonable, common use case that makes keeping this HTML4 vestige around?