@nice-digital/nds-maintain-ratio 1.2.13 → 1.2.14

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.
@@ -19,7 +19,7 @@ require("../scss/maintain-ratio.scss");
19
19
 
20
20
  var _excluded = ["ratio", "className", "stretchFirstChild", "children"];
21
21
 
22
- var _jsxFileName = "C:\\_dev\\nice-design-system\\components\\nds-maintain-ratio\\src\\MaintainRatio.js",
22
+ var _jsxFileName = "C:\\dev\\nice-design-system\\components\\nds-maintain-ratio\\src\\MaintainRatio.js",
23
23
  _this = void 0;
24
24
 
25
25
  var MaintainRatio = function MaintainRatio(props) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nice-digital/nds-maintain-ratio",
3
- "version": "1.2.13",
3
+ "version": "1.2.14",
4
4
  "description": "Maintain ratio component for the NICE Design System",
5
5
  "author": "Ian Routledge <ian.routledge@nice.org.uk>",
6
6
  "homepage": "https://design-system.nice.org.uk/",
@@ -34,7 +34,7 @@
34
34
  "url": "https://github.com/nice-digital/nice-design-system/issues"
35
35
  },
36
36
  "dependencies": {
37
- "@nice-digital/nds-core": "^1.2.12",
37
+ "@nice-digital/nds-core": "^1.2.13",
38
38
  "classnames": "^2.3.1",
39
39
  "prop-types": "^15.7.2"
40
40
  },
@@ -45,5 +45,5 @@
45
45
  "devDependencies": {
46
46
  "@babel/cli": "^7.5.0"
47
47
  },
48
- "gitHead": "70d5237c684b38532174d7e7b81e0d859867b222"
48
+ "gitHead": "2bdf3454416a51f8e6c407a0f03ff14c08b6023a"
49
49
  }
@@ -2,6 +2,8 @@
2
2
  /// @group components
3
3
  ////
4
4
 
5
+ @use "sass:math";
6
+
5
7
  @import '~@nice-digital/nds-core/scss/core';
6
8
 
7
9
  /// Maintains the aspect ratio of an embedded item, useful for responsive embedding, e.g.
@@ -57,17 +59,17 @@
57
59
 
58
60
  // Modifier class for 21:9 aspect ratio
59
61
  &--21-9 {
60
- padding-bottom: percentage(9 / 21);
62
+ padding-bottom: percentage(math.div(9, 21));
61
63
  }
62
64
 
63
65
  // Modifier class for 16:9 aspect ratio
64
66
  &--16-9 {
65
- padding-bottom: percentage(9 / 16);
67
+ padding-bottom: percentage(math.div(9, 16));
66
68
  }
67
69
 
68
70
  // Modifier class for 4:3 aspect ratio
69
71
  &--4-3 {
70
- padding-bottom: percentage(3 / 4);
72
+ padding-bottom: percentage(3 * 0.25);
71
73
  }
72
74
 
73
75
  // Modifier class for square aspect ratio