Skip to content

Commit

Permalink
feat: add improved box-layout
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed Jan 10, 2023
1 parent 3412e08 commit cc3d10e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion RockFrontend.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public static function getModuleInfo()
{
return [
'title' => 'RockFrontend',
'version' => '2.12.0',
'version' => '2.13.0',
'summary' => 'Module for easy frontend development',
'autoload' => true,
'singular' => true,
Expand Down
19 changes: 19 additions & 0 deletions less/boxed-layout.less
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,22 @@
margin-right: auto;
box-sizing: border-box;
}

// new version that does not need nested divs
// use this instead of rf-boxed + rf-boxed-padding
.rf-box {
// outline: 2px solid red;

// use content box to apply max-width only to content
box-sizing: content-box;
max-width: @rf-boxed;
// max-width: rfGrow(@rf-boxed, 1800px, @rf-boxed, @rf-boxed);

// center the box
margin-left: auto;
margin-right: auto;

// apply paddings
padding-left: rfGrow(20px, 40px, @rfgrow-min, @rf-boxed);
padding-right: rfGrow(20px, 40px, @rfgrow-min, @rf-boxed);
}

0 comments on commit cc3d10e

Please sign in to comment.