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.

Comments

Koen.Pasman created an issue. See original summary.

Koen.Pasman’s picture

Status: Active » Needs review
StatusFileSize
new675 bytes

Patch attached

micheas’s picture

Is 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?