651651 @-column-width : round ((100% / @base * @span ), 8 );
652652 @-column-gutter : round (((@base - @span ) / @base * @grid-gutter ), 8 );
653653 @-column-nudge : unit (@nudge , px);
654- .-get-width-calc (@-column-width , @-column-gutter , @-column-nudge );
655- .-get-offset-calc (@-column-width , (@grid-gutter - @-column-gutter ), @-column-nudge );
654+ @-base-nudge : unit ((@span / @base * @base-nudge ), px);
655+ .-get-width-calc (@-column-width , @-column-gutter , @-column-nudge , @-base-nudge );
656+ .-get-offset-calc (@-column-width , (@grid-gutter - @-column-gutter ), @-column-nudge , @-base-nudge );
656657
657658 // IE8, Opera mini, Android and older versions of Safari:
658659 @-base-width : (@grid-width * @base / @grid-columns );
659660 @-gutter : (percentage (@grid-gutter / @-base-width ));
660- @grid-width-fallback : (@-column-width - percentage (@-column-gutter / @-base-width ) + percentage (@-column-nudge / @-base-width ));
661+ @grid-width-fallback : (@-column-width - percentage (@-column-gutter / @-base-width ) + percentage (@-column-nudge / @-base-width ) - percentage ( @-base-nudge / @-base-width ) );
661662 @grid-offset-fallback : (@grid-width-fallback + @-gutter );
662663 }
663- .-get-width-calc (@-width , @-gutter , @-nudge ) when (@-nudge = 0 ) {
664+ .-get-width-calc (@-width , @-gutter , @-nudge , @-base-nudge ) when (@-nudge = 0 ) and ( @-base -nudge = 0 ) {
664665 @grid-width-calc : @-width ~ " -" @-gutter ;
665666 }
666- .-get-width-calc (@-width , @-gutter , @-nudge ) when (default ()) {
667+ .-get-width-calc (@-width , @-gutter , @-nudge , @-base-nudge ) when (@-nudge = 0 ) and not (@-base-nudge = 0 ) {
668+ @grid-width-calc : @-width ~ " -" @-gutter ~ " -" @-base-nudge ;
669+ }
670+ .-get-width-calc (@-width , @-gutter , @-nudge , @-base-nudge ) when not (@-nudge = 0 ) and (@-base-nudge = 0 ) {
667671 @grid-width-calc : @-width ~ " -" @-gutter ~ " +" @-nudge ;
668672 }
669- .-get-offset-calc (@-width , @-gutter , @-nudge ) when (@-nudge = 0 ) {
673+ .-get-width-calc (@-width , @-gutter , @-nudge , @-base-nudge ) when (default ()) {
674+ @grid-width-calc : @-width ~ " -" @-gutter ~ " +" @-nudge ~ " -" @-base-nudge ;
675+ }
676+ .-get-offset-calc (@-width , @-gutter , @-nudge , @-base-nudge ) when (@-nudge = 0 ) and (@-base-nudge = 0 ) {
670677 @grid-offset-calc : @-width ~ " +" @-gutter ;
671678 }
672- .-get-offset-calc (@-width , @-gutter , @-nudge ) when (default ()) {
679+ .-get-offset-calc (@-width , @-gutter , @-nudge , @-base-nudge ) when (@-nudge = 0 ) and not (@-base-nudge = 0 ) {
680+ @grid-offset-calc : @-width ~ " +" @-gutter ~ " -" @-base-nudge ;
681+ }
682+ .-get-offset-calc (@-width , @-gutter , @-nudge , @-base-nudge ) when not (@-nudge = 0 ) and (@-base-nudge = 0 ) {
673683 @grid-offset-calc : @-width ~ " +" @-gutter ~ " +" @-nudge ;
674684 }
685+ .-get-offset-calc (@-width , @-gutter , @-nudge , @-base-nudge ) when (default ()) {
686+ @grid-offset-calc : @-width ~ " +" @-gutter ~ " +" @-nudge ~ " -" @-base-nudge ;
687+ }
675688}
0 commit comments