@comicrelief/component-library 8.51.6 → 8.51.8

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.
@@ -131,9 +131,9 @@ exports[`renders correctly with data prop 1`] = `
131
131
  }
132
132
 
133
133
  .c3 img {
134
- -webkit-transition: -webkit-transform 0.4s cubic-bezier(0.22,1,0.36,1);
135
- -webkit-transition: transform 0.4s cubic-bezier(0.22,1,0.36,1);
136
- transition: transform 0.4s cubic-bezier(0.22,1,0.36,1);
134
+ -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.65,-0.19,0.37,1.16);
135
+ -webkit-transition: transform 0.3s cubic-bezier(0.65,-0.19,0.37,1.16);
136
+ transition: transform 0.3s cubic-bezier(0.65,-0.19,0.37,1.16);
137
137
  }
138
138
 
139
139
  .c2 {
@@ -337,6 +337,9 @@ exports[`renders correctly with data prop 1`] = `
337
337
  -webkit-transform-origin: center;
338
338
  -ms-transform-origin: center;
339
339
  transform-origin: center;
340
+ -webkit-transition: -webkit-transform 0.4s cubic-bezier(0.68,-1.15,0.265,2.35);
341
+ -webkit-transition: transform 0.4s cubic-bezier(0.68,-1.15,0.265,2.35);
342
+ transition: transform 0.4s cubic-bezier(0.68,-1.15,0.265,2.35);
340
343
  }
341
344
 
342
345
  .c3:hover,
@@ -351,9 +354,9 @@ exports[`renders correctly with data prop 1`] = `
351
354
  }
352
355
 
353
356
  .c3:hover .c4 img {
354
- -webkit-transform: scale(1.11);
355
- -ms-transform: scale(1.11);
356
- transform: scale(1.11);
357
+ -webkit-transform: scale(1.06);
358
+ -ms-transform: scale(1.06);
359
+ transform: scale(1.06);
357
360
  }
358
361
 
359
362
  .c3:hover .c13 {
@@ -619,9 +622,9 @@ exports[`renders correctly without image 1`] = `
619
622
  }
620
623
 
621
624
  .c3 img {
622
- -webkit-transition: -webkit-transform 0.4s cubic-bezier(0.22,1,0.36,1);
623
- -webkit-transition: transform 0.4s cubic-bezier(0.22,1,0.36,1);
624
- transition: transform 0.4s cubic-bezier(0.22,1,0.36,1);
625
+ -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.65,-0.19,0.37,1.16);
626
+ -webkit-transition: transform 0.3s cubic-bezier(0.65,-0.19,0.37,1.16);
627
+ transition: transform 0.3s cubic-bezier(0.65,-0.19,0.37,1.16);
625
628
  }
626
629
 
627
630
  .c2 {
@@ -787,6 +790,9 @@ exports[`renders correctly without image 1`] = `
787
790
  -webkit-transform-origin: center;
788
791
  -ms-transform-origin: center;
789
792
  transform-origin: center;
793
+ -webkit-transition: -webkit-transform 0.4s cubic-bezier(0.68,-1.15,0.265,2.35);
794
+ -webkit-transition: transform 0.4s cubic-bezier(0.68,-1.15,0.265,2.35);
795
+ transition: transform 0.4s cubic-bezier(0.68,-1.15,0.265,2.35);
790
796
  }
791
797
 
792
798
  .c3:hover,
@@ -119,18 +119,20 @@ const CardLink = styled.a`
119
119
 
120
120
  ${({ isInteractive }) => isInteractive && css`
121
121
  img {
122
- transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
122
+ transition: transform 0.3s cubic-bezier(0.65, -0.19, 0.37, 1.16);
123
123
  }
124
124
 
125
125
  // Desktop-only hover effects
126
126
  @media ${({ theme }) => theme.allBreakpoints('M')} {
127
127
  ${bounceUpAnimation(true, 10, 1)};
128
+ /* override the bounceUpAnimation transition */
129
+ transition: transform 0.4s cubic-bezier(0.68, -1.15, 0.265, 2.35);
128
130
 
129
131
  &:hover {
130
132
  box-shadow: 0 0 1.5rem rgba(0, 0, 0, 0.25);
131
133
 
132
134
  ${ImageWrapper} img {
133
- transform: scale(1.11);
135
+ transform: scale(1.06);
134
136
  }
135
137
 
136
138
  ${CTAText} {
@@ -210,31 +212,26 @@ const CardWrapper = styled.div`
210
212
  flex: 0 0 345px;
211
213
  max-width: 345px;
212
214
  `)}
213
- }
214
215
 
215
- /* If the CTA container is too narrow for 2 cards (<= 705px),
216
- force a single card to span full width. */
217
- ${({ columns }) => (columns === 3
218
- ? css`
219
- /* 3-col cards: 2-up needs 2*309 + 16 gap (1rem) = 634px full width at <= 633px */
220
- @container cta-multi-card (max-width: 633px) {
221
- width: 100%;
222
- max-width: 100%;
223
- flex: 1 1 100%;
224
- }
225
- `
226
- : css`
227
- /* 2-col cards: 2-up needs 2*345 + 16 gap (1rem) = 706px full width at <= 705px */
228
- @container cta-multi-card (max-width: 705px) {
229
- width: 100%;
230
- max-width: 100%;
231
- flex: 1 1 100%;
232
- }
233
- `)}
216
+ /*
217
+ * In 2 column mode, if the CTA container is too narrow to display 2-up,
218
+ * fall back to 1-per-row while keeping the card width constrained (not full-width).
219
+ * This matches the 3-col behaviour (1-per-row, centered), and avoids
220
+ * the nightmare of "full width column" cards
221
+ */
222
+ ${({ columns }) => columns === 2 && css`
223
+ @container cta-multi-card (max-width: 705px) {
224
+ flex: 0 0 100%;
225
+ width: min(100%, 345px);
226
+ max-width: 345px;
227
+ margin-inline: auto;
228
+ }
229
+ `}
230
+ }
234
231
  `}
235
232
 
236
233
  ${({ isFullWidth }) => !isFullWidth && css`
237
- @media (min-width: ${breakpointValues.L}px) and (max-width: ${breakpointValues.XL - 1}px) {
234
+ @media (min-width: ${breakpointValues.L}px) {
238
235
  ${({ columns }) => (
239
236
  columns === 3
240
237
  ? css`
@@ -252,13 +249,6 @@ const CardWrapper = styled.div`
252
249
  )}
253
250
  align-self: stretch;
254
251
  }
255
-
256
- @media ${({ theme }) => theme.allBreakpoints('XL')} {
257
- ${({ columns }) => columns === 3 && css`
258
- width: 100%;
259
- max-width: 363px;
260
- `}
261
- }
262
252
  `}
263
253
  `;
264
254