Skip to content

Commit 54dd036

Browse files
committed
[feature] add more theme accent presets
1 parent 02ecd77 commit 54dd036

File tree

7 files changed

+669
-140
lines changed

7 files changed

+669
-140
lines changed

‎package-lock.json‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎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": "5.29.0",
3+
"version": "5.30.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/theme.css‎

Lines changed: 52 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -337,11 +337,11 @@
337337
background-color:rgb(var(--theme-color-20));
338338
}
339339

340-
.theme-accent-preset-grid{
340+
.theme-accent-preset{
341341
display: grid;
342-
grid-gap:var(--form-wrap-space);
343-
grid-template-columns:repeat(7,1fr);
344-
grid-template-rows:repeat(5,1fr);
342+
grid-gap:calc(var(--form-wrap-space) /2);
343+
grid-template-rows:repeat(7,auto);
344+
grid-auto-flow: column;
345345
justify-items: center;
346346
}
347347

@@ -350,8 +350,20 @@
350350
padding:0;
351351
width:1.5em;
352352
height:1.5em;
353-
min-width:1.5em;
354-
min-height:1.5em;
353+
min-width: initial;
354+
min-height: initial;
355+
}
356+
357+
.theme-accent-preset-type-grey{
358+
display: block;
359+
}
360+
361+
.theme-accent-preset-type-primary{
362+
display: block;
363+
}
364+
365+
.theme-accent-preset-type-secondary{
366+
display: none;
355367
}
356368

357369
.theme-accent-preset-item:focus,
@@ -360,20 +372,46 @@
360372
background-color:hsl(var(--theme-accent-preset-item-color-h),calc(var(--theme-accent-preset-item-color-s) *1%),calc(var(--theme-accent-preset-item-color-l) *1%));
361373
}
362374

375+
@media (min-width:550px){
376+
.theme-accent-preset-item{
377+
width:1.25em;
378+
height:1.25em;
379+
}
380+
381+
.theme-accent-preset-type-secondary{
382+
display: block;
383+
}
384+
}
385+
363386
@media (min-width:700px){
364387
.theme-accent-preset-item{
365-
width:2em;
366-
height:2em;
367-
min-width:2em;
368-
min-height:2em;
388+
width:1.5em;
389+
height:1.5em;
390+
}
391+
392+
.theme-accent-preset-type-secondary{
393+
display: none;
369394
}
370395
}
371396

372397
@media (min-width:900px){
373398
.theme-accent-preset-item{
374-
width:2.5em;
375-
height:2.5em;
376-
min-width:2.5em;
377-
min-height:2.5em;
399+
width:1.25em;
400+
height:1.25em;
401+
}
402+
403+
.theme-accent-preset-type-secondary{
404+
display: block;
405+
}
406+
}
407+
408+
@media (min-width:1100px){
409+
.theme-accent-preset-item{
410+
width:1.5em;
411+
height:1.5em;
412+
}
413+
414+
.theme-accent-preset-type-secondary{
415+
display: block;
378416
}
379417
}

‎src/html/menu/content/theme.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@@include("./theme/saved.html")
66

77
@@include("./theme/fonts.html")
8-
8+
99
@@include("./theme/style.html")
1010

1111
@@include("./theme/color.html")

0 commit comments

Comments
(0)