Skip to content

Commit 255f769

Browse files
committed
load only home-bg bg img if body tag has #home in it
1 parent a0d75a1 commit 255f769

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

app/assets/stylesheets/pages/_home.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1-
#home {
1+
// apply this bg image to body tag only if it has #home
2+
body:has(#home) {
3+
// bg img 'background.png' doesn't load defined in body tag
4+
background: none;
25
background-image: linear-gradient(
36
rgba(255, 255, 255, 0.75),
47
rgba(255, 255, 255, 0.75)
58
),
69
url(home-bg.png);
710
background-size: cover;
811
background-position: center;
12+
}
13+
14+
#home {
15+
width: 100%;
16+
height: 100dvh;
917
padding: 2.5rem 8rem;
1018

1119
&__header-logo {

0 commit comments

Comments
 (0)