@comicrelief/component-library 8.25.8 → 8.26.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.
Files changed (23) hide show
  1. package/dist/components/Atoms/Picture/Picture.js +9 -24
  2. package/dist/components/Atoms/Picture/Picture.test.js +4 -4
  3. package/dist/components/Molecules/ArticleTeaser/ArticleTeaser.test.js +2 -2
  4. package/dist/components/Molecules/Card/__snapshots__/Card.test.js.snap +6 -0
  5. package/dist/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +28 -0
  6. package/dist/components/Molecules/PartnerLink/PartnerLink.test.js +1 -1
  7. package/dist/components/Molecules/Promo/__snapshots__/Promo.test.js.snap +28 -0
  8. package/dist/components/Molecules/SearchResult/__snapshots__/SearchResult.test.js.snap +24 -0
  9. package/dist/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +78 -0
  10. package/dist/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +14 -0
  11. package/dist/components/Organisms/Membership/Membership.test.js +1 -1
  12. package/package.json +1 -1
  13. package/src/components/Atoms/Picture/Picture.js +21 -19
  14. package/src/components/Atoms/Picture/Picture.test.js +29 -7
  15. package/src/components/Molecules/ArticleTeaser/ArticleTeaser.test.js +28 -0
  16. package/src/components/Molecules/Card/__snapshots__/Card.test.js.snap +6 -0
  17. package/src/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +28 -0
  18. package/src/components/Molecules/PartnerLink/PartnerLink.test.js +8 -0
  19. package/src/components/Molecules/Promo/__snapshots__/Promo.test.js.snap +28 -0
  20. package/src/components/Molecules/SearchResult/__snapshots__/SearchResult.test.js.snap +24 -0
  21. package/src/components/Molecules/SingleMessage/__snapshots__/SingleMessage.test.js.snap +78 -0
  22. package/src/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +14 -0
  23. package/src/components/Organisms/Membership/Membership.test.js +6 -0
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = void 0;
9
- var _react = _interopRequireWildcard(require("react"));
9
+ var _react = _interopRequireDefault(require("react"));
10
10
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
11
  var _spacing = _interopRequireDefault(require("../../../theme/shared/spacing"));
12
12
  require("lazysizes");
