Skip to content

Commit

Permalink
Removing the enhanced precision and relying on the defualt Sass preci…
Browse files Browse the repository at this point in the history
…sion of 3. Seems to fix some issues in Firefox and Chrome.
  • Loading branch information
heygrady committed Apr 23, 2012
1 parent d13ae90 commit 941e79d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/compass-grid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
require 'compass/grid'

# Ensure maximum useful precision
Sass::Script::Number.precision = 8
# Sass::Script::Number.precision = 8
11 changes: 8 additions & 3 deletions stylesheets/grid/_fluid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,21 @@
width: fluid-column-width($i, $plus, $parent, $parent-plus);
}

// return a percentage width relative to columns
// return a percentage width relative to a column width
@function fluid-column-width($i, $plus: 0, $parent: $grid-columns, $parent-plus: 0) {
@return percentage(grid-column-width($i, $plus) / grid-column-width($parent, $parent-plus + $grid-gutter-width));
@return fluid-width(grid-column-width($i, $plus), grid-column-width($parent, $parent-plus + $grid-gutter-width));
}

// return a percentage width relative to lengths
// return a percentage width relative to a parent width
@function fluid-width($width, $parent-width: grid-column-width($grid-columns, $grid-gutter-width)) {
@return percentage($width / $parent-width);
}

// return a percentage for a half-pixel
@function fluid-nudge($parent-width: grid-column-width($grid-columns, $grid-gutter-width), $vendor: webkit) {
@return percentage(if($vendor == ie, -0.5px, 0.5px) / $parent-width);
}


//-----------------------------------
// Containers
Expand Down

0 comments on commit 941e79d

Please sign in to comment.