mirror of
https://github.com/zombieFox/nightTab.git
synced 2024-12-27 00:59:00 +01:00
[refactor] improve overscroll background colour
This commit is contained in:
parent
bf58d25c45
commit
ca93924ff0
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nighttab",
|
"name": "nighttab",
|
||||||
"version": "3.76.0",
|
"version": "3.77.0",
|
||||||
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
|
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -21,10 +21,12 @@ body {
|
|||||||
/* transition: background-color var(--layout-timing-extra-fast); */
|
/* transition: background-color var(--layout-timing-extra-fast); */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html.is-background-color-by-theme,
|
||||||
.is-background-color-by-theme body {
|
.is-background-color-by-theme body {
|
||||||
background-color: rgb(var(--background-color-theme));
|
background-color: rgb(var(--background-color-theme));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html.is-background-color-by-custom,
|
||||||
.is-background-color-by-custom body {
|
.is-background-color-by-custom body {
|
||||||
background-color: rgb(var(--background-color-custom));
|
background-color: rgb(var(--background-color-custom));
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
--link-item-display-icon-size: 2.5em;
|
--link-item-display-icon-size: 2.5em;
|
||||||
--link-item-name-size: 0.9em;
|
--link-item-name-size: 0.9em;
|
||||||
/* layout */
|
/* layout */
|
||||||
--layout-line-width: 0.2em;
|
--layout-line-width: 0.2rem;
|
||||||
--layout-gutter: 0.5rem;
|
--layout-gutter: 0.5rem;
|
||||||
--layout-width: 80%;
|
--layout-width: 80%;
|
||||||
--layout-padding-multiplier: 4;
|
--layout-padding-multiplier: 4;
|
||||||
|
@ -69,10 +69,13 @@ var background = (function() {
|
|||||||
|
|
||||||
var render = {};
|
var render = {};
|
||||||
|
|
||||||
render.color = function() {
|
render.color = {
|
||||||
var html = helper.e("html");
|
custom: function() {
|
||||||
html.style.backgroundColor = "rgb(" + state.get().background.color.custom.r + ", " + state.get().background.color.custom.g + ", " + state.get().background.color.custom.b + ")";
|
helper.e("html").style.setProperty("--background-color-custom", state.get().background.color.custom.r + ", " + state.get().background.color.custom.g + ", " + state.get().background.color.custom.b);
|
||||||
html.style.setProperty("--background-color-custom", state.get().background.color.custom.r + ", " + state.get().background.color.custom.g + ", " + state.get().background.color.custom.b);
|
},
|
||||||
|
clearHTML: function() {
|
||||||
|
helper.e("html").style.backgroundColor = "";
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
render.image = function() {
|
render.image = function() {
|
||||||
@ -220,7 +223,8 @@ var background = (function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var init = function() {
|
var init = function() {
|
||||||
render.color();
|
render.color.clearHTML();
|
||||||
|
render.color.custom();
|
||||||
render.image();
|
render.image();
|
||||||
render.blur();
|
render.blur();
|
||||||
render.grayscale();
|
render.grayscale();
|
||||||
|
@ -2141,7 +2141,7 @@ var control = (function() {
|
|||||||
path: "background.color.custom",
|
path: "background.color.custom",
|
||||||
type: "color",
|
type: "color",
|
||||||
func: function() {
|
func: function() {
|
||||||
background.render.color();
|
background.render.color.custom();
|
||||||
background.render.input.hex();
|
background.render.input.hex();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
@ -2150,7 +2150,7 @@ var control = (function() {
|
|||||||
type: "text",
|
type: "text",
|
||||||
valueMod: ["hexTextString"],
|
valueMod: ["hexTextString"],
|
||||||
func: function() {
|
func: function() {
|
||||||
background.render.color();
|
background.render.color.custom();
|
||||||
background.render.input.picker();
|
background.render.input.picker();
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
var version = (function() {
|
var version = (function() {
|
||||||
|
|
||||||
var current = "3.76.0";
|
var current = "3.77.0";
|
||||||
|
|
||||||
var compare = function(a, b) {
|
var compare = function(a, b) {
|
||||||
var pa = a.split(".");
|
var pa = a.split(".");
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name": "nightTab",
|
"name": "nightTab",
|
||||||
"short_name": "nightTab",
|
"short_name": "nightTab",
|
||||||
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
|
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
|
||||||
"version": "3.76.0",
|
"version": "3.77.0",
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"chrome_url_overrides": {
|
"chrome_url_overrides": {
|
||||||
"newtab": "index.html"
|
"newtab": "index.html"
|
||||||
|
Loading…
Reference in New Issue
Block a user