Skip to content

Commit

Permalink
Added -first-row CSS class for columns
Browse files Browse the repository at this point in the history
  • Loading branch information
ausi committed Nov 5, 2013
1 parent 9c8a6bc commit 84033c0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/MadeYourDay/Contao/Element/CustomElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,11 @@ public function getColumnClassName($index)
$config = ColumnsStart::getColumnsConfiguration($this->arrData);

$classes = array('rs-column');
foreach ($config as $media) {
foreach ($config as $name => $media) {
$classes = array_merge($classes, $media[$index % count($media)]);
if ($index < count($media)) {
$classes[] = '-' . $name . '-first-row';
}
}

return implode(' ', $classes);
Expand Down

0 comments on commit 84033c0

Please sign in to comment.