Skip to content

Commit

Permalink
make default background darker, remove obsolete replacements
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind committed Jul 11, 2020
1 parent 61a9b30 commit 57b619f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
2 changes: 1 addition & 1 deletion github-dark.user.css
Original file line number Diff line number Diff line change
Expand Up @@ -20138,7 +20138,7 @@
}
/* end github.com rules */
body, body.bg-gray {
background-color: #202020 !important;
background-color: #141414 !important;
background-image: var(--bg-img) !important;
background-clip: border-box !important;
background-origin: padding-box !important;
Expand Down
2 changes: 1 addition & 1 deletion src/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
/* generated github-mobile rules */
/* generated github.com rules */
body, body.bg-gray {
background-color: #202020 !important;
background-color: #141414 !important;
background-image: var(--bg-img) !important;
background-clip: border-box !important;
background-origin: padding-box !important;
Expand Down
15 changes: 0 additions & 15 deletions tools/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ const sourceFiles = glob("src/*.css").sort((a, b) => {
if (b.endsWith("base.css")) return 1;
});

const replacements = [
{from: /\/\*\[\[base-color\]\]\*\/ #\w{3,6}/g, to: "/*[[base-color]]*/"},
{from: /\/\*\[\[tab-size\]\]\*\/ \d+/g, to: "/*[[tab-size]]*/"},
{from: /\/\*\[\[bg-choice\]\]\*\/ url\(.*\)/, to: "/*[[bg-choice]]*/"},
{from: "/*[[bg-attachment]]*/ fixed", to: "/*[[bg-attachment]]*/"},
];

const defaults = {
theme: "twilight",
themeCM: "twilight",
Expand All @@ -51,13 +44,6 @@ const defaults = {
tabSizes: [2, 3, 4, 5, 6, 7, 8]
};

function replaceForUsercss(css) {
for (const replacement of replacements) {
css = css.replace(replacement.from, replacement.to);
}
return css;
}

async function processGroup(css, name) {
const themes = await getThemesInFolder(name.toLowerCase());

Expand Down Expand Up @@ -131,7 +117,6 @@ async function main() {
for (const sourceFile of sourceFiles) {
let sourceCss = await readFile(sourceFile, "utf8");
if (sourceFile.endsWith("main.css")) {
sourceCss = replaceForUsercss(sourceCss);
sourceCss = replaceVars(`${themes}${sourceCss}`);
}

Expand Down

0 comments on commit 57b619f

Please sign in to comment.