Skip to content

Commit a251305

Browse files
committed
fix (column.scss) : uncomputed value returned by column-full
1 parent c953b3f commit a251305

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/scss/abstract/_f-column.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
// column px, return a pixel value
5858
// ----
5959

60-
@function column-px($device, $nb-column: null, $nb-gutter: null) {
60+
@function column-px($device, $nb-column: null, $nb-gutter: null, $unitless: false) {
6161
// shift vars if $device is number
6262
@if type-of($device) == "number" {
6363
$nb-gutter: $nb-column;
@@ -73,6 +73,10 @@
7373
$nb-gutter: $nb-column - 1;
7474
}
7575

76+
@if $unitless == true {
77+
@return $nb-column * $column-width + $nb-gutter * $gutter-width;
78+
}
79+
7680
@return #{$nb-column * $column-width + $nb-gutter * $gutter-width}px;
7781
}
7882

@@ -93,7 +97,7 @@
9397
$column-width: map-get($preset, columnwidth);
9498
$total-column: map-get($preset, totalcolumn);
9599

96-
$width: column-px($device, $nb-column, $nb-gutter);
100+
$width: column-px($device, $nb-column, $nb-gutter, true);
97101

98102
@return calc((100% - #{$mobile-external-gutter * 2}) * #{$width / ($gutter-width * ($total-column - 1) + $column-width * $total-column)});
99103
}

0 commit comments

Comments
 (0)