The logic behind 62.5rem for the maximum width of the row in foundation 5

advertisements

I found that as default, foundation does this to style the row:

.row {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0;
  margin-bottom: 0;
  max-width: 62.5rem;
}

however, as a responsive framework, why would it be limited to 62.5rem? The effect is stunning ugly, which is a fixed width box at all time without be able to fluid with the width of the screen. What is the logic behind it? What if I override it with 100%? Will that cause issue with its grid system in general?

Thank You


They put that limit because not every day you have a "full width design"; they introduced (in Foundation 6) the modifier class .expanded, which added to rows they become full width; If you want to have that behavior in Foundation 5, you have two options:

1. Create your '.expanded' class

Foundation limits the max-width of the row, so if you add the .expanded class to the rows you want to have fluid and add some code like:

.row.expanded { max-width: none }

You could have it working... maybe will require additional code to have nested rows working properly.

2. Modify the class / Change the settings

Foundation is a quite customizable framework, if you're using the SASS version, you could easily modify the variable $global-width to be 100%. If you're using the prebuilt version, just locate the .row declaration in the code and modify the max-width to 100%.

That's it, hope this helps.