Skip to content

Commit 7c39a18

Browse files
committed
[feature] make header shade use custom background colour
1 parent 809afa5 commit 7c39a18

File tree

7 files changed

+14
-9
lines changed

7 files changed

+14
-9
lines changed

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nighttab",
3-
"version": "3.73.0",
3+
"version": "3.74.0",
44
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
55
"main": "index.js",
66
"scripts":{

‎src/css/base.css‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ body{
2222
}
2323

2424
.is-background-color-by-themebody{
25-
background-color:var(--background-color-theme);
25+
background-color:rgb(var(--background-color-theme));
2626
}
2727

2828
.is-background-color-by-custombody{
29-
background-color:var(--background-color-custom);
29+
background-color:rgb(var(--background-color-custom));
3030
}
3131

3232
.is-layout-scrollpastendbody{

‎src/css/header.css‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,16 @@
5252
border-radius:calc(var(--theme-radius) *4);
5353
}
5454

55-
.is-header-shade-style-always .header-shade,
56-
.is-header-shade-style-scroll .header-shade{
55+
.is-background-color-by-theme.is-header-shade-style-always .header-shade,
56+
.is-background-color-by-theme.is-header-shade-style-scroll .header-shade{
5757
background-color:rgba(var(--header-shade-color),var(--header-shade-opacity));
5858
}
5959

60+
.is-background-color-by-custom.is-header-shade-style-always .header-shade,
61+
.is-background-color-by-custom.is-header-shade-style-scroll .header-shade{
62+
background-color:rgba(var(--background-color-custom),var(--header-shade-opacity));
63+
}
64+
6065
.header-area{
6166
padding:calc(var(--layout-gutter) *var(--layout-padding-multiplier));
6267
position: relative;

‎src/css/variables.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
--layout-shadow-medium:02px4pxrgba(0,0,0,0.1),04px8pxrgba(0,0,0,0.2);
6161
--layout-shadow-large:03px6pxrgba(0,0,0,0.1),06px12pxrgba(0,0,0,0.2);
6262
/* background */
63-
--background-color-theme:rgb(var(--theme-gray-01));
63+
--background-color-theme:var(--theme-gray-01);
6464
--background-color-custom:rgb(0,0,0);
6565
--background-image: none;
6666
--background-opacity:1;

‎src/js/background.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ var background = (function(){
7171

7272
render.color=function(){
7373
varhtml=helper.e("html");
74-
html.style.setProperty("--background-color-custom","rgb("+state.get().background.color.custom.r+", "+state.get().background.color.custom.g+", "+state.get().background.color.custom.b+")");
74+
html.style.setProperty("--background-color-custom",state.get().background.color.custom.r+", "+state.get().background.color.custom.g+", "+state.get().background.color.custom.b);
7575
};
7676

7777
render.image=function(){

‎src/js/version.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
varversion=(function(){
33

4-
varcurrent="3.73.0";
4+
varcurrent="3.74.0";
55

66
varcompare=function(a,b){
77
varpa=a.split(".");

‎src/manifest.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "nightTab",
33
"short_name": "nightTab",
44
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
5-
"version": "3.73.0",
5+
"version": "3.74.0",
66
"manifest_version": 2,
77
"chrome_url_overrides":{
88
"newtab": "index.html"

0 commit comments

Comments
(0)