@flodesk/grain 2.19.12 → 2.19.13

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.
@@ -17,12 +17,13 @@ require("core-js/modules/es.array.map.js");
17
17
 
18
18
  require("core-js/modules/es.object.entries.js");
19
19
 
20
+ require("core-js/modules/es.array.reverse.js");
21
+
20
22
  var _ = require(".");
21
23
 
22
24
  var _variables = require("../variables");
23
25
 
24
26
  var breakpoints = {
25
- breakpointS: "320px",
26
27
  breakpointM: "768px",
27
28
  breakpointL: "1170px"
28
29
  };
@@ -30,7 +31,7 @@ exports.breakpoints = breakpoints;
30
31
 
31
32
  var getBrakpoint = function getBrakpoint(breakpoint) {
32
33
  if (breakpoint in breakpoints) {
33
- return "(min-width: ".concat(breakpoints[breakpoint], ")");
34
+ return "(max-width: ".concat(breakpoints[breakpoint], ")");
34
35
  }
35
36
 
36
37
  return breakpoint;
@@ -65,8 +66,10 @@ var mapObjToMedia = function mapObjToMedia(property, obj, varName) {
65
66
  }
66
67
 
67
68
  return getMediaCss(breakpoint, property, value);
68
- });
69
- return declarations.join("");
69
+ }); // reverse array to make sure max-widths correctly override
70
+
71
+ declarations.reverse().join("");
72
+ return declarations;
70
73
  };
71
74
 
72
75
  exports.mapObjToMedia = mapObjToMedia;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flodesk/grain",
3
- "version": "2.19.12",
3
+ "version": "2.19.13",
4
4
  "description": "Flodesk design system",
5
5
  "module": "es/index.js",
6
6
  "author": "Flodesk",