Skinr currently reads in CSS classes that can be defined in two ways.

  1. Correct: 'class' => array('grid16-1')
  2. Incorrect: 'class' => 'grid16-1'

It seems to me that it would be better coding practice that only the first way of writing be allowed.

Comments

Hari’s picture

Should have been a little bit more specific. The above are examples of the two ways that a person could specify a class/classes in a skin.

sun’s picture

Status: Needs work » Active

That's true, the second variant should not be supported. D7 always uses an array for the value of 'class'.

jacine’s picture

I thought we fixed this already.

moonray’s picture

Title: Skinr reads in CSS classes defined improperly/poorly coded. » Skinr allows CSS classes defined as string rather than array in a skin
Status: Active » Needs review
StatusFileSize
new1.05 KB

Attached patch triggers a warning in the logs rather than automatically fixing when a class array is given as a string instead.
Hopefully this is the right approach. :)

moonray’s picture

StatusFileSize
new2.63 KB

Attached patch adds tests.

moonray’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.