@@ -18,10 +18,9 @@ const Wrapper = _styledComponents.default.div.withConfig({
18
18
  componentId: "sc-1x3z81z-0"
19
19
  })(["", ";display:block;width:", ";height:", ";position:relative;", ";"], _ref => {
20
20
  let {
21
- objFitState,
22
21
  nonObjFitImage
23
22
  } = _ref;
24
- return !objFitState && nonObjFitImage && "background-image: url(".concat(nonObjFitImage, "); background-size: cover; background-position: center;");
23
+ return nonObjFitImage && "@supports not ((object-fit: cover) or (object-fit: none) or (object-fit: contain)) {\n background-image: url(".concat(nonObjFitImage, ");\n background-size: cover;\n background-position: center;\n }\n ");
25
24
  }, props => props.width ? props.width : '100%', props => props.height ? props.height : '100%', _ref2 => {
26
25
  let {
27
26
  isBackgroundImage
@@ -31,12 +30,11 @@ const Wrapper = _styledComponents.default.div.withConfig({
31
30
  const Image = _styledComponents.default.img.withConfig({
32
31
  displayName: "Picture__Image",
33
32
  componentId: "sc-1x3z81z-1"
34
- })(["width:", ";height:", ";display:block;object-fit:", ";", ";", " ", " ", ""], props => props.width ? props.width : '100%', props => props.height ? props.height : 'auto', props => props.objectFit === 'none' && 'none' || props.objectFit === 'cover' && 'cover' || props.objectFit === 'contain' && 'contain', _ref3 => {
33
+ })(["width:", ";height:", ";display:block;object-fit:", ";", " ", " ", " ", ""], props => props.width ? props.width : '100%', props => props.height ? props.height : 'auto', props => props.objectFit === 'none' && 'none' || props.objectFit === 'cover' && 'cover' || props.objectFit === 'contain' && 'contain', _ref3 => {
35
34
  let {
36
- objectFit,
37
- objFitState
35
+ objectFit
38
36
  } = _ref3;
39
- return objectFit !== 'none' && !objFitState && 'visibility: hidden;';
37
+ return objectFit !== 'none' && "@supports not ((object-fit: cover) or (object-fit: contain)) {\n visibility: hidden;\n ";
40
38
  }, _ref4 => {
41
39
  let {
42
40
  smallBreakpointRowLayout
@@ -90,15 +88,7 @@ const Picture = _ref11 => {
90
88
  mediumBreakpointRowLayout = null,
91
89
  ...rest
92
90
  } = _ref11;
93
- const document = typeof window !== 'undefined' ? window.document : null;
94
- const [objFitState, setObjFitState] = (0, _react.useState)(true);
95
91
  let nonObjFitImage = null;
96
- (0, _react.useEffect)(() => {
97
- // Once document is available, determine if this browser supports object-fit
98
- if ('objectFit' in document.documentElement.style === false) {
99
- setObjFitState(false);
100
- }
101
- }, [document]);
102
92
 
103
93
  // Determine which image will be used for the nonObjectFit fallback
104
94
  if (image) {
@@ -113,16 +103,14 @@ const Picture = _ref11 => {
113
103
  image: image,
114
104
  images: images,
115
105
  isBackgroundImage: isBackgroundImage,
116
- nonObjFitImage: nonObjFitImage,
117
- objFitState: objFitState
106
+ nonObjFitImage: nonObjFitImage
118
107
  }, rest), /*#__PURE__*/_react.default.createElement(Image, {
119
108
  alt: alt,
120
109
  height: height,
121
110
  width: width,
122
111
  objectFit: objectFit,
123
112
  "data-src": image,
124
- className: "lazyload",
125
- objFitState: objFitState
113
+ className: "lazyload"
126
114
  }));
127
115
  }
128
116
  return /*#__PURE__*/_react.default.createElement(Wrapper, Object.assign({
@@ -130,11 +118,9 @@ const Picture = _ref11 => {
130
118
  width: width,
131
119
  image: image,
132
120
  images: images,
133
- setObjFitState: setObjFitState,
134
121
  className: "lazyload",
135
122
  isBackgroundImage: isBackgroundImage,
136
- nonObjFitImage: nonObjFitImage,
137
- objFitState: objFitState
123
+ nonObjFitImage: nonObjFitImage
138
124
  }, rest), /*#__PURE__*/_react.default.createElement(Image, {
139
125
  alt: alt,
140
126
  height: height,
@@ -147,7 +133,6 @@ const Picture = _ref11 => {
147
133
  "data-sizes": "auto",
148
134
  "data-lowsrc": imageLow,
149
135
  className: "lazyload",
150
- objFitState: objFitState,
151
136
  smallBreakpointRowLayout: smallBreakpointRowLayout,
152
137
  mediumBreakpointRowLayout: mediumBreakpointRowLayout
153
138
  }));
@@ -6,15 +6,15 @@ require("jest-styled-components");
6
6
  var _shallowWithTheme = _interopRequireDefault(require("../../../../tests/hoc/shallowWithTheme"));
7
7
  var _Picture = _interopRequireDefault(require("./Picture"));
8
8
  var _data = require("../../../styleguide/data/data");
9
- it("renders correctly", () => {
9
+ it('renders correctly', () => {
10
10
  const tree = (0, _shallowWithTheme.default)( /*#__PURE__*/_react.default.createElement(_Picture.default, {
11
11
  images: _data.defaultData.images,
12
12
  image: _data.defaultData.image,
13
13
  alt: "Test images"
14
14
  })).toJSON();
15
- expect(tree).toMatchInlineSnapshot("\n .c0 {\n display: block;\n width: 100%;\n height: auto;\n position: relative;\n }\n\n .c1 {\n width: 100%;\n height: auto;\n display: block;\n object-fit: none;\n }\n\n <div\n className=\"c0 lazyload\"\n height=\"auto\"\n width=\"100%\"\n >\n <img\n alt=\"Test images\"\n className=\"c1 lazyload\"\n data-lowsrc={null}\n data-sizes=\"auto\"\n data-src=\"http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg\"\n data-srcset=\"//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=200&h=150&q=50 200w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=400&h=300&q=50 400w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=800&h=600&q=50 800w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=1200&h=900&q=50 1200w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=1440&h=1080&q=50 1440w\"\n height=\"auto\"\n src=\"http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg\"\n srcSet=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\"\n width=\"100%\"\n />\n </div>\n ");
15
+ expect(tree).toMatchInlineSnapshot("\n .c0 {\n display: block;\n width: 100%;\n height: auto;\n position: relative;\n }\n\n .c1 {\n width: 100%;\n height: auto;\n display: block;\n object-fit: none;\n }\n\n @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {\n .c0 {\n background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);\n background-size: cover;\n background-position: center;\n }\n }\n\n <div\n className=\"c0 lazyload\"\n height=\"auto\"\n width=\"100%\"\n >\n <img\n alt=\"Test images\"\n className=\"c1 lazyload\"\n data-lowsrc={null}\n data-sizes=\"auto\"\n data-src=\"http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg\"\n data-srcset=\"//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=200&h=150&q=50 200w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=400&h=300&q=50 400w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=800&h=600&q=50 800w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=1200&h=900&q=50 1200w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=1440&h=1080&q=50 1440w\"\n height=\"auto\"\n src=\"http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg\"\n srcSet=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\"\n width=\"100%\"\n />\n </div>\n ");
16
16
  });
17
- it("renders correctly with custom props", () => {
17
+ it('renders correctly with custom props', () => {
18
18
  const tree = (0, _shallowWithTheme.default)( /*#__PURE__*/_react.default.createElement(_Picture.default, {
19
19
  images: _data.defaultData.images,
20
20
  image: _data.defaultData.image,
@@ -23,5 +23,5 @@ it("renders correctly with custom props", () => {
23
23
  height: "100px",
24
24
  alt: "Test images"
25
25
  })).toJSON();
26
- expect(tree).toMatchInlineSnapshot("\n .c0 {\n display: block;\n width: 200px;\n height: 100px;\n position: relative;\n }\n\n .c1 {\n width: 200px;\n height: 100px;\n display: block;\n object-fit: cover;\n }\n\n <div\n className=\"c0 lazyload\"\n height=\"100px\"\n width=\"200px\"\n >\n <img\n alt=\"Test images\"\n className=\"c1 lazyload\"\n data-lowsrc={null}\n data-sizes=\"auto\"\n data-src=\"http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg\"\n data-srcset=\"//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=200&h=150&q=50 200w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=400&h=300&q=50 400w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=800&h=600&q=50 800w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=1200&h=900&q=50 1200w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=1440&h=1080&q=50 1440w\"\n height=\"100px\"\n src=\"http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg\"\n srcSet=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\"\n width=\"200px\"\n />\n </div>\n ");
26
+ expect(tree).toMatchInlineSnapshot("\n .c0 {\n display: block;\n width: 200px;\n height: 100px;\n position: relative;\n }\n\n .c1 {\n width: 200px;\n height: 100px;\n display: block;\n object-fit: cover;\n }\n\n @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {\n .c0 {\n background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);\n background-size: cover;\n background-position: center;\n }\n }\n\n @supports not ((object-fit:cover) or (object-fit:contain)) {\n .c1 {\n visibility: hidden;\n }\n }\n\n <div\n className=\"c0 lazyload\"\n height=\"100px\"\n width=\"200px\"\n >\n <img\n alt=\"Test images\"\n className=\"c1 lazyload\"\n data-lowsrc={null}\n data-sizes=\"auto\"\n data-src=\"http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg\"\n data-srcset=\"//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=200&h=150&q=50 200w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=400&h=300&q=50 400w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=800&h=600&q=50 800w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=1200&h=900&q=50 1200w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=1440&h=1080&q=50 1440w\"\n height=\"100px\"\n src=\"http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg\"\n srcSet=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\"\n width=\"200px\"\n />\n </div>\n ");
27
27
  });
@@ -18,7 +18,7 @@ it('renders article teaser correctly', () => {
18
18
  smallImageWidth: "25%",
19
19
  largeImageWidth: "100%"
20
20
  })).toJSON();
21
- expect(tree).toMatchInlineSnapshot("\n .c8 {\n font-size: 0.75rem;\n line-height: 0.75rem;\n text-transform: inherit;\n font-weight: bold;\n line-height: normal;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c10 {\n font-size: 2rem;\n line-height: 2rem;\n text-transform: uppercase;\n font-weight: normal;\n line-height: 2rem;\n font-family: 'Anton',Impact,sans-serif;\n -webkit-letter-spacing: 0.03rem;\n -moz-letter-spacing: 0.03rem;\n -ms-letter-spacing: 0.03rem;\n letter-spacing: 0.03rem;\n }\n\n .c4 {\n display: block;\n width: 100%;\n height: 100%;\n position: relative;\n }\n\n .c6 {\n width: 100%;\n height: 100%;\n display: block;\n object-fit: cover;\n }\n\n .c1 {\n position: relative;\n -webkit-text-decoration: none;\n text-decoration: none;\n display: inline;\n line-height: 1.5rem;\n color: #000000;\n font-weight: normal;\n }\n\n .c1:hover {\n color: #000000;\n }\n\n .c0 {\n width: 100%;\n height: 100%;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n background-color: #FFFFFF;\n border-radius: 1rem;\n box-shadow: 0px 0px 20px rgba(0,0,0,0.15);\n -webkit-transition: all 0.2s;\n transition: all 0.2s;\n }\n\n .c0:hover {\n box-shadow: 0px 0px 20px rgba(0,0,0,0.3);\n -webkit-transform: translateY(-4px);\n -ms-transform: translateY(-4px);\n transform: translateY(-4px);\n }\n\n .c2 {\n padding: 0;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n height: 100%;\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-text-decoration: none;\n text-decoration: none;\n color: inherit;\n width: 100%;\n }\n\n .c3 {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n position: relative;\n }\n\n .c3 img {\n border-radius: 1rem 1rem 0 0;\n }\n\n .c7 {\n padding: 2rem;\n height: 100%;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n\n .c11 {\n margin: 0;\n }\n\n .c9 {\n display: block;\n margin-bottom: 1rem;\n }\n\n .c5 {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n }\n\n @media (min-width:740px) {\n .c2 {\n -webkit-flex-direction: row;\n -ms-flex-direction: row;\n flex-direction: row;\n }\n }\n\n @media (min-width:1024px) {\n .c2 {\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n }\n\n @media (min-width:740px) {\n .c3 {\n width: 45%;\n }\n\n .c3 img {\n border-radius: 1rem 0 0 1rem;\n }\n }\n\n @media (min-width:1024px) {\n .c3 {\n width: 100%;\n }\n\n .c3 img {\n border-radius: 1rem 1rem 0 0;\n }\n }\n\n @media (min-width:740px) {\n .c7 {\n width: 55%;\n }\n }\n\n @media (min-width:1024px) {\n .c7 {\n width: 100%;\n }\n }\n\n <article\n className=\"c0\"\n >\n <a\n className=\"c1 c2\"\n color=\"red\"\n href=\"/test\"\n target=\"_self\"\n type=\"standard\"\n >\n <div\n className=\"c3\"\n >\n <div\n className=\"c4 c5\"\n height=\"100%\"\n width=\"100%\"\n >\n <img\n alt=\"Image's description\"\n className=\"c6 lazyload\"\n data-lowsrc={null}\n data-sizes=\"auto\"\n data-src=\"http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg\"\n data-srcset=\"//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=200&h=150&q=50 200w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=400&h=300&q=50 400w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=800&h=600&q=50 800w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=1200&h=900&q=50 1200w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=1440&h=1080&q=50 1440w\"\n height=\"100%\"\n src=\"http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg\"\n srcSet=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\"\n width=\"100%\"\n />\n </div>\n </div>\n <div\n className=\"c7\"\n >\n <span\n className=\"c8 c9\"\n color=\"inherit\"\n size=\"xs\"\n >\n 01 July 2019\n </span>\n <h3\n className=\"c10 c11\"\n color=\"inherit\"\n height=\"2rem\"\n size=\"xl\"\n >\n News article\n </h3>\n </div>\n </a>\n </article>\n ");
21
+ expect(tree).toMatchInlineSnapshot("\n .c8 {\n font-size: 0.75rem;\n line-height: 0.75rem;\n text-transform: inherit;\n font-weight: bold;\n line-height: normal;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c10 {\n font-size: 2rem;\n line-height: 2rem;\n text-transform: uppercase;\n font-weight: normal;\n line-height: 2rem;\n font-family: 'Anton',Impact,sans-serif;\n -webkit-letter-spacing: 0.03rem;\n -moz-letter-spacing: 0.03rem;\n -ms-letter-spacing: 0.03rem;\n letter-spacing: 0.03rem;\n }\n\n .c4 {\n display: block;\n width: 100%;\n height: 100%;\n position: relative;\n }\n\n .c6 {\n width: 100%;\n height: 100%;\n display: block;\n object-fit: cover;\n }\n\n .c1 {\n position: relative;\n -webkit-text-decoration: none;\n text-decoration: none;\n display: inline;\n line-height: 1.5rem;\n color: #000000;\n font-weight: normal;\n }\n\n .c1:hover {\n color: #000000;\n }\n\n .c0 {\n width: 100%;\n height: 100%;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n background-color: #FFFFFF;\n border-radius: 1rem;\n box-shadow: 0px 0px 20px rgba(0,0,0,0.15);\n -webkit-transition: all 0.2s;\n transition: all 0.2s;\n }\n\n .c0:hover {\n box-shadow: 0px 0px 20px rgba(0,0,0,0.3);\n -webkit-transform: translateY(-4px);\n -ms-transform: translateY(-4px);\n transform: translateY(-4px);\n }\n\n .c2 {\n padding: 0;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n height: 100%;\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-text-decoration: none;\n text-decoration: none;\n color: inherit;\n width: 100%;\n }\n\n .c3 {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n position: relative;\n }\n\n .c3 img {\n border-radius: 1rem 1rem 0 0;\n }\n\n .c7 {\n padding: 2rem;\n height: 100%;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n\n .c11 {\n margin: 0;\n }\n\n .c9 {\n display: block;\n margin-bottom: 1rem;\n }\n\n .c5 {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n }\n\n @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {\n .c4 {\n background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);\n background-size: cover;\n background-position: center;\n }\n }\n\n @supports not ((object-fit:cover) or (object-fit:contain)) {\n .c6 {\n visibility: hidden;\n }\n }\n\n @media (min-width:740px) {\n .c2 {\n -webkit-flex-direction: row;\n -ms-flex-direction: row;\n flex-direction: row;\n }\n }\n\n @media (min-width:1024px) {\n .c2 {\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n }\n\n @media (min-width:740px) {\n .c3 {\n width: 45%;\n }\n\n .c3 img {\n border-radius: 1rem 0 0 1rem;\n }\n }\n\n @media (min-width:1024px) {\n .c3 {\n width: 100%;\n }\n\n .c3 img {\n border-radius: 1rem 1rem 0 0;\n }\n }\n\n @media (min-width:740px) {\n .c7 {\n width: 55%;\n }\n }\n\n @media (min-width:1024px) {\n .c7 {\n width: 100%;\n }\n }\n\n <article\n className=\"c0\"\n >\n <a\n className=\"c1 c2\"\n color=\"red\"\n href=\"/test\"\n target=\"_self\"\n type=\"standard\"\n >\n <div\n className=\"c3\"\n >\n <div\n className=\"c4 c5\"\n height=\"100%\"\n width=\"100%\"\n >\n <img\n alt=\"Image's description\"\n className=\"c6 lazyload\"\n data-lowsrc={null}\n data-sizes=\"auto\"\n data-src=\"http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg\"\n data-srcset=\"//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=200&h=150&q=50 200w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=400&h=300&q=50 400w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=800&h=600&q=50 800w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=1200&h=900&q=50 1200w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=1440&h=1080&q=50 1440w\"\n height=\"100%\"\n src=\"http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg\"\n srcSet=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\"\n width=\"100%\"\n />\n </div>\n </div>\n <div\n className=\"c7\"\n >\n <span\n className=\"c8 c9\"\n color=\"inherit\"\n size=\"xs\"\n >\n 01 July 2019\n </span>\n <h3\n className=\"c10 c11\"\n color=\"inherit\"\n height=\"2rem\"\n size=\"xl\"\n >\n News article\n </h3>\n </div>\n </a>\n </article>\n ");
22
22
  });
23
23
  it('renders press realese correctly', () => {
24
24
  const tree = (0, _shallowWithTheme.default)( /*#__PURE__*/_react.default.createElement(_ArticleTeaser.default, {
@@ -29,5 +29,5 @@ it('renders press realese correctly', () => {
29
29
  alt: "Image's description",
30
30
  logoSize: "80px"
31
31
  })).toJSON();
32
- expect(tree).toMatchInlineSnapshot("\n .c8 {\n font-size: 0.75rem;\n line-height: 0.75rem;\n text-transform: inherit;\n font-weight: bold;\n line-height: normal;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c10 {\n font-size: 2rem;\n line-height: 2rem;\n text-transform: uppercase;\n font-weight: normal;\n line-height: 2rem;\n font-family: 'Anton',Impact,sans-serif;\n -webkit-letter-spacing: 0.03rem;\n -moz-letter-spacing: 0.03rem;\n -ms-letter-spacing: 0.03rem;\n letter-spacing: 0.03rem;\n }\n\n .c4 {\n display: block;\n width: 80px;\n height: 80px;\n position: relative;\n }\n\n .c6 {\n width: 80px;\n height: 80px;\n display: block;\n object-fit: cover;\n }\n\n .c1 {\n position: relative;\n -webkit-text-decoration: none;\n text-decoration: none;\n display: inline;\n line-height: 1.5rem;\n color: #000000;\n font-weight: normal;\n }\n\n .c1:hover {\n color: #000000;\n }\n\n .c0 {\n width: 100%;\n height: 100%;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n background-color: #FFFFFF;\n border-radius: 1rem;\n box-shadow: 0px 0px 20px rgba(0,0,0,0.15);\n -webkit-transition: all 0.2s;\n transition: all 0.2s;\n }\n\n .c0:hover {\n box-shadow: 0px 0px 20px rgba(0,0,0,0.3);\n -webkit-transform: translateY(-4px);\n -ms-transform: translateY(-4px);\n transform: translateY(-4px);\n }\n\n .c2 {\n padding: 0;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n height: 100%;\n -webkit-flex-direction: row;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-text-decoration: none;\n text-decoration: none;\n color: inherit;\n width: 100%;\n }\n\n .c3 {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n position: relative;\n padding-left: 1rem;\n }\n\n .c3 img {\n border-radius: 0;\n }\n\n .c7 {\n padding: 2rem;\n height: 100%;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n\n .c11 {\n margin: 0;\n }\n\n .c9 {\n display: block;\n margin-bottom: 1rem;\n }\n\n .c5 {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n }\n\n @media (min-width:740px) {\n .c2 {\n -webkit-flex-direction: row;\n -ms-flex-direction: row;\n flex-direction: row;\n }\n }\n\n @media (min-width:1024px) {\n\n }\n\n @media (min-width:1024px) {\n .c7 {\n width: 100%;\n }\n }\n\n <article\n className=\"c0\"\n >\n <a\n className=\"c1 c2\"\n color=\"red\"\n href=\"/test\"\n target=\"_self\"\n type=\"standard\"\n >\n <div\n className=\"c3\"\n >\n <div\n className=\"c4 c5\"\n height=\"80px\"\n width=\"80px\"\n >\n <img\n alt=\"Image's description\"\n className=\"c6 lazyload\"\n data-lowsrc=\"mock.asset\"\n data-sizes=\"auto\"\n data-src=\"mock.asset\"\n data-srcset=\"mock.asset\"\n height=\"80px\"\n src=\"mock.asset\"\n srcSet=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\"\n width=\"80px\"\n />\n </div>\n </div>\n <div\n className=\"c7\"\n >\n <span\n className=\"c8 c9\"\n color=\"inherit\"\n size=\"xs\"\n >\n 01 July 2019\n </span>\n <h3\n className=\"c10 c11\"\n color=\"inherit\"\n height=\"2rem\"\n size=\"xl\"\n >\n Press Release\n </h3>\n </div>\n </a>\n </article>\n ");
32
+ expect(tree).toMatchInlineSnapshot("\n .c8 {\n font-size: 0.75rem;\n line-height: 0.75rem;\n text-transform: inherit;\n font-weight: bold;\n line-height: normal;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c10 {\n font-size: 2rem;\n line-height: 2rem;\n text-transform: uppercase;\n font-weight: normal;\n line-height: 2rem;\n font-family: 'Anton',Impact,sans-serif;\n -webkit-letter-spacing: 0.03rem;\n -moz-letter-spacing: 0.03rem;\n -ms-letter-spacing: 0.03rem;\n letter-spacing: 0.03rem;\n }\n\n .c4 {\n display: block;\n width: 80px;\n height: 80px;\n position: relative;\n }\n\n .c6 {\n width: 80px;\n height: 80px;\n display: block;\n object-fit: cover;\n }\n\n .c1 {\n position: relative;\n -webkit-text-decoration: none;\n text-decoration: none;\n display: inline;\n line-height: 1.5rem;\n color: #000000;\n font-weight: normal;\n }\n\n .c1:hover {\n color: #000000;\n }\n\n .c0 {\n width: 100%;\n height: 100%;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n background-color: #FFFFFF;\n border-radius: 1rem;\n box-shadow: 0px 0px 20px rgba(0,0,0,0.15);\n -webkit-transition: all 0.2s;\n transition: all 0.2s;\n }\n\n .c0:hover {\n box-shadow: 0px 0px 20px rgba(0,0,0,0.3);\n -webkit-transform: translateY(-4px);\n -ms-transform: translateY(-4px);\n transform: translateY(-4px);\n }\n\n .c2 {\n padding: 0;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n height: 100%;\n -webkit-flex-direction: row;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-text-decoration: none;\n text-decoration: none;\n color: inherit;\n width: 100%;\n }\n\n .c3 {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n position: relative;\n padding-left: 1rem;\n }\n\n .c3 img {\n border-radius: 0;\n }\n\n .c7 {\n padding: 2rem;\n height: 100%;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n }\n\n .c11 {\n margin: 0;\n }\n\n .c9 {\n display: block;\n margin-bottom: 1rem;\n }\n\n .c5 {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n }\n\n @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {\n .c4 {\n background-image: url(mock.asset);\n background-size: cover;\n background-position: center;\n }\n }\n\n @supports not ((object-fit:cover) or (object-fit:contain)) {\n .c6 {\n visibility: hidden;\n }\n }\n\n @media (min-width:740px) {\n .c2 {\n -webkit-flex-direction: row;\n -ms-flex-direction: row;\n flex-direction: row;\n }\n }\n\n @media (min-width:1024px) {\n\n }\n\n @media (min-width:1024px) {\n .c7 {\n width: 100%;\n }\n }\n\n <article\n className=\"c0\"\n >\n <a\n className=\"c1 c2\"\n color=\"red\"\n href=\"/test\"\n target=\"_self\"\n type=\"standard\"\n >\n <div\n className=\"c3\"\n >\n <div\n className=\"c4 c5\"\n height=\"80px\"\n width=\"80px\"\n >\n <img\n alt=\"Image's description\"\n className=\"c6 lazyload\"\n data-lowsrc=\"mock.asset\"\n data-sizes=\"auto\"\n data-src=\"mock.asset\"\n data-srcset=\"mock.asset\"\n height=\"80px\"\n src=\"mock.asset\"\n srcSet=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\"\n width=\"80px\"\n />\n </div>\n </div>\n <div\n className=\"c7\"\n >\n <span\n className=\"c8 c9\"\n color=\"inherit\"\n size=\"xs\"\n >\n 01 July 2019\n </span>\n <h3\n className=\"c10 c11\"\n color=\"inherit\"\n height=\"2rem\"\n size=\"xl\"\n >\n Press Release\n </h3>\n </div>\n </a>\n </article>\n ");
33
33
  });
@@ -189,6 +189,12 @@ exports[`renders correctly with no body 1`] = `
189
189
  height: auto;
190
190
  }
191
191
 
192
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
193
+ .c3 {
194
+ visibility: hidden;
195
+ }
196
+ }
197
+
192
198
  @media (min-width:0px) {
193
199
  .c0 {
194
200
  -webkit-flex-direction: column;
@@ -119,6 +119,20 @@ exports[`renders Column view correctly 1`] = `
119
119
  z-index: 2;
120
120
  }
121
121
 
122
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
123
+ .c3 {
124
+ background-image: url(//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
125
+ background-size: cover;
126
+ background-position: center;
127
+ }
128
+ }
129
+
130
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
131
+ .c4 {
132
+ visibility: hidden;
133
+ }
134
+ }
135
+
122
136
  @media (min-width:740px) {
123
137
  .c8 {
124
138
  width: auto;
@@ -377,6 +391,20 @@ exports[`renders correctly 1`] = `
377
391
  z-index: 2;
378
392
  }
379
393
 
394
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
395
+ .c3 {
396
+ background-image: url(//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
397
+ background-size: cover;
398
+ background-position: center;
399
+ }
400
+ }
401
+
402
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
403
+ .c4 {
404
+ visibility: hidden;
405
+ }
406
+ }
407
+
380
408
  @media (min-width:740px) {
381
409
  .c8 {
382
410
  width: auto;
@@ -15,5 +15,5 @@ it('renders correctly', () => {
15
15
  imageLow: _data.defaultData.imageLow,
16
16
  images: _data.defaultData.images
17
17
  }))).toJSON();
18
- expect(tree).toMatchInlineSnapshot("\n .c4 {\n color: #FFFFFF;\n font-size: 0.6875rem;\n line-height: 0.6875rem;\n text-transform: inherit;\n line-height: normal;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c2 {\n display: block;\n width: 100%;\n height: auto;\n position: relative;\n }\n\n .c3 {\n width: 100%;\n height: auto;\n display: block;\n object-fit: none;\n }\n\n .c0 {\n position: relative;\n -webkit-text-decoration: none;\n text-decoration: none;\n display: inline;\n line-height: 1.5rem;\n color: #000000;\n border-bottom: 2px solid #000000;\n font-weight: normal;\n }\n\n .c0:hover {\n color: #000000;\n border-bottom: 2px solid #000000;\n }\n\n .c6 {\n border: 0;\n -webkit-clip: rect(0 0 0 0);\n clip: rect(0 0 0 0);\n -webkit-clip-path: inset(50%);\n clip-path: inset(50%);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n height: auto;\n }\n\n .c1 {\n display: block;\n position: relative;\n padding: 0;\n border: none;\n }\n\n .c1:hover,\n .c1:focus {\n border: none;\n }\n\n .c1:hover .c5,\n .c1:focus .c5 {\n overflow: inherit;\n -webkit-clip-path: none;\n clip-path: none;\n margin: 0;\n text-align: center;\n -webkit-transform: translateY(-50%);\n -ms-transform: translateY(-50%);\n transform: translateY(-50%);\n -webkit-clip: auto;\n clip: auto;\n top: 50%;\n left: 0;\n width: 100%;\n z-index: 2;\n }\n\n .c1:hover::after,\n .c1:focus::after {\n content: '';\n position: absolute;\n display: block;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: #E52630;\n }\n\n @media (min-width:740px) {\n .c6 {\n font-size: 1rem;\n }\n }\n\n <a\n className=\"c0 c1\"\n color=\"red\"\n href=\"https://www.comicrelief.com\"\n target=\"_self\"\n type=\"standard\"\n >\n <div\n className=\"c2 lazyload\"\n height=\"auto\"\n width=\"100%\"\n >\n <img\n alt=\"test Image\"\n className=\"c3 lazyload\"\n data-lowsrc=\"http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=100&h=50&q=100\"\n data-sizes=\"auto\"\n data-src={null}\n data-srcset=\"//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=200&h=150&q=50 200w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=400&h=300&q=50 400w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=800&h=600&q=50 800w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=1200&h=900&q=50 1200w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=1440&h=1080&q=50 1440w\"\n height=\"auto\"\n src={null}\n srcSet=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\"\n width=\"100%\"\n />\n </div>\n <span\n className=\"c4 c5 c6\"\n color=\"white\"\n size=\"xxs\"\n >\n Find out more\n </span>\n </a>\n ");
18
+ expect(tree).toMatchInlineSnapshot("\n .c4 {\n color: #FFFFFF;\n font-size: 0.6875rem;\n line-height: 0.6875rem;\n text-transform: inherit;\n line-height: normal;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c2 {\n display: block;\n width: 100%;\n height: auto;\n position: relative;\n }\n\n .c3 {\n width: 100%;\n height: auto;\n display: block;\n object-fit: none;\n }\n\n .c0 {\n position: relative;\n -webkit-text-decoration: none;\n text-decoration: none;\n display: inline;\n line-height: 1.5rem;\n color: #000000;\n border-bottom: 2px solid #000000;\n font-weight: normal;\n }\n\n .c0:hover {\n color: #000000;\n border-bottom: 2px solid #000000;\n }\n\n .c6 {\n border: 0;\n -webkit-clip: rect(0 0 0 0);\n clip: rect(0 0 0 0);\n -webkit-clip-path: inset(50%);\n clip-path: inset(50%);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n height: auto;\n }\n\n .c1 {\n display: block;\n position: relative;\n padding: 0;\n border: none;\n }\n\n .c1:hover,\n .c1:focus {\n border: none;\n }\n\n .c1:hover .c5,\n .c1:focus .c5 {\n overflow: inherit;\n -webkit-clip-path: none;\n clip-path: none;\n margin: 0;\n text-align: center;\n -webkit-transform: translateY(-50%);\n -ms-transform: translateY(-50%);\n transform: translateY(-50%);\n -webkit-clip: auto;\n clip: auto;\n top: 50%;\n left: 0;\n width: 100%;\n z-index: 2;\n }\n\n .c1:hover::after,\n .c1:focus::after {\n content: '';\n position: absolute;\n display: block;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: #E52630;\n }\n\n @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {\n .c2 {\n background-image: url(//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);\n background-size: cover;\n background-position: center;\n }\n }\n\n @media (min-width:740px) {\n .c6 {\n font-size: 1rem;\n }\n }\n\n <a\n className=\"c0 c1\"\n color=\"red\"\n href=\"https://www.comicrelief.com\"\n target=\"_self\"\n type=\"standard\"\n >\n <div\n className=\"c2 lazyload\"\n height=\"auto\"\n width=\"100%\"\n >\n <img\n alt=\"test Image\"\n className=\"c3 lazyload\"\n data-lowsrc=\"http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=100&h=50&q=100\"\n data-sizes=\"auto\"\n data-src={null}\n data-srcset=\"//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=200&h=150&q=50 200w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=400&h=300&q=50 400w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=800&h=600&q=50 800w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=1200&h=900&q=50 1200w,//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg?w=1440&h=1080&q=50 1440w\"\n height=\"auto\"\n src={null}\n srcSet=\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\"\n width=\"100%\"\n />\n </div>\n <span\n className=\"c4 c5 c6\"\n color=\"white\"\n size=\"xxs\"\n >\n Find out more\n </span>\n </a>\n ");
19
19
  });
@@ -153,6 +153,20 @@ exports[`renders Promo correctly 1`] = `
153
153
  }
154
154
  }
155
155
 
156
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
157
+ .c2 {
158
+ background-image: url(../promo.jpg);
159
+ background-size: cover;
160
+ background-position: center;
161
+ }
162
+ }
163
+
164
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
165
+ .c3 {
166
+ visibility: hidden;
167
+ }
168
+ }
169
+
156
170
  @media (min-width:740px) {
157
171
  .c9 {
158
172
  width: auto;
@@ -431,6 +445,20 @@ exports[`renders Promo correctly end position 1`] = `
431
445
  }
432
446
  }
433
447
 
448
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
449
+ .c2 {
450
+ background-image: url(../promo.jpg);
451
+ background-size: cover;
452
+ background-position: center;
453
+ }
454
+ }
455
+
456
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
457
+ .c3 {
458
+ visibility: hidden;
459
+ }
460
+ }
461
+
434
462
  @media (min-width:740px) {
435
463
  .c9 {
436
464
  width: auto;
@@ -97,6 +97,12 @@ exports[`renders correctly in minimalist form 1`] = `
97
97
  margin: 0;
98
98
  }
99
99
 
100
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
101
+ .c5 {
102
+ visibility: hidden;
103
+ }
104
+ }
105
+
100
106
  @media (min-width:740px) {
101
107
  .c2 {
102
108
  -webkit-flex-direction: row;
@@ -279,6 +285,12 @@ exports[`renders correctly with copy 1`] = `
279
285
  }
280
286
  }
281
287
 
288
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
289
+ .c5 {
290
+ visibility: hidden;
291
+ }
292
+ }
293
+
282
294
  @media (min-width:740px) {
283
295
  .c2 {
284
296
  -webkit-flex-direction: row;
@@ -452,6 +464,12 @@ exports[`renders correctly with date 1`] = `
452
464
  margin: 0;
453
465
  }
454
466
 
467
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
468
+ .c5 {
469
+ visibility: hidden;
470
+ }
471
+ }
472
+
455
473
  @media (min-width:740px) {
456
474
  .c2 {
457
475
  -webkit-flex-direction: row;
@@ -619,6 +637,12 @@ exports[`renders correctly with date and type 1`] = `
619
637
  margin: 0;
620
638
  }
621
639
 
640
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
641
+ .c5 {
642
+ visibility: hidden;
643
+ }
644
+ }
645
+
622
646
  @media (min-width:740px) {
623
647
  .c2 {
624
648
  -webkit-flex-direction: row;
@@ -65,6 +65,20 @@ exports[`renders Single Message with 100% vertical height image correctly 1`] =
65
65
  z-index: 1;
66
66
  }
67
67
 
68
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
69
+ .c3 {
70
+ background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
71
+ background-size: cover;
72
+ background-position: center;
73
+ }
74
+ }
75
+
76
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
77
+ .c4 {
78
+ visibility: hidden;
79
+ }
80
+ }
81
+
68
82
  @media (min-width:740px) {
69
83
  .c0 {
70
84
  -webkit-flex-direction: row;
@@ -278,6 +292,20 @@ exports[`renders Single Message with Image correctly 1`] = `
278
292
  z-index: 1;
279
293
  }
280
294
 
295
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
296
+ .c3 {
297
+ background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
298
+ background-size: cover;
299
+ background-position: center;
300
+ }
301
+ }
302
+
303
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
304
+ .c4 {
305
+ visibility: hidden;
306
+ }
307
+ }
308
+
281
309
  @media (min-width:740px) {
282
310
  .c8 {
283
311
  width: auto;
@@ -482,6 +510,20 @@ exports[`renders Single Message with double image correctly 1`] = `
482
510
  z-index: 1;
483
511
  }
484
512
 
513
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
514
+ .c3 {
515
+ background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
516
+ background-size: cover;
517
+ background-position: center;
518
+ }
519
+ }
520
+
521
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
522
+ .c4 {
523
+ visibility: hidden;
524
+ }
525
+ }
526
+
485
527
  @media (min-width:740px) {
486
528
  .c0 {
487
529
  -webkit-flex-direction: row;
@@ -736,6 +778,20 @@ exports[`renders Single Message with full width correctly 1`] = `
736
778
  z-index: 1;
737
779
  }
738
780
 
781
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
782
+ .c3 {
783
+ background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
784
+ background-size: cover;
785
+ background-position: center;
786
+ }
787
+ }
788
+
789
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
790
+ .c4 {
791
+ visibility: hidden;
792
+ }
793
+ }
794
+
739
795
  @media (min-width:740px) {
740
796
  .c8 {
741
797
  width: auto;
@@ -940,6 +996,20 @@ exports[`renders Single Message with full width image and no text correctly 1`]
940
996
  z-index: 1;
941
997
  }
942
998
 
999
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
1000
+ .c3 {
1001
+ background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
1002
+ background-size: cover;
1003
+ background-position: center;
1004
+ }
1005
+ }
1006
+
1007
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
1008
+ .c4 {
1009
+ visibility: hidden;
1010
+ }
1011
+ }
1012
+
943
1013
  @media (min-width:740px) {
944
1014
 
945
1015
  }
@@ -1066,6 +1136,14 @@ exports[`renders Single Message with no Image correctly 1`] = `
1066
1136
  padding: 1rem;
1067
1137
  }
1068
1138
 
1139
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
1140
+
1141
+ }
1142
+
1143
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
1144
+
1145
+ }
1146
+
1069
1147
  @media (min-width:740px) {
1070
1148
 
1071
1149
  }
@@ -153,6 +153,20 @@ exports[`renders correctly 1`] = `
153
153
  right: 1.5rem;
154
154
  }
155
155
 
156
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
157
+ .c3 {
158
+ background-image: url(//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
159
+ background-size: cover;
160
+ background-position: center;
161
+ }
162
+ }
163
+
164
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
165
+ .c4 {
166
+ visibility: hidden;
167
+ }
168
+ }
169
+
156
170
  @media (min-width:740px) {
157
171
  .c12 {
158
172
  width: auto;
@@ -22,5 +22,5 @@ it('renders correctly', () => {
22
22
  subtitle: "Jordan was close to suicide - which is now the biggest killer of men under 45 in the UK. Join now and help save lives.",
23
23
  otherDescription: "Your donation will help us fund amazing projects in the UK and around the world."
24
24
  })).toJSON();
25
- expect(tree).toMatchInlineSnapshot("\n .c6 {\n font-size: 1.5rem;\n line-height: 1.5rem;\n text-transform: inherit;\n font-weight: 800;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c7 {\n font-size: 1rem;\n line-height: 1rem;\n text-transform: inherit;\n line-height: normal;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c12 {\n font-size: 1rem;\n line-height: 1rem;\n text-transform: inherit;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c22 {\n font-size: 1rem;\n line-height: 1rem;\n text-transform: inherit;\n font-weight: 500;\n line-height: normal;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c1 {\n display: block;\n width: 100%;\n height: 100%;\n position: relative;\n }\n\n .c3 {\n width: 100%;\n height: 100%;\n display: block;\n object-fit: cover;\n }\n\n .c14 {\n width: 100%;\n position: relative;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n color: #5C5C5E;\n }\n\n .c16 {\n margin-bottom: 0.5rem;\n font-weight: normal;\n }\n\n .c17 {\n position: relative;\n font-size: 1.25rem;\n }\n\n .c18 {\n position: relative;\n width: 100%;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: end;\n -webkit-justify-content: flex-end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n }\n\n .c19 {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: 48px;\n padding: 1rem 2.4rem 1rem 1.5rem;\n background-color: #F4F3F5;\n border: 1px solid;\n border-color: #E1E2E3;\n box-shadow: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n color: #000000;\n border-radius: 0.5rem;\n font-size: inherit;\n z-index: 2;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c19:focus {\n border: 1px solid #666;\n }\n\n .c15 {\n display: block;\n }\n\n .c15 input {\n border: 2px solid #E1E2E3;\n font-size: 1.5rem;\n font-weight: 800;\n -webkit-letter-spacing: -2px;\n -moz-letter-spacing: -2px;\n -ms-letter-spacing: -2px;\n letter-spacing: -2px;\n height: auto;\n }\n\n .c20 {\n display: block;\n }\n\n .c20 input {\n border: 2px solid #E1E2E3;\n font-size: 1.5rem;\n font-weight: 800;\n -webkit-letter-spacing: -2px;\n -moz-letter-spacing: -2px;\n -ms-letter-spacing: -2px;\n letter-spacing: -2px;\n height: auto;\n border-color: #E52630;\n background-color: #E52630;\n color: #FFFFFF;\n }\n\n .c0 {\n background-color: #FEE3CC;\n position: relative;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n min-height: 100vh;\n }\n\n .c2 {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: auto;\n }\n\n .c2:before {\n color: #FEE3CC;\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n box-shadow: inset 0px 4rem 2rem -2rem;\n }\n\n .c4 {\n position: relative;\n max-width: 320px;\n text-align: center;\n margin-bottom: 50%;\n }\n\n .c5 {\n padding: 2rem 1rem 0;\n margin-bottom: 2rem;\n }\n\n .c8 {\n background-color: #FFFFFF;\n box-shadow: 0px 1rem 4rem rgba(0,0,0,0.3);\n height: 450px;\n }\n\n .c9 {\n padding: 1rem;\n }\n\n .c9 h3 {\n margin-top: 1rem;\n }\n\n .c9 input {\n max-width: 100%;\n margin: 0;\n }\n\n .c10 {\n padding: 0;\n margin: 0;\n border: none;\n }\n\n .c10 > :not(:last-child):not(legend) {\n margin-bottom: 2rem;\n }\n\n .c11 {\n margin: 0;\n padding: 0;\n }\n\n .c13 {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -webkit-justify-content: space-between;\n -ms-flex-pack: justify;\n justify-content: space-between;\n }\n\n .c13 label {\n -webkit-flex: 0 0 30%;\n -ms-flex: 0 0 30%;\n flex: 0 0 30%;\n }\n\n .c13 label input {\n cursor: pointer;\n padding: 1rem;\n }\n\n .c13 label:hover input {\n border-color: #E52630;\n }\n\n .c21 {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n }\n\n .c23 {\n margin-right: auto;\n }\n\n .c24 {\n position: relative;\n -webkit-flex: 0 0 50%;\n -ms-flex: 0 0 50%;\n flex: 0 0 50%;\n font-weight: 400;\n display: block;\n }\n\n .c24 span {\n position: absolute;\n padding: 0px 15px;\n font-size: 20px;\n top: 50%;\n -webkit-transform: translateY(-50%);\n -ms-transform: translateY(-50%);\n transform: translateY(-50%);\n left: 0px;\n font-weight: 500;\n }\n\n .c24 input {\n border: 2px solid #E1E2E3;\n background: transparent;\n padding: 0.5rem 1rem 0.5rem 2rem;\n }\n\n .c24 input:focus {\n border: 2px solid #E52630;\n }\n\n .c26 {\n line-height: 1.5;\n }\n\n .c25 {\n width: 100%;\n color: #FFFFFF;\n font-size: 1rem;\n font-weight: bold;\n cursor: pointer;\n padding: 1rem 0.5rem;\n background: #E52630;\n border: none;\n border-radius: 100px;\n }\n\n .c25:active,\n .c25:focus,\n .c25:hover {\n background-color: #961D35;\n }\n\n @media (min-width:740px) {\n\n }\n\n @media (min-width:1024px) {\n\n }\n\n @media (min-width:1024px) {\n .c0 {\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: inherit;\n -webkit-justify-content: inherit;\n -ms-flex-pack: inherit;\n justify-content: inherit;\n min-height: 750px;\n height: 100vh;\n max-height: 900px;\n -webkit-flex-direction: row;\n -ms-flex-direction: row;\n flex-direction: row;\n }\n }\n\n @media (min-width:1024px) {\n .c2 {\n height: 100%;\n }\n\n .c2:before {\n content: none;\n }\n }\n\n @media (min-width:1024px) {\n .c4 {\n margin: 0 8rem;\n max-width: 420px;\n }\n }\n\n @media (min-width:1024px) {\n .c8 {\n height: 430px;\n }\n }\n\n @media (min-width:1024px) {\n .c24 {\n -webkit-flex: 0 0 60%;\n -ms-flex: 0 0 60%;\n flex: 0 0 60%;\n }\n }\n\n @media (min-width:1024px) {\n .c25 {\n width: auto;\n padding: 1rem 2rem;\n margin: 0 auto 2rem;\n }\n }\n\n <div\n className=\"c0\"\n id=\"mship-1\"\n >\n <div\n className=\"c1 c2\"\n height=\"100%\"\n width=\"100%\"\n >\n <img\n alt=\"Background image\"\n className=\"c3 lazyload\"\n data-src={null}\n height=\"100%\"\n width=\"100%\"\n />\n </div>\n <div\n className=\"c4\"\n >\n <div\n className=\"c5\"\n >\n <h2\n className=\"c6\"\n color=\"inherit\"\n size=\"l\"\n >\n Help someone like Jordan see a better tomorrow\n </h2>\n <p\n className=\"c7\"\n color=\"inherit\"\n size=\"s\"\n >\n Jordan was close to suicide - which is now the biggest killer of men under 45 in the UK. Join now and help save lives.\n </p>\n </div>\n <div\n className=\"c8\"\n >\n <form\n className=\"c9\"\n onSubmit={[Function]}\n >\n <fieldset\n className=\"c10\"\n >\n <legend\n className=\"c11\"\n >\n <h3\n className=\"c12\"\n color=\"inherit\"\n size=\"s\"\n >\n Choose your monthly donation\n </h3>\n </legend>\n <div\n className=\"c13\"\n >\n <label\n className=\"c14 c15\"\n htmlFor=\"mship-1--moneyBuy-box1\"\n >\n <span\n className=\"c7 c16\"\n color=\"inherit\"\n dangerouslySetInnerHTML={\n Object {\n \"__html\": \"\",\n }\n }\n size=\"s\"\n />\n <div\n className=\"c17\"\n >\n \n <div\n className=\"c18\"\n >\n <input\n aria-describedby=\"mship-1--moneyBuy-box1\"\n aria-label=\"\xA35\"\n className=\"c19\"\n id=\"mship-1--moneyBuy-box1\"\n name=\"mship-1--moneyBuy1\"\n onClick={[Function]}\n placeholder=\"\"\n required={false}\n type=\"button\"\n value=\"\xA3 5\"\n />\n \n </div>\n </div>\n \n </label>\n <label\n className=\"c14 c20\"\n htmlFor=\"mship-1--moneyBuy-box2\"\n >\n <span\n className=\"c7 c16\"\n color=\"inherit\"\n dangerouslySetInnerHTML={\n Object {\n \"__html\": \"\",\n }\n }\n size=\"s\"\n />\n <div\n className=\"c17\"\n >\n \n <div\n className=\"c18\"\n >\n <input\n aria-describedby=\"mship-1--moneyBuy-box2\"\n aria-label=\"\xA310\"\n className=\"c19\"\n id=\"mship-1--moneyBuy-box2\"\n name=\"mship-1--moneyBuy2\"\n onClick={[Function]}\n placeholder=\"\"\n required={false}\n type=\"button\"\n value=\"\xA3 10\"\n />\n \n </div>\n </div>\n \n </label>\n <label\n className=\"c14 c15\"\n htmlFor=\"mship-1--moneyBuy-box3\"\n >\n <span\n className=\"c7 c16\"\n color=\"inherit\"\n dangerouslySetInnerHTML={\n Object {\n \"__html\": \"\",\n }\n }\n size=\"s\"\n />\n <div\n className=\"c17\"\n >\n \n <div\n className=\"c18\"\n >\n <input\n aria-describedby=\"mship-1--moneyBuy-box3\"\n aria-label=\"\xA320\"\n className=\"c19\"\n id=\"mship-1--moneyBuy-box3\"\n name=\"mship-1--moneyBuy3\"\n onClick={[Function]}\n placeholder=\"\"\n required={false}\n type=\"button\"\n value=\"\xA3 20\"\n />\n \n </div>\n </div>\n \n </label>\n </div>\n <div\n className=\"c21\"\n >\n <span\n className=\"c22 c23\"\n color=\"inherit\"\n size=\"s\"\n >\n Other amount\n </span>\n <label\n className=\"c14 c24\"\n htmlFor=\"mship-1--MoneyBuy-userInput\"\n >\n <span\n className=\"c7 c16\"\n color=\"inherit\"\n dangerouslySetInnerHTML={\n Object {\n \"__html\": \"\xA3\",\n }\n }\n size=\"s\"\n />\n <div\n className=\"c17\"\n >\n \n <div\n className=\"c18\"\n >\n <input\n aria-describedby=\"mship-1--MoneyBuy-userInput\"\n aria-label=\"Input a different amount\"\n className=\"c19\"\n id=\"mship-1--MoneyBuy-userInput\"\n max=\"25000\"\n min=\"1\"\n name=\"membership_amount\"\n onChange={[Function]}\n onClick={[Function]}\n onKeyPress={[Function]}\n pattern=\"[^[0-9]+([,.][0-9]+)?$]\"\n placeholder=\"0.00\"\n required={false}\n step=\"0.01\"\n type=\"number\"\n value=\"\"\n />\n \n </div>\n </div>\n \n </label>\n </div>\n <input\n className=\"c25\"\n type=\"submit\"\n value=\"Donate\"\n />\n <p\n className=\"c26\"\n />\n </fieldset>\n </form>\n </div>\n </div>\n </div>\n ");
25
+ expect(tree).toMatchInlineSnapshot("\n .c6 {\n font-size: 1.5rem;\n line-height: 1.5rem;\n text-transform: inherit;\n font-weight: 800;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c7 {\n font-size: 1rem;\n line-height: 1rem;\n text-transform: inherit;\n line-height: normal;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c12 {\n font-size: 1rem;\n line-height: 1rem;\n text-transform: inherit;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c22 {\n font-size: 1rem;\n line-height: 1rem;\n text-transform: inherit;\n font-weight: 500;\n line-height: normal;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c1 {\n display: block;\n width: 100%;\n height: 100%;\n position: relative;\n }\n\n .c3 {\n width: 100%;\n height: 100%;\n display: block;\n object-fit: cover;\n }\n\n .c14 {\n width: 100%;\n position: relative;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-flex-direction: column;\n -ms-flex-direction: column;\n flex-direction: column;\n color: #5C5C5E;\n }\n\n .c16 {\n margin-bottom: 0.5rem;\n font-weight: normal;\n }\n\n .c17 {\n position: relative;\n font-size: 1.25rem;\n }\n\n .c18 {\n position: relative;\n width: 100%;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: end;\n -webkit-justify-content: flex-end;\n -ms-flex-pack: end;\n justify-content: flex-end;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n }\n\n .c19 {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: 48px;\n padding: 1rem 2.4rem 1rem 1.5rem;\n background-color: #F4F3F5;\n border: 1px solid;\n border-color: #E1E2E3;\n box-shadow: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n color: #000000;\n border-radius: 0.5rem;\n font-size: inherit;\n z-index: 2;\n font-family: 'Montserrat',Helvetica,Arial,sans-serif;\n }\n\n .c19:focus {\n border: 1px solid #666;\n }\n\n .c15 {\n display: block;\n }\n\n .c15 input {\n border: 2px solid #E1E2E3;\n font-size: 1.5rem;\n font-weight: 800;\n -webkit-letter-spacing: -2px;\n -moz-letter-spacing: -2px;\n -ms-letter-spacing: -2px;\n letter-spacing: -2px;\n height: auto;\n }\n\n .c20 {\n display: block;\n }\n\n .c20 input {\n border: 2px solid #E1E2E3;\n font-size: 1.5rem;\n font-weight: 800;\n -webkit-letter-spacing: -2px;\n -moz-letter-spacing: -2px;\n -ms-letter-spacing: -2px;\n letter-spacing: -2px;\n height: auto;\n border-color: #E52630;\n background-color: #E52630;\n color: #FFFFFF;\n }\n\n .c0 {\n background-color: #FEE3CC;\n position: relative;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n min-height: 100vh;\n }\n\n .c2 {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: auto;\n }\n\n .c2:before {\n color: #FEE3CC;\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n box-shadow: inset 0px 4rem 2rem -2rem;\n }\n\n .c4 {\n position: relative;\n max-width: 320px;\n text-align: center;\n margin-bottom: 50%;\n }\n\n .c5 {\n padding: 2rem 1rem 0;\n margin-bottom: 2rem;\n }\n\n .c8 {\n background-color: #FFFFFF;\n box-shadow: 0px 1rem 4rem rgba(0,0,0,0.3);\n height: 450px;\n }\n\n .c9 {\n padding: 1rem;\n }\n\n .c9 h3 {\n margin-top: 1rem;\n }\n\n .c9 input {\n max-width: 100%;\n margin: 0;\n }\n\n .c10 {\n padding: 0;\n margin: 0;\n border: none;\n }\n\n .c10 > :not(:last-child):not(legend) {\n margin-bottom: 2rem;\n }\n\n .c11 {\n margin: 0;\n padding: 0;\n }\n\n .c13 {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -webkit-justify-content: space-between;\n -ms-flex-pack: justify;\n justify-content: space-between;\n }\n\n .c13 label {\n -webkit-flex: 0 0 30%;\n -ms-flex: 0 0 30%;\n flex: 0 0 30%;\n }\n\n .c13 label input {\n cursor: pointer;\n padding: 1rem;\n }\n\n .c13 label:hover input {\n border-color: #E52630;\n }\n\n .c21 {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n }\n\n .c23 {\n margin-right: auto;\n }\n\n .c24 {\n position: relative;\n -webkit-flex: 0 0 50%;\n -ms-flex: 0 0 50%;\n flex: 0 0 50%;\n font-weight: 400;\n display: block;\n }\n\n .c24 span {\n position: absolute;\n padding: 0px 15px;\n font-size: 20px;\n top: 50%;\n -webkit-transform: translateY(-50%);\n -ms-transform: translateY(-50%);\n transform: translateY(-50%);\n left: 0px;\n font-weight: 500;\n }\n\n .c24 input {\n border: 2px solid #E1E2E3;\n background: transparent;\n padding: 0.5rem 1rem 0.5rem 2rem;\n }\n\n .c24 input:focus {\n border: 2px solid #E52630;\n }\n\n .c26 {\n line-height: 1.5;\n }\n\n .c25 {\n width: 100%;\n color: #FFFFFF;\n font-size: 1rem;\n font-weight: bold;\n cursor: pointer;\n padding: 1rem 0.5rem;\n background: #E52630;\n border: none;\n border-radius: 100px;\n }\n\n .c25:active,\n .c25:focus,\n .c25:hover {\n background-color: #961D35;\n }\n\n @supports not ((object-fit:cover) or (object-fit:contain)) {\n .c3 {\n visibility: hidden;\n }\n }\n\n @media (min-width:740px) {\n\n }\n\n @media (min-width:1024px) {\n\n }\n\n @media (min-width:1024px) {\n .c0 {\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: inherit;\n -webkit-justify-content: inherit;\n -ms-flex-pack: inherit;\n justify-content: inherit;\n min-height: 750px;\n height: 100vh;\n max-height: 900px;\n -webkit-flex-direction: row;\n -ms-flex-direction: row;\n flex-direction: row;\n }\n }\n\n @media (min-width:1024px) {\n .c2 {\n height: 100%;\n }\n\n .c2:before {\n content: none;\n }\n }\n\n @media (min-width:1024px) {\n .c4 {\n margin: 0 8rem;\n max-width: 420px;\n }\n }\n\n @media (min-width:1024px) {\n .c8 {\n height: 430px;\n }\n }\n\n @media (min-width:1024px) {\n .c24 {\n -webkit-flex: 0 0 60%;\n -ms-flex: 0 0 60%;\n flex: 0 0 60%;\n }\n }\n\n @media (min-width:1024px) {\n .c25 {\n width: auto;\n padding: 1rem 2rem;\n margin: 0 auto 2rem;\n }\n }\n\n <div\n className=\"c0\"\n id=\"mship-1\"\n >\n <div\n className=\"c1 c2\"\n height=\"100%\"\n width=\"100%\"\n >\n <img\n alt=\"Background image\"\n className=\"c3 lazyload\"\n data-src={null}\n height=\"100%\"\n width=\"100%\"\n />\n </div>\n <div\n className=\"c4\"\n >\n <div\n className=\"c5\"\n >\n <h2\n className=\"c6\"\n color=\"inherit\"\n size=\"l\"\n >\n Help someone like Jordan see a better tomorrow\n </h2>\n <p\n className=\"c7\"\n color=\"inherit\"\n size=\"s\"\n >\n Jordan was close to suicide - which is now the biggest killer of men under 45 in the UK. Join now and help save lives.\n </p>\n </div>\n <div\n className=\"c8\"\n >\n <form\n className=\"c9\"\n onSubmit={[Function]}\n >\n <fieldset\n className=\"c10\"\n >\n <legend\n className=\"c11\"\n >\n <h3\n className=\"c12\"\n color=\"inherit\"\n size=\"s\"\n >\n Choose your monthly donation\n </h3>\n </legend>\n <div\n className=\"c13\"\n >\n <label\n className=\"c14 c15\"\n htmlFor=\"mship-1--moneyBuy-box1\"\n >\n <span\n className=\"c7 c16\"\n color=\"inherit\"\n dangerouslySetInnerHTML={\n Object {\n \"__html\": \"\",\n }\n }\n size=\"s\"\n />\n <div\n className=\"c17\"\n >\n \n <div\n className=\"c18\"\n >\n <input\n aria-describedby=\"mship-1--moneyBuy-box1\"\n aria-label=\"\xA35\"\n className=\"c19\"\n id=\"mship-1--moneyBuy-box1\"\n name=\"mship-1--moneyBuy1\"\n onClick={[Function]}\n placeholder=\"\"\n required={false}\n type=\"button\"\n value=\"\xA3 5\"\n />\n \n </div>\n </div>\n \n </label>\n <label\n className=\"c14 c20\"\n htmlFor=\"mship-1--moneyBuy-box2\"\n >\n <span\n className=\"c7 c16\"\n color=\"inherit\"\n dangerouslySetInnerHTML={\n Object {\n \"__html\": \"\",\n }\n }\n size=\"s\"\n />\n <div\n className=\"c17\"\n >\n \n <div\n className=\"c18\"\n >\n <input\n aria-describedby=\"mship-1--moneyBuy-box2\"\n aria-label=\"\xA310\"\n className=\"c19\"\n id=\"mship-1--moneyBuy-box2\"\n name=\"mship-1--moneyBuy2\"\n onClick={[Function]}\n placeholder=\"\"\n required={false}\n type=\"button\"\n value=\"\xA3 10\"\n />\n \n </div>\n </div>\n \n </label>\n <label\n className=\"c14 c15\"\n htmlFor=\"mship-1--moneyBuy-box3\"\n >\n <span\n className=\"c7 c16\"\n color=\"inherit\"\n dangerouslySetInnerHTML={\n Object {\n \"__html\": \"\",\n }\n }\n size=\"s\"\n />\n <div\n className=\"c17\"\n >\n \n <div\n className=\"c18\"\n >\n <input\n aria-describedby=\"mship-1--moneyBuy-box3\"\n aria-label=\"\xA320\"\n className=\"c19\"\n id=\"mship-1--moneyBuy-box3\"\n name=\"mship-1--moneyBuy3\"\n onClick={[Function]}\n placeholder=\"\"\n required={false}\n type=\"button\"\n value=\"\xA3 20\"\n />\n \n </div>\n </div>\n \n </label>\n </div>\n <div\n className=\"c21\"\n >\n <span\n className=\"c22 c23\"\n color=\"inherit\"\n size=\"s\"\n >\n Other amount\n </span>\n <label\n className=\"c14 c24\"\n htmlFor=\"mship-1--MoneyBuy-userInput\"\n >\n <span\n className=\"c7 c16\"\n color=\"inherit\"\n dangerouslySetInnerHTML={\n Object {\n \"__html\": \"\xA3\",\n }\n }\n size=\"s\"\n />\n <div\n className=\"c17\"\n >\n \n <div\n className=\"c18\"\n >\n <input\n aria-describedby=\"mship-1--MoneyBuy-userInput\"\n aria-label=\"Input a different amount\"\n className=\"c19\"\n id=\"mship-1--MoneyBuy-userInput\"\n max=\"25000\"\n min=\"1\"\n name=\"membership_amount\"\n onChange={[Function]}\n onClick={[Function]}\n onKeyPress={[Function]}\n pattern=\"[^[0-9]+([,.][0-9]+)?$]\"\n placeholder=\"0.00\"\n required={false}\n step=\"0.01\"\n type=\"number\"\n value=\"\"\n />\n \n </div>\n </div>\n \n </label>\n </div>\n <input\n className=\"c25\"\n type=\"submit\"\n value=\"Donate\"\n />\n <p\n className=\"c26\"\n />\n </fieldset>\n </form>\n </div>\n </div>\n </div>\n ");
26
26
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comicrelief/component-library",
3
3
  "author": "Comic Relief Engineering Team",
4
- "version": "8.25.8",
4
+ "version": "8.26.0",
5
5
  "main": "dist/index.js",
6
6
  "license": "ISC",
7
7
  "jest": {
@@ -1,4 +1,4 @@
1
- import React, { useEffect, useState } from 'react';
1
+ import React from 'react';
2
2
  import styled, { css, withTheme } from 'styled-components';
3
3
  import PropTypes from 'prop-types';
4
4
  import spacing from '../../../theme/shared/spacing';
@@ -10,22 +10,39 @@ import 'lazysizes/plugins/blur-up/ls.blur-up';
10
10
  const IMAGE_FALLBACK = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
11
11
 
12
12
  const Wrapper = styled.div`
13
- ${({ objFitState, nonObjFitImage }) => (!objFitState && nonObjFitImage) && `background-image: url(${nonObjFitImage}); background-size: cover; background-position: center;`};
13
+ // If this browser doesn't support objectFit:
14
+ ${({ nonObjFitImage }) => (nonObjFitImage)
15
+ && `@supports not ((object-fit: cover) or (object-fit: none) or (object-fit: contain)) {
16
+ background-image: url(${nonObjFitImage});
17
+ background-size: cover;
18
+ background-position: center;
19
+ }
20
+ `};
21
+
14
22
  display: block;
15
23
  width: ${props => (props.width ? props.width : '100%')};
16
24
  height: ${props => (props.height ? props.height : '100%')};
17
25
  position: relative;
18
- ${({ isBackgroundImage }) => isBackgroundImage && 'position: absolute; bottom: 0px; left: 0px; right: 0px; height: 100%;'};
26
+
27
+ ${({ isBackgroundImage }) => isBackgroundImage
28
+ && 'position: absolute; bottom: 0px; left: 0px; right: 0px; height: 100%;'};
19
29
  `;
20
30
 
21
31
  const Image = styled.img`
22
32
  width: ${props => (props.width ? props.width : '100%')};
23
33
  height: ${props => (props.height ? props.height : 'auto')};
24
34
  display: block;
35
+
25
36
  object-fit: ${props => (props.objectFit === 'none' && 'none')
26
37
  || (props.objectFit === 'cover' && 'cover')
27
38
  || (props.objectFit === 'contain' && 'contain')};
28
- ${({ objectFit, objFitState }) => (objectFit !== 'none' && !objFitState) && 'visibility: hidden;'}; // Allows image to provide the container height, but make it invisible
39
+
40
+ // If this browser doesn't support objectFit:
41
+ ${({ objectFit }) => (objectFit !== 'none')
42
+ && `@supports not ((object-fit: cover) or (object-fit: contain)) {
43
+ visibility: hidden;
44
+ `}
45
+ // Allows image to provide the container height, but make it invisible
29
46
 
30
47
  /* Check for Cards/smallBreakpointRowLayout prop coming from the CMS and adjust styling for row view */
31
48
  ${({ smallBreakpointRowLayout }) => (smallBreakpointRowLayout === true) && css`
@@ -60,7 +77,6 @@ const Image = styled.img`
60
77
  height: ${props => (props.height ? props.height : 'auto')};
61
78
  }
62
79
  `}
63
-
64
80
  `;
65
81
 
66
82
  /** Responsive Picture */
@@ -77,17 +93,8 @@ const Picture = ({
77
93
  mediumBreakpointRowLayout = null,
78
94
  ...rest
79
95
  }) => {
80
- const document = typeof window !== 'undefined' ? window.document : null;
81
- const [objFitState, setObjFitState] = useState(true);
82
96
  let nonObjFitImage = null;
83
97
 
84
- useEffect(() => {
85
- // Once document is available, determine if this browser supports object-fit
86
- if ('objectFit' in document.documentElement.style === false) {
87
- setObjFitState(false);
88
- }
89
- }, [document]);
90
-
91
98
  // Determine which image will be used for the nonObjectFit fallback
92
99
  if (image) {
93
100
  nonObjFitImage = image;
@@ -104,7 +111,6 @@ const Picture = ({
104
111
  images={images}
105
112
  isBackgroundImage={isBackgroundImage}
106
113
  nonObjFitImage={nonObjFitImage}
107
- objFitState={objFitState}
108
114
  {...rest}
109
115
  >
110
116
  <Image
@@ -114,7 +120,6 @@ const Picture = ({
114
120
  objectFit={objectFit}
115
121
  data-src={image}
116
122
  className="lazyload"
117
- objFitState={objFitState}
118
123
  />
119
124
  </Wrapper>
120
125
  );
@@ -126,11 +131,9 @@ const Picture = ({
126
131
  width={width}
127
132
  image={image}
128
133
  images={images}
129
- setObjFitState={setObjFitState}
130
134
  className="lazyload"
131
135
  isBackgroundImage={isBackgroundImage}
132
136
  nonObjFitImage={nonObjFitImage}
133
- objFitState={objFitState}
134
137
  {...rest}
135
138
  >
136
139
  <Image
@@ -145,7 +148,6 @@ const Picture = ({
145
148
  data-sizes="auto"
146
149
  data-lowsrc={imageLow}
147
150
  className="lazyload"
148
- objFitState={objFitState}
149
151
  smallBreakpointRowLayout={smallBreakpointRowLayout}
150
152
  mediumBreakpointRowLayout={mediumBreakpointRowLayout}
151
153
  />
@@ -1,9 +1,9 @@
1
- import React from "react";
2
- import "jest-styled-components";
3
- import renderWithTheme from "../../../../tests/hoc/shallowWithTheme";
4
- import Picture from "./Picture";
5
- import { defaultData } from "../../../styleguide/data/data";
6
- it("renders correctly", () => {
1
+ import React from 'react';
2
+ import 'jest-styled-components';
3
+ import renderWithTheme from '../../../../tests/hoc/shallowWithTheme';
4
+ import Picture from './Picture';
5
+ import { defaultData } from '../../../styleguide/data/data';
6
+ it('renders correctly', () => {
7
7
  const tree = renderWithTheme(
8
8
  <Picture
9
9
  images={defaultData.images}
@@ -27,6 +27,14 @@ it("renders correctly", () => {
27
27
  object-fit: none;
28
28
  }
29
29
 
30
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
31
+ .c0 {
32
+ background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
33
+ background-size: cover;
34
+ background-position: center;
35
+ }
36
+ }
37
+
30
38
  <div
31
39
  className="c0 lazyload"
32
40
  height="auto"
@@ -48,7 +56,7 @@ it("renders correctly", () => {
48
56
  `);
49
57
  });
50
58
 
51
- it("renders correctly with custom props", () => {
59
+ it('renders correctly with custom props', () => {
52
60
  const tree = renderWithTheme(
53
61
  <Picture
54
62
  images={defaultData.images}
@@ -75,6 +83,20 @@ it("renders correctly with custom props", () => {
75
83
  object-fit: cover;
76
84
  }
77
85
 
86
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
87
+ .c0 {
88
+ background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
89
+ background-size: cover;
90
+ background-position: center;
91
+ }
92
+ }
93
+
94
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
95
+ .c1 {
96
+ visibility: hidden;
97
+ }
98
+ }
99
+
78
100
  <div
79
101
  className="c0 lazyload"
80
102
  height="100px"
@@ -154,6 +154,20 @@ it('renders article teaser correctly', () => {
154
154
  display: flex;
155
155
  }
156
156
 
157
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
158
+ .c4 {
159
+ background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
160
+ background-size: cover;
161
+ background-position: center;
162
+ }
163
+ }
164
+
165
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
166
+ .c6 {
167
+ visibility: hidden;
168
+ }
169
+ }
170
+
157
171
  @media (min-width:740px) {
158
172
  .c2 {
159
173
  -webkit-flex-direction: row;
@@ -411,6 +425,20 @@ it('renders press realese correctly', () => {
411
425
  display: flex;
412
426
  }
413
427
 
428
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
429
+ .c4 {
430
+ background-image: url(mock.asset);
431
+ background-size: cover;
432
+ background-position: center;
433
+ }
434
+ }
435
+
436
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
437
+ .c6 {
438
+ visibility: hidden;
439
+ }
440
+ }
441
+
414
442
  @media (min-width:740px) {
415
443
  .c2 {
416
444
  -webkit-flex-direction: row;
@@ -189,6 +189,12 @@ exports[`renders correctly with no body 1`] = `
189
189
  height: auto;
190
190
  }
191
191
 
192
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
193
+ .c3 {
194
+ visibility: hidden;
195
+ }
196
+ }
197
+
192
198
  @media (min-width:0px) {
193
199
  .c0 {
194
200
  -webkit-flex-direction: column;
@@ -119,6 +119,20 @@ exports[`renders Column view correctly 1`] = `
119
119
  z-index: 2;
120
120
  }
121
121
 
122
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
123
+ .c3 {
124
+ background-image: url(//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
125
+ background-size: cover;
126
+ background-position: center;
127
+ }
128
+ }
129
+
130
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
131
+ .c4 {
132
+ visibility: hidden;
133
+ }
134
+ }
135
+
122
136
  @media (min-width:740px) {
123
137
  .c8 {
124
138
  width: auto;
@@ -377,6 +391,20 @@ exports[`renders correctly 1`] = `
377
391
  z-index: 2;
378
392
  }
379
393
 
394
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
395
+ .c3 {
396
+ background-image: url(//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
397
+ background-size: cover;
398
+ background-position: center;
399
+ }
400
+ }
401
+
402
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
403
+ .c4 {
404
+ visibility: hidden;
405
+ }
406
+ }
407
+
380
408
  @media (min-width:740px) {
381
409
  .c8 {
382
410
  width: auto;
@@ -116,6 +116,14 @@ it('renders correctly', () => {
116
116
  background-color: #E52630;
117
117
  }
118
118
 
119
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
120
+ .c2 {
121
+ background-image: url(//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
122
+ background-size: cover;
123
+ background-position: center;
124
+ }
125
+ }
126
+
119
127
  @media (min-width:740px) {
120
128
  .c6 {
121
129
  font-size: 1rem;
@@ -153,6 +153,20 @@ exports[`renders Promo correctly 1`] = `
153
153
  }
154
154
  }
155
155
 
156
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
157
+ .c2 {
158
+ background-image: url(../promo.jpg);
159
+ background-size: cover;
160
+ background-position: center;
161
+ }
162
+ }
163
+
164
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
165
+ .c3 {
166
+ visibility: hidden;
167
+ }
168
+ }
169
+
156
170
  @media (min-width:740px) {
157
171
  .c9 {
158
172
  width: auto;
@@ -431,6 +445,20 @@ exports[`renders Promo correctly end position 1`] = `
431
445
  }
432
446
  }
433
447
 
448
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
449
+ .c2 {
450
+ background-image: url(../promo.jpg);
451
+ background-size: cover;
452
+ background-position: center;
453
+ }
454
+ }
455
+
456
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
457
+ .c3 {
458
+ visibility: hidden;
459
+ }
460
+ }
461
+
434
462
  @media (min-width:740px) {
435
463
  .c9 {
436
464
  width: auto;
@@ -97,6 +97,12 @@ exports[`renders correctly in minimalist form 1`] = `
97
97
  margin: 0;
98
98
  }
99
99
 
100
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
101
+ .c5 {
102
+ visibility: hidden;
103
+ }
104
+ }
105
+
100
106
  @media (min-width:740px) {
101
107
  .c2 {
102
108
  -webkit-flex-direction: row;
@@ -279,6 +285,12 @@ exports[`renders correctly with copy 1`] = `
279
285
  }
280
286
  }
281
287
 
288
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
289
+ .c5 {
290
+ visibility: hidden;
291
+ }
292
+ }
293
+
282
294
  @media (min-width:740px) {
283
295
  .c2 {
284
296
  -webkit-flex-direction: row;
@@ -452,6 +464,12 @@ exports[`renders correctly with date 1`] = `
452
464
  margin: 0;
453
465
  }
454
466
 
467
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
468
+ .c5 {
469
+ visibility: hidden;
470
+ }
471
+ }
472
+
455
473
  @media (min-width:740px) {
456
474
  .c2 {
457
475
  -webkit-flex-direction: row;
@@ -619,6 +637,12 @@ exports[`renders correctly with date and type 1`] = `
619
637
  margin: 0;
620
638
  }
621
639
 
640
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
641
+ .c5 {
642
+ visibility: hidden;
643
+ }
644
+ }
645
+
622
646
  @media (min-width:740px) {
623
647
  .c2 {
624
648
  -webkit-flex-direction: row;
@@ -65,6 +65,20 @@ exports[`renders Single Message with 100% vertical height image correctly 1`] =
65
65
  z-index: 1;
66
66
  }
67
67
 
68
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
69
+ .c3 {
70
+ background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
71
+ background-size: cover;
72
+ background-position: center;
73
+ }
74
+ }
75
+
76
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
77
+ .c4 {
78
+ visibility: hidden;
79
+ }
80
+ }
81
+
68
82
  @media (min-width:740px) {
69
83
  .c0 {
70
84
  -webkit-flex-direction: row;
@@ -278,6 +292,20 @@ exports[`renders Single Message with Image correctly 1`] = `
278
292
  z-index: 1;
279
293
  }
280
294
 
295
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
296
+ .c3 {
297
+ background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
298
+ background-size: cover;
299
+ background-position: center;
300
+ }
301
+ }
302
+
303
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
304
+ .c4 {
305
+ visibility: hidden;
306
+ }
307
+ }
308
+
281
309
  @media (min-width:740px) {
282
310
  .c8 {
283
311
  width: auto;
@@ -482,6 +510,20 @@ exports[`renders Single Message with double image correctly 1`] = `
482
510
  z-index: 1;
483
511
  }
484
512
 
513
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
514
+ .c3 {
515
+ background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
516
+ background-size: cover;
517
+ background-position: center;
518
+ }
519
+ }
520
+
521
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
522
+ .c4 {
523
+ visibility: hidden;
524
+ }
525
+ }
526
+
485
527
  @media (min-width:740px) {
486
528
  .c0 {
487
529
  -webkit-flex-direction: row;
@@ -736,6 +778,20 @@ exports[`renders Single Message with full width correctly 1`] = `
736
778
  z-index: 1;
737
779
  }
738
780
 
781
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
782
+ .c3 {
783
+ background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
784
+ background-size: cover;
785
+ background-position: center;
786
+ }
787
+ }
788
+
789
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
790
+ .c4 {
791
+ visibility: hidden;
792
+ }
793
+ }
794
+
739
795
  @media (min-width:740px) {
740
796
  .c8 {
741
797
  width: auto;
@@ -940,6 +996,20 @@ exports[`renders Single Message with full width image and no text correctly 1`]
940
996
  z-index: 1;
941
997
  }
942
998
 
999
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
1000
+ .c3 {
1001
+ background-image: url(http://images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
1002
+ background-size: cover;
1003
+ background-position: center;
1004
+ }
1005
+ }
1006
+
1007
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
1008
+ .c4 {
1009
+ visibility: hidden;
1010
+ }
1011
+ }
1012
+
943
1013
  @media (min-width:740px) {
944
1014
 
945
1015
  }
@@ -1066,6 +1136,14 @@ exports[`renders Single Message with no Image correctly 1`] = `
1066
1136
  padding: 1rem;
1067
1137
  }
1068
1138
 
1139
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
1140
+
1141
+ }
1142
+
1143
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
1144
+
1145
+ }
1146
+
1069
1147
  @media (min-width:740px) {
1070
1148
 
1071
1149
  }
@@ -153,6 +153,20 @@ exports[`renders correctly 1`] = `
153
153
  right: 1.5rem;
154
154
  }
155
155
 
156
+ @supports not ((object-fit:cover) or (object-fit:none) or (object-fit:contain)) {
157
+ .c3 {
158
+ background-image: url(//images.ctfassets.net/zsfivwzfgl3t/Yq59XdwwQgjNOxky93K1Q/17c2d80dce99067b0b3508f33075cbe3/funding_4-3_2x.jpg);
159
+ background-size: cover;
160
+ background-position: center;
161
+ }
162
+ }
163
+
164
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
165
+ .c4 {
166
+ visibility: hidden;
167
+ }
168
+ }
169
+
156
170
  @media (min-width:740px) {
157
171
  .c12 {
158
172
  width: auto;
@@ -339,6 +339,12 @@ it('renders correctly', () => {
339
339
  background-color: #961D35;
340
340
  }
341
341
 
342
+ @supports not ((object-fit:cover) or (object-fit:contain)) {
343
+ .c3 {
344
+ visibility: hidden;
345
+ }
346
+ }
347
+
342
348
  @media (min-width:740px) {
343
349
 
344
350
  }