Skip to content

Commit

Permalink
load only home-bg bg img if body tag has #home in it
Browse files Browse the repository at this point in the history
  • Loading branch information
JuzerShakir committed Jan 3, 2024
1 parent a0d75a1 commit 255f769
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app/assets/stylesheets/pages/_home.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
#home {
// apply this bg image to body tag only if it has #home
body:has(#home) {
// bg img 'background.png' doesn't load defined in body tag
background: none;
background-image: linear-gradient(
rgba(255, 255, 255, 0.75),
rgba(255, 255, 255, 0.75)
),
url(home-bg.png);
background-size: cover;
background-position: center;
}

#home {
width: 100%;
height: 100dvh;
padding: 2.5rem 8rem;

&__header-logo {
Expand Down

0 comments on commit 255f769

Please sign in to comment.