Skip to content

Commit

Permalink
Fix: Activity Stream - Use pseudo-element for background image #773
Browse files Browse the repository at this point in the history
  • Loading branch information
ricewind012 committed Sep 22, 2023
1 parent 3eabf0a commit 6d703b3
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 14 deletions.
4 changes: 4 additions & 0 deletions css/leptonChrome.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions css/leptonChromeESR.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions css/leptonContent.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions css/leptonContentESR.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions src/contents/_activity_stream.scss
Original file line number Diff line number Diff line change
Expand Up @@ -218,20 +218,22 @@
}
}

/** Activity Stream - Hide Firefox's logo ***********************************/
/** Activity Stream - Custom background image *******************************/
@include Option("userContent.newTab.background_image") {
body {
body::before {
content: '';
position: absolute;
inset: 0;

// https://best-wallpaper.net/Forest-trees-sunset-art-picture_wallpapers.html
background-image: var(--uc-newTab-wallpaper, url("../icons/horizon-sunrise.svg"));
background-size: cover; /* or auto auto */
background-repeat: no-repeat;
background-position: right top;
background-attachment: fixed;
}

/** Use night sky version in dark mode ************************************/
@include Dark {
body {
/** Use night sky version in dark mode **********************************/
@include Dark {
background-image: var(--uc-newTab-wallpaper, url("../icons/horizon-night.svg"));
}
}
Expand Down

1 comment on commit 6d703b3

@thunderstone135
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done👍

Please sign in to comment.