Skip to content

Commit c9e0d01

Browse files
committed
[feature] add font weight and style controls
1 parent 47f86a9 commit c9e0d01

35 files changed

+691
-273
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": "4.6.3",
3+
"version": "4.7.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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ body{
1212
color:rgb(var(--theme-style-text));
1313
font-size:1rem;
1414
line-height:1.6;
15-
font-family:var(--font-ui);
15+
font-family:var(--theme-font-ui-name);
16+
font-weight:var(--theme-font-ui-weight);
17+
font-style:var(--theme-font-ui-style);
1618
display: flex;
1719
flex-direction: column;
1820
justify-content: center;

‎src/css/button.css‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ input[type="submit"]{
88
margin:001em0;
99
color:rgb(var(--button-text));
1010
font-size:1em;
11-
font-family:var(--font-ui);
11+
font-family:var(--theme-font-ui-name);
12+
font-weight:var(--theme-font-ui-weight);
13+
font-style:var(--theme-font-ui-style);
1214
min-height:2.5em;
1315
line-height:1;
1416
border:0;

‎src/css/clock.css‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
margin:0;
33
padding:0;
44
font-size:1em;
5-
font-family:var(--font-display);
5+
font-family:var(--theme-font-display-name);
6+
font-weight:var(--theme-font-display-weight);
7+
font-style:var(--theme-font-display-style);
68
color:rgb(var(--theme-style-text));
79
width:100%;
810
min-height:2.5em;

‎src/css/date.css‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
margin:0;
33
padding:0;
44
font-size:1em;
5-
font-family:var(--font-display);
5+
font-family:var(--theme-font-display-name);
6+
font-weight:var(--theme-font-display-weight);
7+
font-style:var(--theme-font-display-style);
68
color:rgb(var(--theme-style-text));
79
width:100%;
810
min-height:2.5em;

‎src/css/fonts.css‎

Lines changed: 30 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,66 @@
11
/* open sans */
22
@font-face{
3-
font-family:"Open Sans Bold";
4-
src:url("../fonts/open-sans/open-sans-bold.eot");
5-
src:url("../fonts/open-sans/open-sans-bold.eot?#iefix") format("embedded-opentype"),url("../fonts/open-sans/open-sans-bold.woff2") format("woff2"),url("../fonts/open-sans/open-sans-bold.woff") format("woff"),url("../fonts/open-sans/open-sans-bold.ttf") format("truetype");
6-
font-weight: normal;
7-
font-style: normal;
8-
}
9-
10-
@font-face{
11-
font-family:"Open Sans Regular";
12-
src:url("../fonts/open-sans/open-sans-regular.eot");
13-
src:url("../fonts/open-sans/open-sans-regular.eot?#iefix") format("embedded-opentype"),url("../fonts/open-sans/open-sans-regular.woff2") format("woff2"),url("../fonts/open-sans/open-sans-regular.woff") format("woff"),url("../fonts/open-sans/open-sans-regular.ttf") format("truetype");
14-
font-weight: normal;
15-
font-style: normal;
16-
}
17-
18-
@font-face{
19-
font-family:"Open Sans Light";
3+
font-family:"Open Sans";
204
src:url("../fonts/open-sans/open-sans-light.eot");
215
src:url("../fonts/open-sans/open-sans-light.eot?#iefix") format("embedded-opentype"),url("../fonts/open-sans/open-sans-light.woff2") format("woff2"),url("../fonts/open-sans/open-sans-light.woff") format("woff"),url("../fonts/open-sans/open-sans-light.ttf") format("truetype");
22-
font-weight:normal;
6+
font-weight:300;
237
font-style: normal;
248
}
259

2610
@font-face{
27-
font-family:"Open Sans Bold Italic";
28-
src:url("../fonts/open-sans/open-sans-bold-italic.eot");
29-
src:url("../fonts/open-sans/open-sans-bold-italic.eot?#iefix") format("embedded-opentype"),url("../fonts/open-sans/open-sans-bold-italic.woff2") format("woff2"),url("../fonts/open-sans/open-sans-bold-italic.woff") format("woff"),url("../fonts/open-sans/open-sans-bold-italic.ttf") format("truetype");
30-
font-weight:normal;
31-
font-style:normal;
11+
font-family:"Open Sans";
12+
src:url("../fonts/open-sans/open-sans-light-italic.eot");
13+
src:url("../fonts/open-sans/open-sans-light-italic.eot?#iefix") format("embedded-opentype"),url("../fonts/open-sans/open-sans-light-italic.woff2") format("woff2"),url("../fonts/open-sans/open-sans-light-italic.woff") format("woff"),url("../fonts/open-sans/open-sans-light-italic.ttf") format("truetype");
14+
font-weight:300;
15+
font-style:italic;
3216
}
3317

3418
@font-face{
35-
font-family:"Open Sans Italic";
36-
src:url("../fonts/open-sans/open-sans-italic.eot");
37-
src:url("../fonts/open-sans/open-sans-italic.eot?#iefix") format("embedded-opentype"),url("../fonts/open-sans/open-sans-italic.woff2") format("woff2"),url("../fonts/open-sans/open-sans-italic.woff") format("woff"),url("../fonts/open-sans/open-sans-italic.ttf") format("truetype");
38-
font-weight:normal;
19+
font-family:"Open Sans";
20+
src:url("../fonts/open-sans/open-sans-regular.eot");
21+
src:url("../fonts/open-sans/open-sans-regular.eot?#iefix") format("embedded-opentype"),url("../fonts/open-sans/open-sans-regular.woff2") format("woff2"),url("../fonts/open-sans/open-sans-regular.woff") format("woff"),url("../fonts/open-sans/open-sans-regular.ttf") format("truetype");
22+
font-weight:400;
3923
font-style: normal;
4024
}
4125

4226
@font-face{
43-
font-family:"Open Sans Light Italic";
44-
src:url("../fonts/open-sans/open-sans-light-italic.eot");
45-
src:url("../fonts/open-sans/open-sans-light-italic.eot?#iefix") format("embedded-opentype"),url("../fonts/open-sans/open-sans-light-italic.woff2") format("woff2"),url("../fonts/open-sans/open-sans-light-italic.woff") format("woff"),url("../fonts/open-sans/open-sans-light-italic.ttf") format("truetype");
46-
font-weight:normal;
47-
font-style:normal;
27+
font-family:"Open Sans";
28+
src:url("../fonts/open-sans/open-sans-italic.eot");
29+
src:url("../fonts/open-sans/open-sans-italic.eot?#iefix") format("embedded-opentype"),url("../fonts/open-sans/open-sans-italic.woff2") format("woff2"),url("../fonts/open-sans/open-sans-italic.woff") format("woff"),url("../fonts/open-sans/open-sans-italic.ttf") format("truetype");
30+
font-weight:400;
31+
font-style:italic;
4832
}
4933

5034
@font-face{
51-
font-family:"Open Sans Semi Bold Italic";
35+
font-family:"Open Sans";
5236
src:url("../fonts/open-sans/open-sans-semi-bold-italic.eot");
5337
src:url("../fonts/open-sans/open-sans-semi-bold-italic.eot?#iefix") format("embedded-opentype"),url("../fonts/open-sans/open-sans-semi-bold-italic.woff2") format("woff2"),url("../fonts/open-sans/open-sans-semi-bold-italic.woff") format("woff"),url("../fonts/open-sans/open-sans-semi-bold-italic.ttf") format("truetype");
54-
font-weight:normal;
55-
font-style:normal;
38+
font-weight:600;
39+
font-style:italic;
5640
}
5741

5842
@font-face{
59-
font-family:"Open Sans Semi Bold";
43+
font-family:"Open Sans";
6044
src:url("../fonts/open-sans/open-sans-semi-bold.eot");
6145
src:url("../fonts/open-sans/open-sans-semi-bold.eot?#iefix") format("embedded-opentype"),url("../fonts/open-sans/open-sans-semi-bold.woff2") format("woff2"),url("../fonts/open-sans/open-sans-semi-bold.woff") format("woff"),url("../fonts/open-sans/open-sans-semi-bold.ttf") format("truetype");
62-
font-weight:normal;
46+
font-weight:600;
6347
font-style: normal;
6448
}
6549

6650
@font-face{
67-
font-family:"Open Sans Condensed Bold";
68-
src:url("../fonts/open-sans/open-sans-condensed-bold.eot");
69-
src:url("../fonts/open-sans/open-sans-condensed-bold.eot?#iefix") format("embedded-opentype"),url("../fonts/open-sans/open-sans-condensed-bold.woff2") format("woff2"),url("../fonts/open-sans/open-sans-condensed-bold.woff") format("woff"),url("../fonts/open-sans/open-sans-condensed-bold.ttf") format("truetype");
70-
font-weight: normal;
71-
font-style: normal;
72-
}
73-
74-
@font-face{
75-
font-family:"Open Sans Condensed Light Italic";
76-
src:url("../fonts/open-sans/open-sans-condensed-light-italic.eot");
77-
src:url("../fonts/open-sans/open-sans-condensed-light-italic.eot?#iefix") format("embedded-opentype"),url("../fonts/open-sans/open-sans-condensed-light-italic.woff2") format("woff2"),url("../fonts/open-sans/open-sans-condensed-light-italic.woff") format("woff"),url("../fonts/open-sans/open-sans-condensed-light-italic.ttf") format("truetype");
78-
font-weight: normal;
51+
font-family:"Open Sans";
52+
src:url("../fonts/open-sans/open-sans-bold.eot");
53+
src:url("../fonts/open-sans/open-sans-bold.eot?#iefix") format("embedded-opentype"),url("../fonts/open-sans/open-sans-bold.woff2") format("woff2"),url("../fonts/open-sans/open-sans-bold.woff") format("woff"),url("../fonts/open-sans/open-sans-bold.ttf") format("truetype");
54+
font-weight:700;
7955
font-style: normal;
8056
}
8157

8258
@font-face{
83-
font-family:"Open Sans Condensed Light";
84-
src:url("../fonts/open-sans/open-sans-condensed-light.eot");
85-
src:url("../fonts/open-sans/open-sans-condensed-light.eot?#iefix") format("embedded-opentype"),url("../fonts/open-sans/open-sans-condensed-light.woff2") format("woff2"),url("../fonts/open-sans/open-sans-condensed-light.woff") format("woff"),url("../fonts/open-sans/open-sans-condensed-light.ttf") format("truetype");
86-
font-weight:normal;
87-
font-style:normal;
59+
font-family:"Open Sans";
60+
src:url("../fonts/open-sans/open-sans-bold-italic.eot");
61+
src:url("../fonts/open-sans/open-sans-bold-italic.eot?#iefix") format("embedded-opentype"),url("../fonts/open-sans/open-sans-bold-italic.woff2") format("woff2"),url("../fonts/open-sans/open-sans-bold-italic.woff") format("woff"),url("../fonts/open-sans/open-sans-bold-italic.ttf") format("truetype");
62+
font-weight:700;
63+
font-style:italic;
8864
}
8965

9066
/* fjalla one */

‎src/css/form.css‎

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ select{
3232
margin:001em0;
3333
color:rgb(var(--form-label));
3434
font-size:1em;
35-
font-family:var(--font-ui);
35+
font-family:var(--theme-font-ui-name);
36+
font-weight:var(--theme-font-ui-weight);
37+
font-style:var(--theme-font-ui-style);
3638
line-height:2;
3739
min-height:2.5em;
3840
min-width:0;
@@ -94,7 +96,9 @@ textarea{
9496
color:rgb(var(--form-input-text));
9597
font-size:1em;
9698
line-height:1.6;
97-
font-family:var(--font-ui);
99+
font-family:var(--theme-font-ui-name);
100+
font-weight:var(--theme-font-ui-weight);
101+
font-style:var(--theme-font-ui-style);
98102
height:10em;
99103
min-height:2.5em;
100104
min-width:0;
@@ -172,7 +176,9 @@ input[type="text"]{
172176
margin:001em0;
173177
color:rgb(var(--form-input-text));
174178
font-size:1em;
175-
font-family:var(--font-ui);
179+
font-family:var(--theme-font-ui-name);
180+
font-weight:var(--theme-font-ui-weight);
181+
font-style:var(--theme-font-ui-style);
176182
line-height:1.6em;
177183
height:2.5em;
178184
min-width:0;
@@ -329,7 +335,9 @@ input[type="radio"]+label{
329335
padding:0;
330336
margin:0;
331337
font-size:1em;
332-
font-family:var(--font-ui);
338+
font-family:var(--theme-font-ui-name);
339+
font-weight:var(--theme-font-ui-weight);
340+
font-style:var(--theme-font-ui-style);
333341
cursor: pointer;
334342
display: flex;
335343
flex-direction: row;
@@ -600,7 +608,9 @@ input[type="range"]{
600608
margin:0;
601609
color:rgb(var(--theme-style-text));
602610
font-size:1em;
603-
font-family:var(--font-ui);
611+
font-family:var(--theme-font-ui-name);
612+
font-weight:var(--theme-font-ui-weight);
613+
font-style:var(--theme-font-ui-style);
604614
display: block;
605615
height:2.5em;
606616
width:100%;
@@ -857,7 +867,9 @@ input[type="range"]:disabled::-moz-range-progress{
857867
margin:0;
858868
color:rgb(var(--button-text));
859869
font-size:1em;
860-
font-family:var(--font-ui);
870+
font-family:var(--theme-font-ui-name);
871+
font-weight:var(--theme-font-ui-weight);
872+
font-style:var(--theme-font-ui-style);
861873
min-height:2.5em;
862874
line-height:1;
863875
border:0;
@@ -1454,7 +1466,9 @@ input[type="range"]:disabled::-moz-range-progress{
14541466
color:rgb(var(--form-input-text));
14551467
min-width:4em;
14561468
font-size:1em;
1457-
font-family:var(--font-ui);
1469+
font-family:var(--theme-font-ui-name);
1470+
font-weight:var(--theme-font-ui-weight);
1471+
font-style:var(--theme-font-ui-style);
14581472
display: flex;
14591473
align-items: center;
14601474
justify-content: center;

‎src/css/greeting.css‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
margin:0;
33
padding:0;
44
font-size:1em;
5-
font-family:var(--font-display);
5+
font-family:var(--theme-font-display-name);
6+
font-weight:var(--theme-font-display-weight);
7+
font-style:var(--theme-font-display-style);
68
color:rgb(var(--theme-style-text));
79
width:100%;
810
min-height:2.5em;

‎src/css/group.css‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
display: flex;
7070
align-items: center;
7171
height:0;
72+
max-width:100%;
7273
overflow: hidden;
7374
font-size:var(--group-name-size);
7475
transition: height var(--layout-timing-extra-fast);
@@ -82,6 +83,7 @@
8283

8384
.group-name-text{
8485
margin-bottom:0;
86+
padding-right:1em;
8587
overflow: hidden;
8688
text-overflow: ellipsis;
8789
white-space: nowrap;

0 commit comments

Comments
(0)