Skip to content

Commit 3c85784

Browse files
authored
Upgrade to terminal v0.7.5 (#150)
* minor bump * upgrade to v0.7.5 * https://unpkg.com/[email protected]/dist/terminal.css * https://github.com/Gioni06/terminal.css/releases/tag/v0.7.5 * remove patch as blockquote has been fixed in v0.7.5 * table styling change: * after the header row, the leftmost column will use regular font weight and regular font color instead of strong font weight and secondary font color * code block font color css change: - added new var ` --code-font-color` to the root CSS configuration and sets the default value to `--font-color` - this is an override to terminal.css v0.7.5 and maintains current Terminal for MkDocs behavior
1 parent b2ffe5b commit 3c85784

File tree

9 files changed

+118
-42
lines changed

9 files changed

+118
-42
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mkdocs-terminal",
3-
"version": "4.5.1",
3+
"version": "4.6.0",
44
"description": "Terminal.css theme for MkDocs",
55
"keywords": [
66
"mkdocs",
@@ -19,7 +19,7 @@
1919
},
2020
"scripts": {},
2121
"dependencies": {
22-
"terminal.css": "^0.7.4"
22+
"terminal.css": "^0.7.5"
2323
},
2424
"devDependencies": {},
2525
"engines": {

terminal/css/palettes/dark.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! dark.css 0.7.4 | MIT License | github.com/Gioni06/terminal.css */
1+
/*! dark.css 0.7.5 | MIT License | github.com/Gioni06/terminal.css */
22

33
:root {
44
--global-font-size: 15px;

terminal/css/palettes/default.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! terminal.css 0.7.4 | MIT License | github.com/Gioni06/terminal.css */
1+
/*! terminal.css 0.7.5 | MIT License | github.com/Gioni06/terminal.css */
22

33

44
/* this document is intentionally left empty. for root configuration, see terminal/css/terminal.css */

terminal/css/palettes/sans.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! sans.css 0.7.4 | MIT License | github.com/Gioni06/terminal.css */
1+
/*! sans.css 0.7.5 | MIT License | github.com/Gioni06/terminal.css */
22

33
:root {
44
--global-font-size: 15px;

terminal/css/palettes/sans_dark.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! sans_dark.css 0.7.4 | MIT License | github.com/Gioni06/terminal.css */
1+
/*! sans_dark.css 0.7.5 | MIT License | github.com/Gioni06/terminal.css */
22

33
:root {
44
--global-font-size: 15px;

terminal/css/terminal.css

Lines changed: 99 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! terminal.css 0.7.4 | MIT License | github.com/Gioni06/terminal.css */
1+
/*! terminal.css 0.7.5 | MIT License | github.com/Gioni06/terminal.css */
22

33
:root {
44
--global-font-size: 15px;
@@ -16,6 +16,7 @@
1616
--progress-bar-background: #727578;
1717
--progress-bar-fill: #151515;
1818
--code-bg-color: #e8eff2;
19+
--code-font-color: var(--font-color);
1920
--input-style: solid;
2021
--display-h1-decoration: none;
2122
--block-background-color: var(--background-color);
@@ -110,8 +111,6 @@ ul,
110111
h1,
111112
.logo {
112113
position: relative;
113-
display: inline-block;
114-
display: table-cell;
115114
padding: calc(var(--global-space) * 2) 0 calc(var(--global-space) * 2);
116115
margin: 0;
117116
overflow: hidden;
@@ -144,7 +143,6 @@ h6 {
144143
blockquote {
145144
position: relative;
146145
padding-left: calc(var(--global-space) * 2);
147-
padding-left: 2ch;
148146
overflow: hidden;
149147
}
150148

@@ -158,6 +156,10 @@ blockquote::after {
158156
color: #9ca2ab;
159157
}
160158

159+
blockquote>*:last-child {
160+
margin-bottom: 0;
161+
}
162+
161163
code {
162164
font-weight: inherit;
163165
background-color: var(--code-bg-color);
@@ -210,13 +212,11 @@ pre code {
210212
font-size: var(--global-font-size);
211213
font-style: normal;
212214
font-family: var(--font-stack);
213-
color: var(--font-color);
214215
}
215216

216217
.terminal code {
217218
font-size: var(--global-font-size);
218219
font-style: normal;
219-
color: var(--font-color);
220220
}
221221

222222
.terminal-prompt {
@@ -411,7 +411,6 @@ hr {
411411

412412
p {
413413
margin: 0 0 var(--global-line-height);
414-
color: var(--font-color);
415414
}
416415

417416
.container {
@@ -425,7 +424,7 @@ p {
425424
}
426425

427426
img {
428-
width: 100%;
427+
max-width: 100%;
429428
}
430429

431430
.progress-bar {
@@ -451,7 +450,7 @@ img {
451450
border: 6px solid transparent;
452451
border-top-color: var(--progress-bar-fill);
453452
position: absolute;
454-
top: -12px;
453+
top: -6px;
455454
right: -6px;
456455
}
457456

@@ -463,7 +462,7 @@ img {
463462
white-space: nowrap;
464463
position: absolute;
465464
border: 6px solid transparent;
466-
top: -38px;
465+
top: -32px;
467466
right: 0;
468467
transform: translateX(50%);
469468
}
@@ -493,8 +492,10 @@ table th {
493492
font-size: 1em;
494493
}
495494

496-
table thead th {
495+
table thead tr th {
497496
font-size: 1em;
497+
vertical-align: middle;
498+
font-weight: 700;
498499
}
499500

500501
table tfoot tr th {
@@ -506,11 +507,6 @@ table caption {
506507
margin: 0 0 1em;
507508
}
508509

509-
table tbody td:first-child {
510-
font-weight: 700;
511-
color: var(--secondary-color);
512-
}
513-
514510
.form {
515511
width: 100%;
516512
}
@@ -529,12 +525,18 @@ input[type="email"],
529525
input[type="text"],
530526
input[type="number"],
531527
input[type="password"],
532-
input[type="search"] {
528+
input[type="search"],
529+
input[type="date"],
530+
input[type="time"] {
533531
border: 1px var(--input-style) var(--font-color);
534532
width: 100%;
535533
padding: 0.7em 0.5em;
536534
font-size: 1em;
537535
font-family: var(--font-stack);
536+
/* stylelint-disable */
537+
-webkit-appearance: none;
538+
-moz-appearance: none;
539+
/* stylelint-enable */
538540
appearance: none;
539541
border-radius: 0;
540542
}
@@ -544,12 +546,20 @@ input[type="text"]:active,
544546
input[type="number"]:active,
545547
input[type="password"]:active,
546548
input[type="search"]:active,
549+
input[type="date"]:active,
550+
input[type="time"]:active,
547551
input[type="email"]:focus,
548552
input[type="text"]:focus,
549553
input[type="number"]:focus,
550554
input[type="password"]:focus,
551-
input[type="search"]:focus {
555+
input[type="search"]:focus,
556+
input[type="date"]:focus,
557+
input[type="time"]:focus {
552558
outline: none;
559+
/* stylelint-disable */
560+
-webkit-appearance: none;
561+
-moz-appearance: none;
562+
/* stylelint-enable */
553563
appearance: none;
554564
border: 1px solid var(--font-color);
555565
}
@@ -558,7 +568,9 @@ input[type="text"]:not(:placeholder-shown):invalid,
558568
input[type="email"]:not(:placeholder-shown):invalid,
559569
input[type="password"]:not(:placeholder-shown):invalid,
560570
input[type="search"]:not(:placeholder-shown):invalid,
561-
input[type="number"]:not(:placeholder-shown):invalid {
571+
input[type="number"]:not(:placeholder-shown):invalid,
572+
input[type="date"]:not(:placeholder-shown):invalid,
573+
input[type="time"]:not(:placeholder-shown):invalid {
562574
border-color: var(--error-color);
563575
}
564576

@@ -588,6 +600,10 @@ textarea {
588600

589601
textarea:focus {
590602
outline: none;
603+
/* stylelint-disable */
604+
-webkit-appearance: none;
605+
-moz-appearance: none;
606+
/* stylelint-enable */
591607
appearance: none;
592608
border: 1px solid var(--font-color);
593609
}
@@ -596,6 +612,24 @@ textarea:not(:placeholder-shown):invalid {
596612
border-color: var(--error-color);
597613
}
598614

615+
select {
616+
border: 1px var(--input-style) var(--font-color);
617+
width: 100%;
618+
padding: .7em .5em;
619+
font-size: 1em;
620+
font-family: var(--font-stack);
621+
color: var(--font-color);
622+
border-radius: 0;
623+
/* stylelint-disable */
624+
-webkit-appearance: none;
625+
-moz-appearance: none;
626+
/* stylelint-enable */
627+
background-color: var(--background-color);
628+
background-image: url("data:image/svg+xml;utf8,<svg fill='currentColor' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
629+
background-repeat: no-repeat;
630+
background-position: right .5em bottom .5em;
631+
}
632+
599633
input:-webkit-autofill,
600634
input:-webkit-autofill:hover,
601635
input:-webkit-autofill:focus textarea:-webkit-autofill,
@@ -807,7 +841,11 @@ select:-webkit-autofill:focus {
807841
border-color: var(--primary-color);
808842
}
809843

810-
@media screen and (width <=960px) {
844+
845+
/* stylelint-disable */
846+
847+
@media screen and (min-width: 960px) {
848+
/* stylelint-enable */
811849
label {
812850
display: block;
813851
width: 100%;
@@ -817,13 +855,21 @@ select:-webkit-autofill:focus {
817855
}
818856
}
819857

820-
@media screen and (width <=480px) {
858+
859+
/* stylelint-disable */
860+
861+
@media screen and (min-width: 480px) {
862+
/* stylelint-enable */
821863
form {
822864
width: 100%;
823865
}
824866
}
825867

826-
@media only screen and (width >=30em) {
868+
869+
/* stylelint-disable */
870+
871+
@media screen and (min-width: 30rem) {
872+
/* stylelint-enable */
827873
.terminal-nav {
828874
flex-direction: row;
829875
align-items: center;
@@ -835,8 +881,7 @@ select:-webkit-autofill:focus {
835881
margin-top: calc(var(--global-space) * 2);
836882
}
837883
.terminal-menu li {
838-
margin: 0;
839-
margin-right: 2em;
884+
margin: 0 2em 0 0;
840885
}
841886
.terminal-menu li:last-child {
842887
margin-right: 0;
@@ -905,6 +950,36 @@ figure>figcaption {
905950
text-align: center;
906951
}
907952

953+
.terminal-banner {
954+
background-color: var(--font-color);
955+
color: var(--invert-font-color);
956+
padding: calc(var(--global-space) * 2);
957+
width: 100%;
958+
display: flex;
959+
flex-direction: column;
960+
gap: 1rem;
961+
}
962+
963+
.terminal-banner>.container {
964+
max-width: var(--page-width);
965+
}
966+
967+
.terminal-banner>.container,
968+
.terminal-banner>.container-fluid {
969+
margin: 0 auto;
970+
padding: 0;
971+
}
972+
973+
974+
/* stylelint-disable */
975+
976+
@media screen and (min-width: 30rem) {
977+
/* stylelint-enable */
978+
.terminal-banner {
979+
flex-direction: row;
980+
}
981+
}
982+
908983
.hljs {
909984
display: block;
910985
overflow-x: auto;

terminal/css/theme.css

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*! Terminal for MkDocs | MIT License | github.com/ntno/mkdocs-terminal */
22

33

4-
/*! terminal.css 0.7.4 | MIT License | github.com/Gioni06/terminal.css */
4+
/*! terminal.css 0.7.5 | MIT License | github.com/Gioni06/terminal.css */
55

66
body {
77
padding-top: 50px;
@@ -48,7 +48,14 @@ a.btn {
4848
justify-content: center;
4949
padding: .65em 2em;
5050
border-color: var(--error-color);
51-
color: var(--error-color);
51+
}
52+
53+
p.terminal-mkdocs-macro-error-banner {
54+
color: var(--font-color);
55+
}
56+
57+
p.terminal-mkdocs-macro-error-banner>code {
58+
color: var(--code-font-color);
5259
}
5360

5461

@@ -77,15 +84,9 @@ code::before {
7784
}
7885

7986

80-
/* use the `code-bg-color` for `code` blocks */
87+
/* use the `code-bg-color` and `code-font-color` for `<code>` blocks */
8188

8289
pre code {
8390
background-color: var(--code-bg-color);
84-
}
85-
86-
87-
/* fix trailing `>` symbol on blockquotes - https://github.com/Gioni06/terminal.css/pull/36 */
88-
89-
blockquote>*:last-child {
90-
margin-bottom: 0;
91+
color: var(--code-font-color);
9192
}

terminal/theme_version.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-terminal-4.5.1">
1+
<meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-terminal-4.6.0">

0 commit comments

Comments
 (0)