@ausbom/grid 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,5 @@
1
+ @use "sass:math";
2
+
1
3
  @import '~@ausbom/styles/lib/scss/globals';
2
4
  @import './globals.scss';
3
5
 
@@ -20,12 +22,14 @@ $_column-gutter: (
20
22
  @mixin _bom-grid($bp) {
21
23
  display: flex;
22
24
  flex-wrap: wrap;
25
+ margin-left: math.div(map-get($_column-gutter, $bp), -2);
26
+ margin-right: math.div(map-get($_column-gutter, $bp), -2);
23
27
  flex: auto;
24
28
 
25
29
  .bom-grid-col > .bom-grid {
26
30
  // Ensure that nested grids don't add extra vertical space
27
- margin-top: map-get($_row-gutter, $bp) / -2;
28
- margin-bottom: map-get($_row-gutter, $bp) / -2;
31
+ margin-top: math.div(map-get($_row-gutter, $bp), -2);
32
+ margin-bottom: math.div(map-get($_row-gutter, $bp), -2);
29
33
  }
30
34
  }
31
35
 
@@ -76,8 +80,8 @@ $_column-gutter: (
76
80
  }
77
81
 
78
82
  padding:
79
- (map-get($_row-gutter, $padding-bp) / 2)
80
- (map-get($_column-gutter, $padding-bp) / 2);
83
+ (map-get($_row-gutter, $padding-bp) * 0.5)
84
+ (map-get($_column-gutter, $padding-bp) * 0.5);
81
85
  }
82
86
 
83
87
  [class*='bom-grid-col-#{$bp}'] {
@@ -87,7 +91,7 @@ $_column-gutter: (
87
91
 
88
92
  @for $span from 1 through $_columns {
89
93
  .bom-grid-col-#{$bp}--span-#{$span} {
90
- $incr: 100 / $_columns;
94
+ $incr: math.div(100, $_columns);
91
95
 
92
96
  flex-grow: 0;
93
97
  flex-basis: #{($incr * $span) + '%'};
@@ -97,7 +101,7 @@ $_column-gutter: (
97
101
 
98
102
  @for $offset from 0 through $_columns {
99
103
  .bom-grid-col-#{$bp}--offset-#{$offset} {
100
- $incr: 100 / $_columns;
104
+ $incr: math.div(100, $_columns);
101
105
 
102
106
  margin-left: #{($incr * $offset) + '%'};
103
107
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ausbom/grid",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "A grid is like an invisible table that helps designers position interface elements with strong alignment and consistent spacing. Grids are made up of columns, rows, gutters, and margins.",
5
5
  "keywords": [
6
6
  "box",
@@ -42,7 +42,7 @@
42
42
  "react": ">= 16.3.x"
43
43
  },
44
44
  "dependencies": {
45
- "@ausbom/styles": "^0.13.0"
45
+ "@ausbom/styles": "^0.14.0"
46
46
  },
47
- "gitHead": "fb700e0e3fdab1b33a91603366afa9bb05cfc2f2"
47
+ "gitHead": "0d927930f3ccc9deda53763261ce8238e3b16cbd"
48
48
  }