Skip to content

Commit 06e1404

Browse files
authored
add blur box for hero content (#59045)
1 parent b5c370a commit 06e1404

File tree

1 file changed

+20
-36
lines changed

1 file changed

+20
-36
lines changed

src/landings/components/shared/LandingHero.module.scss

Lines changed: 20 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -136,30 +136,23 @@
136136
background-color: var(--bgColor-muted, var(--color-canvas-subtle, #f6f8fa));
137137
position: relative;
138138

139-
background-position: unset;
140-
141-
&::before {
142-
content: "";
143-
position: absolute;
144-
top: 0;
145-
left: 0;
146-
right: 0;
147-
bottom: 0;
148-
background-image: inherit;
149-
background-size: contain;
150-
background-position: bottom;
151-
background-repeat: no-repeat;
152-
opacity: 0.5;
153-
z-index: 0;
154-
}
139+
background-position: center right;
155140
}
156141

157142
.heroContent {
158143
width: 100%;
159144
order: 2;
160-
padding: 0 1rem;
145+
padding: 1rem;
161146
position: relative;
162147
z-index: 1;
148+
backdrop-filter: blur(1rem);
149+
background-color: color-mix(
150+
in srgb,
151+
var(--color-canvas-subtle) 70%,
152+
transparent
153+
);
154+
border-radius: 12px;
155+
margin: 0 1rem;
163156
}
164157

165158
.heroHeading {
@@ -172,8 +165,6 @@
172165

173166
.heroActions {
174167
flex-direction: column;
175-
align-self: baseline;
176-
margin-left: 5rem;
177168
justify-content: center;
178169
align-items: center;
179170
}
@@ -201,28 +192,23 @@
201192
justify-content: center;
202193
position: relative;
203194

204-
&::before {
205-
content: "";
206-
position: absolute;
207-
top: 0;
208-
left: 0;
209-
right: 0;
210-
bottom: 0;
211-
background-image: inherit;
212-
background-size: contain;
213-
background-position: bottom;
214-
background-repeat: no-repeat;
215-
opacity: 0.8;
216-
z-index: 0;
217-
}
195+
background-position: center right;
218196
}
219197

220198
.heroContent {
221199
width: 100%;
222200
order: 2;
223-
padding: 0 1rem;
201+
padding: 1rem;
224202
position: relative;
225203
z-index: 1;
204+
backdrop-filter: blur(1rem);
205+
background-color: color-mix(
206+
in srgb,
207+
var(--color-canvas-subtle) 70%,
208+
transparent
209+
);
210+
border-radius: 12px;
211+
margin: 0 0.5rem;
226212
}
227213

228214
.heroText {
@@ -239,8 +225,6 @@
239225

240226
.heroActions {
241227
flex-direction: column;
242-
align-self: baseline;
243-
margin-left: 2rem;
244228
justify-content: center;
245229
align-items: center;
246230
}

0 commit comments

Comments
 (0)