Skip to content

Commit 74ed583

Browse files
committed
fix: minor CSS fixes per PR feedback
1 parent 7d997f9 commit 74ed583

File tree

4 files changed

+35
-42
lines changed

4 files changed

+35
-42
lines changed
Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,6 @@
1-
import { polyfillLoader } from '@bolt/core-v3.x/polyfills';
2-
3-
polyfillLoader.then(res => {
4-
import(
5-
/* webpackMode: 'eager', webpackChunkName: 'bolt-card-replacement' */ './src/card-replacement/card-replacement'
6-
);
7-
import(
8-
/* webpackMode: 'eager', webpackChunkName: 'bolt-card-replacement-media' */ './src/card-replacement-media/card-replacement-media'
9-
);
10-
import(
11-
/* webpackMode: 'eager', webpackChunkName: 'bolt-card-replacement-body' */ './src/card-replacement-body/card-replacement-body'
12-
);
13-
import(
14-
/* webpackMode: 'eager', webpackChunkName: 'bolt-card-replacement-link' */ './src/card-replacement-link/card-replacement-link'
15-
);
16-
import(
17-
/* webpackMode: 'eager', webpackChunkName: 'bolt-card-replacement-actions' */ './src/card-replacement-actions/card-replacement-actions'
18-
);
19-
import(
20-
/* webpackMode: 'eager', webpackChunkName: 'bolt-card-replacement-action' */ './src/card-replacement-actions/card-replacement-action'
21-
);
22-
});
1+
import './src/card-replacement/card-replacement';
2+
import './src/card-replacement-media/card-replacement-media';
3+
import './src/card-replacement-body/card-replacement-body';
4+
import './src/card-replacement-link/card-replacement-link';
5+
import './src/card-replacement-actions/card-replacement-actions';
6+
import './src/card-replacement-actions/card-replacement-action';

packages/components/bolt-card-replacement/src/card-replacement-actions/_card-replacement-actions.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
bolt-card-replacement-actions {
99
@include bolt-card-replacement-border-reset;
10+
overflow: hidden;
1011
margin-top: auto;
1112
}
1213

packages/components/bolt-card-replacement/src/card-replacement-media/_card-replacement-media.scss

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,22 @@
66
@import '../_card-replacement-settings-and-tools.scss';
77

88
:host {
9-
flex-basis: auto;
10-
flex-grow: 1;
11-
flex-shrink: 1;
12-
overflow: initial;
9+
& [horizontal] {
10+
flex-basis: 25%;
11+
flex-grow: 1;
12+
flex-shrink: 1;
13+
max-width: 300px;
14+
}
1315
}
1416

1517
bolt-card-replacement-media {
16-
flex-basis: auto;
17-
flex-grow: 1;
18-
flex-shrink: 1;
1918
position: relative;
20-
overflow: initial;
19+
overflow: hidden;
2120

2221
[horizontal] & {
2322
flex-basis: 25%;
23+
flex-grow: 1;
24+
flex-shrink: 1;
2425
max-width: 300px;
2526
}
2627
}

packages/components/bolt-card-replacement/src/card-replacement/card-replacement.scss

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
@import '../_card-replacement-settings-and-tools.scss';
77
@import '@bolt/global/styles/06-themes/_themes.all.scss';
88

9-
109
// Custom element
1110
@include bolt-custom-element('bolt-card-replacement', block, medium);
1211

@@ -23,11 +22,15 @@ bolt-card-replacement {
2322
height: 100%;
2423
}
2524

26-
&[rounded]{
25+
&[rounded] {
2726
@include bolt-border-radius(large);
2827
}
29-
}
3028

29+
&[horizontal] > *:first-child {
30+
border-radius: $bolt-card-replacement-border-radius 0 0
31+
$bolt-card-replacement-border-radius;
32+
}
33+
}
3134

3235
// card-replacement container styles
3336
.c-bolt-card-replacement {
@@ -51,16 +54,16 @@ bolt-card-replacement {
5154
(
5255
xdark: background 0.85,
5356
dark: background 0.85,
54-
light: secondary, // [Mai] This is not displaying correctly when JS is on.
55-
xlight: background 0.85,
57+
light: secondary,
58+
// [Mai] This is not displaying correctly when JS is on.
59+
xlight: background 0.85,
5660
)
5761
);
58-
background-image:
59-
linear-gradient(
60-
to bottom,
61-
rgba(bolt-color(white), 0.05),
62-
rgba(bolt-color(white), 0.05)
63-
);
62+
background-image: linear-gradient(
63+
to bottom,
64+
rgba(bolt-color(white), 0.05),
65+
rgba(bolt-color(white), 0.05)
66+
);
6467
}
6568
}
6669

@@ -77,7 +80,11 @@ bolt-card-replacement {
7780
transition: transform $bolt-transition;
7881

7982
&:before {
80-
@include bolt-shadow('level-30', false, $bolt-card-replacement-shadow-color);
83+
@include bolt-shadow(
84+
'level-30',
85+
false,
86+
$bolt-card-replacement-shadow-color
87+
);
8188
content: '';
8289
opacity: 0;
8390
position: absolute;

0 commit comments

Comments
 (0)