Skip to content

Commit

Permalink
Upgrade to terminal v0.7.5 (#150)
Browse files Browse the repository at this point in the history
* minor bump
* upgrade to v0.7.5 
  * https://unpkg.com/terminal.css@0.7.5/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
  • Loading branch information
ntno authored Aug 20, 2024
1 parent b2ffe5b commit 3c85784
Show file tree
Hide file tree
Showing 9 changed files with 118 additions and 42 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mkdocs-terminal",
"version": "4.5.1",
"version": "4.6.0",
"description": "Terminal.css theme for MkDocs",
"keywords": [
"mkdocs",
Expand All @@ -19,7 +19,7 @@
},
"scripts": {},
"dependencies": {
"terminal.css": "^0.7.4"
"terminal.css": "^0.7.5"
},
"devDependencies": {},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion terminal/css/palettes/dark.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! dark.css 0.7.4 | MIT License | github.com/Gioni06/terminal.css */
/*! dark.css 0.7.5 | MIT License | github.com/Gioni06/terminal.css */

:root {
--global-font-size: 15px;
Expand Down
2 changes: 1 addition & 1 deletion terminal/css/palettes/default.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! terminal.css 0.7.4 | MIT License | github.com/Gioni06/terminal.css */
/*! terminal.css 0.7.5 | MIT License | github.com/Gioni06/terminal.css */


/* this document is intentionally left empty. for root configuration, see terminal/css/terminal.css */
2 changes: 1 addition & 1 deletion terminal/css/palettes/sans.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! sans.css 0.7.4 | MIT License | github.com/Gioni06/terminal.css */
/*! sans.css 0.7.5 | MIT License | github.com/Gioni06/terminal.css */

:root {
--global-font-size: 15px;
Expand Down
2 changes: 1 addition & 1 deletion terminal/css/palettes/sans_dark.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! sans_dark.css 0.7.4 | MIT License | github.com/Gioni06/terminal.css */
/*! sans_dark.css 0.7.5 | MIT License | github.com/Gioni06/terminal.css */

:root {
--global-font-size: 15px;
Expand Down
123 changes: 99 additions & 24 deletions terminal/css/terminal.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! terminal.css 0.7.4 | MIT License | github.com/Gioni06/terminal.css */
/*! terminal.css 0.7.5 | MIT License | github.com/Gioni06/terminal.css */

:root {
--global-font-size: 15px;
Expand All @@ -16,6 +16,7 @@
--progress-bar-background: #727578;
--progress-bar-fill: #151515;
--code-bg-color: #e8eff2;
--code-font-color: var(--font-color);
--input-style: solid;
--display-h1-decoration: none;
--block-background-color: var(--background-color);
Expand Down Expand Up @@ -110,8 +111,6 @@ ul,
h1,
.logo {
position: relative;
display: inline-block;
display: table-cell;
padding: calc(var(--global-space) * 2) 0 calc(var(--global-space) * 2);
margin: 0;
overflow: hidden;
Expand Down Expand Up @@ -144,7 +143,6 @@ h6 {
blockquote {
position: relative;
padding-left: calc(var(--global-space) * 2);
padding-left: 2ch;
overflow: hidden;
}

Expand All @@ -158,6 +156,10 @@ blockquote::after {
color: #9ca2ab;
}

blockquote>*:last-child {
margin-bottom: 0;
}

code {
font-weight: inherit;
background-color: var(--code-bg-color);
Expand Down Expand Up @@ -210,13 +212,11 @@ pre code {
font-size: var(--global-font-size);
font-style: normal;
font-family: var(--font-stack);
color: var(--font-color);
}

.terminal code {
font-size: var(--global-font-size);
font-style: normal;
color: var(--font-color);
}

.terminal-prompt {
Expand Down Expand Up @@ -411,7 +411,6 @@ hr {

p {
margin: 0 0 var(--global-line-height);
color: var(--font-color);
}

.container {
Expand All @@ -425,7 +424,7 @@ p {
}

img {
width: 100%;
max-width: 100%;
}

.progress-bar {
Expand All @@ -451,7 +450,7 @@ img {
border: 6px solid transparent;
border-top-color: var(--progress-bar-fill);
position: absolute;
top: -12px;
top: -6px;
right: -6px;
}

Expand All @@ -463,7 +462,7 @@ img {
white-space: nowrap;
position: absolute;
border: 6px solid transparent;
top: -38px;
top: -32px;
right: 0;
transform: translateX(50%);
}
Expand Down Expand Up @@ -493,8 +492,10 @@ table th {
font-size: 1em;
}

table thead th {
table thead tr th {
font-size: 1em;
vertical-align: middle;
font-weight: 700;
}

table tfoot tr th {
Expand All @@ -506,11 +507,6 @@ table caption {
margin: 0 0 1em;
}

table tbody td:first-child {
font-weight: 700;
color: var(--secondary-color);
}

.form {
width: 100%;
}
Expand All @@ -529,12 +525,18 @@ input[type="email"],
input[type="text"],
input[type="number"],
input[type="password"],
input[type="search"] {
input[type="search"],
input[type="date"],
input[type="time"] {
border: 1px var(--input-style) var(--font-color);
width: 100%;
padding: 0.7em 0.5em;
font-size: 1em;
font-family: var(--font-stack);
/* stylelint-disable */
-webkit-appearance: none;
-moz-appearance: none;
/* stylelint-enable */
appearance: none;
border-radius: 0;
}
Expand All @@ -544,12 +546,20 @@ input[type="text"]:active,
input[type="number"]:active,
input[type="password"]:active,
input[type="search"]:active,
input[type="date"]:active,
input[type="time"]:active,
input[type="email"]:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="search"]:focus {
input[type="search"]:focus,
input[type="date"]:focus,
input[type="time"]:focus {
outline: none;
/* stylelint-disable */
-webkit-appearance: none;
-moz-appearance: none;
/* stylelint-enable */
appearance: none;
border: 1px solid var(--font-color);
}
Expand All @@ -558,7 +568,9 @@ input[type="text"]:not(:placeholder-shown):invalid,
input[type="email"]:not(:placeholder-shown):invalid,
input[type="password"]:not(:placeholder-shown):invalid,
input[type="search"]:not(:placeholder-shown):invalid,
input[type="number"]:not(:placeholder-shown):invalid {
input[type="number"]:not(:placeholder-shown):invalid,
input[type="date"]:not(:placeholder-shown):invalid,
input[type="time"]:not(:placeholder-shown):invalid {
border-color: var(--error-color);
}

Expand Down Expand Up @@ -588,6 +600,10 @@ textarea {

textarea:focus {
outline: none;
/* stylelint-disable */
-webkit-appearance: none;
-moz-appearance: none;
/* stylelint-enable */
appearance: none;
border: 1px solid var(--font-color);
}
Expand All @@ -596,6 +612,24 @@ textarea:not(:placeholder-shown):invalid {
border-color: var(--error-color);
}

select {
border: 1px var(--input-style) var(--font-color);
width: 100%;
padding: .7em .5em;
font-size: 1em;
font-family: var(--font-stack);
color: var(--font-color);
border-radius: 0;
/* stylelint-disable */
-webkit-appearance: none;
-moz-appearance: none;
/* stylelint-enable */
background-color: var(--background-color);
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>");
background-repeat: no-repeat;
background-position: right .5em bottom .5em;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus textarea:-webkit-autofill,
Expand Down Expand Up @@ -807,7 +841,11 @@ select:-webkit-autofill:focus {
border-color: var(--primary-color);
}

@media screen and (width <=960px) {

/* stylelint-disable */

@media screen and (min-width: 960px) {
/* stylelint-enable */
label {
display: block;
width: 100%;
Expand All @@ -817,13 +855,21 @@ select:-webkit-autofill:focus {
}
}

@media screen and (width <=480px) {

/* stylelint-disable */

@media screen and (min-width: 480px) {
/* stylelint-enable */
form {
width: 100%;
}
}

@media only screen and (width >=30em) {

/* stylelint-disable */

@media screen and (min-width: 30rem) {
/* stylelint-enable */
.terminal-nav {
flex-direction: row;
align-items: center;
Expand All @@ -835,8 +881,7 @@ select:-webkit-autofill:focus {
margin-top: calc(var(--global-space) * 2);
}
.terminal-menu li {
margin: 0;
margin-right: 2em;
margin: 0 2em 0 0;
}
.terminal-menu li:last-child {
margin-right: 0;
Expand Down Expand Up @@ -905,6 +950,36 @@ figure>figcaption {
text-align: center;
}

.terminal-banner {
background-color: var(--font-color);
color: var(--invert-font-color);
padding: calc(var(--global-space) * 2);
width: 100%;
display: flex;
flex-direction: column;
gap: 1rem;
}

.terminal-banner>.container {
max-width: var(--page-width);
}

.terminal-banner>.container,
.terminal-banner>.container-fluid {
margin: 0 auto;
padding: 0;
}


/* stylelint-disable */

@media screen and (min-width: 30rem) {
/* stylelint-enable */
.terminal-banner {
flex-direction: row;
}
}

.hljs {
display: block;
overflow-x: auto;
Expand Down
21 changes: 11 additions & 10 deletions terminal/css/theme.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*! Terminal for MkDocs | MIT License | github.com/ntno/mkdocs-terminal */


/*! terminal.css 0.7.4 | MIT License | github.com/Gioni06/terminal.css */
/*! terminal.css 0.7.5 | MIT License | github.com/Gioni06/terminal.css */

body {
padding-top: 50px;
Expand Down Expand Up @@ -48,7 +48,14 @@ a.btn {
justify-content: center;
padding: .65em 2em;
border-color: var(--error-color);
color: var(--error-color);
}

p.terminal-mkdocs-macro-error-banner {
color: var(--font-color);
}

p.terminal-mkdocs-macro-error-banner>code {
color: var(--code-font-color);
}


Expand Down Expand Up @@ -77,15 +84,9 @@ code::before {
}


/* use the `code-bg-color` for `code` blocks */
/* use the `code-bg-color` and `code-font-color` for `<code>` blocks */

pre code {
background-color: var(--code-bg-color);
}


/* fix trailing `>` symbol on blockquotes - https://github.com/Gioni06/terminal.css/pull/36 */

blockquote>*:last-child {
margin-bottom: 0;
color: var(--code-font-color);
}
2 changes: 1 addition & 1 deletion terminal/theme_version.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-terminal-4.5.1">
<meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-terminal-4.6.0">

0 comments on commit 3c85784

Please sign in to comment.