Skip to content

Commit a42add8

Browse files
committed
fix: port CRcom styles over
1 parent 698f963 commit a42add8

2 files changed

Lines changed: 54 additions & 1 deletion

File tree

src/components/Organisms/RichtextCarousel/RichtextCarousel.style.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,17 @@ const CarouselWrapper = styled.div`
5353
margin: 0 auto;
5454
5555
border-radius: 20px;
56-
${defaultBoxShadow()}
56+
${defaultBoxShadow()}
57+
58+
> div:first-child {
59+
* {
60+
margin-top: 0;
61+
}
62+
63+
h1, h2, h3 {
64+
margin-bottom: 1.5rem;
65+
}
66+
}
5767
5868
.carousel {
5969
position: relative;
@@ -236,6 +246,13 @@ const CarouselWrapper = styled.div`
236246
align-items: center;
237247
justify-content: flex-start;
238248
flex-direction: column;
249+
250+
.slide-copy-wrapper {
251+
font-size: 0.9rem;
252+
* {
253+
font-size: inherit;
254+
}
255+
}
239256
}
240257
}
241258
}

src/components/Organisms/RichtextCarousel/RichtextCarousel.test.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ it('renders default padding version correctly', () => {
2828
box-shadow: rgba(0,0,0,0.15) 0px 0px 1rem;
2929
}
3030
31+
.c1 > div:first-child * {
32+
margin-top: 0;
33+
}
34+
35+
.c1 > div:first-child h1,
36+
.c1 > div:first-child h2,
37+
.c1 > div:first-child h3 {
38+
margin-bottom: 1.5rem;
39+
}
40+
3141
.c1 .carousel {
3242
position: relative;
3343
margin: 0 auto;
@@ -122,6 +132,14 @@ it('renders default padding version correctly', () => {
122132
flex-direction: column;
123133
}
124134
135+
.c1 .carousel .richtext-carousel .carousel__slide .carousel__inner-slide .slide-copy-wrapper {
136+
font-size: 0.9rem;
137+
}
138+
139+
.c1 .carousel .richtext-carousel .carousel__slide .carousel__inner-slide .slide-copy-wrapper * {
140+
font-size: inherit;
141+
}
142+
125143
.c0 {
126144
background-color: #F4F3F5;
127145
padding: 2rem 0 2rem;
@@ -285,6 +303,16 @@ it('renders custom padding + background colour version correctly', () => {
285303
box-shadow: rgba(0,0,0,0.15) 0px 0px 1rem;
286304
}
287305
306+
.c1 > div:first-child * {
307+
margin-top: 0;
308+
}
309+
310+
.c1 > div:first-child h1,
311+
.c1 > div:first-child h2,
312+
.c1 > div:first-child h3 {
313+
margin-bottom: 1.5rem;
314+
}
315+
288316
.c1 .carousel {
289317
position: relative;
290318
margin: 0 auto;
@@ -379,6 +407,14 @@ it('renders custom padding + background colour version correctly', () => {
379407
flex-direction: column;
380408
}
381409
410+
.c1 .carousel .richtext-carousel .carousel__slide .carousel__inner-slide .slide-copy-wrapper {
411+
font-size: 0.9rem;
412+
}
413+
414+
.c1 .carousel .richtext-carousel .carousel__slide .carousel__inner-slide .slide-copy-wrapper * {
415+
font-size: inherit;
416+
}
417+
382418
.c0 {
383419
background-color: #86E4E9;
384420
padding: 4rem 0 4rem;

0 commit comments

Comments
 (0)