-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SCSS calculation fixes #63
base: master
Are you sure you want to change the base?
Conversation
- Fixed bug where the overall column width was shadowed by a parameter name. - Removed the (unnecessary) second parameter to column(). The value was used to calculate the ratio of $total-width/$calculated-width for fluid-width purposes, and therefore should always use the global $column count.
The gridsystem-ratio() function calculates the ratio of the user-specified $total-width, to the calculated grid width. This ratio was used in every width calculation, and rewriting the calculations using this gridsystem-ratio() made their purposes much more obvious.
gridsystem-width() already calculates the width with the outer margin included. Adding the gutter again makes the width of the row too large.
An expression in the column width calculation was mathematically equivalent to the value calculated by gridsystem-width(), so I replaced it with a call to that function.
Just as in the width calculation for column(), the push and pull mixins contained an expression that was mathematically equivalent to the value calculated by gridsystem-width(), so I replaced it with a call to that function.
The previous formula for calculating push/pull margins was incorrect. The correct behavior is for the push/pull margin of $x to be equivalent to the width of column($x) plus half of the gutter. The formula could be simplified further, but I feel that writing it this way emphesises the relationship to the column width formula.
It didn't take changing default values into account. I updated it to recalculate the "default width" every time.
- Using 960.gs as a benchmark for what the column widths that are generated should be. - Ensure that the row widths are calculated correctly in relation to the column widths.
👍 |
1 similar comment
👍 |
I created SCSS only repo of Semantic.gs with those changes, because I didn't want to wait for ages. All rights reserverd for bhcarpenter (who done this changes and send them here) and for tylertate who is author of Semantic.gs. I only merged changes with newest version of Semantic.gs and remove unnecessary things (I didn't merged tests also, because I don't use them at all). |
As already to @Nosenation asked. Any ideas how to accomplish this changes with fluid layouts? It breaks if |
@yckart Problem is fixed in my repo. 😄 |
This is awesome as have been looking for the fixes for the exact issue, thanks guys ! |
This series of commits updates the SCSS version. It includes the following:
Please feel free to discuss and ask questions.