Actualiza los estilos para encajarlos en los temas

This commit is contained in:
Manuel Cillero 2022-07-24 19:36:09 +02:00
parent 396f9df5ee
commit eb3e354f2f
6 changed files with 705 additions and 694 deletions

View file

@ -3,7 +3,7 @@ authors = ["Manuel Cillero"]
language = "en"
multilingual = false
src = "src"
title = "PageTop Guide"
title = "PageTop Guides"
[build]
build-dir = "../static/doc"

View file

@ -8,13 +8,19 @@
::-webkit-scrollbar-thumb {
background: var(--scrollbar);
}
html {
#mdbook {
position: relative;
scrollbar-color: var(--scrollbar) var(--bg);
}
#searchresults a,
.content a:link,
a:visited,
a > .hljs {
#mdbook .content {
position: relative;
}
#mdbook #searchresults a,
#mdbook .content a:link,
#mdbook a:visited,
#mdbook a > .hljs {
color: var(--links);
}
@ -65,35 +71,35 @@ a > .hljs {
}
}
.icon-button {
#mdbook .icon-button {
border: none;
background: none;
padding: 0;
color: inherit;
}
.icon-button i {
#mdbook .icon-button i {
margin: 0;
}
.right-buttons {
#mdbook .right-buttons {
margin: 0 15px;
}
.right-buttons a {
#mdbook .right-buttons a {
text-decoration: none;
}
.left-buttons {
#mdbook .left-buttons {
display: flex;
margin: 0 5px;
}
.no-js .left-buttons {
.no-js #mdbook .left-buttons {
display: none;
}
.menu-title {
#mdbook .menu-title {
display: inline-block;
font-weight: 200;
font-size: 2.4rem;
font-size: 1.8rem;
line-height: var(--menu-bar-height);
text-align: center;
margin: 0;
@ -102,36 +108,36 @@ a > .hljs {
overflow: hidden;
text-overflow: ellipsis;
}
.js .menu-title {
.js #mdbook .menu-title {
cursor: pointer;
}
.menu-bar,
.menu-bar:visited,
.nav-chapters,
.nav-chapters:visited,
.mobile-nav-chapters,
.mobile-nav-chapters:visited,
.menu-bar .icon-button,
.menu-bar a i {
#mdbook .menu-bar,
#mdbook .menu-bar:visited,
#mdbook .nav-chapters,
#mdbook .nav-chapters:visited,
#mdbook .mobile-nav-chapters,
#mdbook .mobile-nav-chapters:visited,
#mdbook .menu-bar .icon-button,
#mdbook .menu-bar a i {
color: var(--icons);
}
.menu-bar i:hover,
.menu-bar .icon-button:hover,
.nav-chapters:hover,
.mobile-nav-chapters i:hover {
#mdbook .menu-bar i:hover,
#mdbook .menu-bar .icon-button:hover,
#mdbook .nav-chapters:hover,
#mdbook .mobile-nav-chapters i:hover {
color: var(--icons-hover);
}
/* Nav Icons */
.nav-chapters {
#mdbook .nav-chapters {
font-size: 2.5em;
text-align: center;
text-decoration: none;
position: fixed;
position: absolute;
top: 0;
bottom: 0;
margin: 0;
@ -146,18 +152,18 @@ a > .hljs {
transition: color 0.5s, background-color 0.5s;
}
.nav-chapters:hover {
#mdbook .nav-chapters:hover {
text-decoration: none;
background-color: var(--theme-hover);
transition: background-color 0.15s, color 0.15s;
}
.nav-wrapper {
#mdbook .nav-wrapper {
margin-top: 50px;
display: none;
}
.mobile-nav-chapters {
#mdbook .mobile-nav-chapters {
font-size: 2.5em;
text-align: center;
text-decoration: none;
@ -166,46 +172,46 @@ a > .hljs {
background-color: var(--sidebar-bg);
}
.previous {
#mdbook .previous {
float: left;
}
.next {
#mdbook .next {
float: right;
right: var(--page-padding);
}
@media only screen and (max-width: 1080px) {
.nav-wide-wrapper { display: none; }
.nav-wrapper { display: block; }
#mdbook .nav-wide-wrapper { display: none; }
#mdbook .nav-wrapper { display: block; }
}
@media only screen and (max-width: 1380px) {
.sidebar-visible .nav-wide-wrapper { display: none; }
.sidebar-visible .nav-wrapper { display: block; }
.sidebar-visible #mdbook .nav-wide-wrapper { display: none; }
.sidebar-visible #mdbook .nav-wrapper { display: block; }
}
/* Inline code */
:not(pre) > .hljs {
#mdbook :not(pre) > .hljs {
display: inline;
padding: 0.1em 0.3em;
border-radius: 3px;
}
:not(pre):not(a) > .hljs {
#mdbook :not(pre):not(a) > .hljs {
color: var(--inline-code-color);
overflow-x: initial;
}
a:hover > .hljs {
#mdbook a:hover > .hljs {
text-decoration: underline;
}
pre {
#mdbook pre {
position: relative;
}
pre > .buttons {
#mdbook pre > .buttons {
position: absolute;
z-index: 100;
right: 0px;
@ -219,19 +225,19 @@ pre > .buttons {
opacity: 0;
transition: visibility 0.1s linear, opacity 0.1s linear;
}
pre:hover > .buttons {
#mdbook pre:hover > .buttons {
visibility: visible;
opacity: 1
}
pre > .buttons :hover {
#mdbook pre > .buttons :hover {
color: var(--sidebar-active);
border-color: var(--icons-hover);
background-color: var(--theme-hover);
}
pre > .buttons i {
#mdbook pre > .buttons i {
margin-left: 8px;
}
pre > .buttons button {
#mdbook pre > .buttons button {
cursor: inherit;
margin: 0px 5px;
padding: 3px 5px;
@ -247,12 +253,12 @@ pre > .buttons button {
color: var(--icons);
}
@media (pointer: coarse) {
pre > .buttons button {
#mdbook pre > .buttons button {
/* On mobile, make it easier to tap buttons. */
padding: 0.3rem 1rem;
}
}
pre > code {
#mdbook pre > code {
padding: 1rem;
}
@ -261,11 +267,11 @@ pre > code {
can think of is to move the padding to the outer pre tag (or insert a div
wrapper), but that would require fixing a whole bunch of CSS rules.
*/
.hljs.ace_editor {
#mdbook .hljs.ace_editor {
padding: 0rem 0rem;
}
pre > .result {
#mdbook pre > .result {
margin-top: 10px;
}
@ -275,7 +281,7 @@ pre > .result {
text-decoration: none;
}
mark {
#mdbook mark {
border-radius: 2px;
padding: 0 3px 1px 3px;
margin: 0 -3px -1px -3px;
@ -284,12 +290,12 @@ mark {
cursor: pointer;
}
mark.fade-out {
#mdbook mark.fade-out {
background-color: rgba(0,0,0,0) !important;
cursor: auto;
}
.searchbar-outer {
#mdbook .searchbar-outer {
margin-left: auto;
margin-right: auto;
max-width: var(--content-max-width);
@ -310,47 +316,46 @@ mark.fade-out {
box-shadow: 0 0 3px var(--searchbar-shadow-color);
}
.searchresults-header {
#mdbook .searchresults-header {
font-weight: bold;
font-size: 1em;
padding: 18px 0 0 5px;
color: var(--searchresults-header-fg);
}
.searchresults-outer {
#mdbook .searchresults-outer {
margin-left: auto;
margin-right: auto;
max-width: var(--content-max-width);
border-bottom: 1px dashed var(--searchresults-border-color);
}
ul#searchresults {
#mdbook ul#searchresults {
list-style: none;
padding-left: 20px;
}
ul#searchresults li {
#mdbook ul#searchresults li {
margin: 10px 0px;
padding: 2px;
border-radius: 2px;
}
ul#searchresults li.focus {
#mdbook ul#searchresults li.focus {
background-color: var(--searchresults-li-bg);
}
ul#searchresults span.teaser {
#mdbook ul#searchresults span.teaser {
display: block;
clear: both;
margin: 5px 0 0 20px;
font-size: 0.8em;
}
ul#searchresults span.teaser em {
#mdbook ul#searchresults span.teaser em {
font-weight: bold;
font-style: normal;
}
/* Sidebar */
.sidebar {
position: fixed;
#mdbook .sidebar {
position: absolute;
left: 0;
top: 0;
bottom: 0;
@ -368,13 +373,13 @@ ul#searchresults span.teaser em {
-ms-user-select: none;
user-select: none;
}
.js:not(.sidebar-resizing) .sidebar {
.js:not(.sidebar-resizing) #mdbook .sidebar {
transition: transform 0.3s; /* Animation: slide away */
}
.sidebar code {
#mdbook .sidebar code {
line-height: 2em;
}
.sidebar .sidebar-scrollbox {
#mdbook .sidebar .sidebar-scrollbox {
overflow-y: auto;
position: absolute;
top: 0;
@ -383,7 +388,7 @@ ul#searchresults span.teaser em {
right: 0;
padding: 10px 10px;
}
.sidebar .sidebar-resize-handle {
#mdbook .sidebar .sidebar-resize-handle {
position: absolute;
cursor: col-resize;
width: 0;
@ -391,60 +396,60 @@ ul#searchresults span.teaser em {
top: 0;
bottom: 0;
}
.js .sidebar .sidebar-resize-handle {
.js #mdbook .sidebar .sidebar-resize-handle {
cursor: col-resize;
width: 5px;
}
.sidebar-hidden .sidebar {
.sidebar-hidden #mdbook .sidebar {
transform: translateX(calc(0px - var(--sidebar-width)));
}
.sidebar::-webkit-scrollbar {
#mdbook .sidebar::-webkit-scrollbar {
background: var(--sidebar-bg);
}
.sidebar::-webkit-scrollbar-thumb {
#mdbook .sidebar::-webkit-scrollbar-thumb {
background: var(--scrollbar);
}
.sidebar-visible .page-wrapper {
.sidebar-visible #mdbook .page-wrapper {
transform: translateX(var(--sidebar-width));
}
@media only screen and (min-width: 620px) {
.sidebar-visible .page-wrapper {
.sidebar-visible #mdbook .page-wrapper {
transform: none;
margin-left: var(--sidebar-width);
}
}
.chapter {
#mdbook .chapter {
list-style: none outside none;
padding-left: 0;
line-height: 2.2em;
}
.chapter ol {
#mdbook .chapter ol {
width: 100%;
}
.chapter li {
#mdbook .chapter li {
display: flex;
color: var(--sidebar-non-existant);
}
.chapter li a {
#mdbook .chapter li a {
display: block;
padding: 0;
text-decoration: none;
color: var(--sidebar-fg);
}
.chapter li a:hover {
#mdbook .chapter li a:hover {
color: var(--sidebar-active);
}
.chapter li a.active {
#mdbook .chapter li a.active {
color: var(--sidebar-active);
}
.chapter li > a.toggle {
#mdbook .chapter li > a.toggle {
cursor: pointer;
display: block;
margin-left: auto;
@ -453,47 +458,48 @@ ul#searchresults span.teaser em {
opacity: 0.68;
}
.chapter li > a.toggle div {
#mdbook .chapter li > a.toggle div {
transition: transform 0.5s;
}
/* collapse the section */
.chapter li:not(.expanded) + li > ol {
#mdbook .chapter li:not(.expanded) + li > ol {
display: none;
}
.chapter li.chapter-item {
#mdbook .chapter li.chapter-item {
line-height: 1.5em;
margin-top: 0.6em;
}
.chapter li.expanded > a.toggle div {
#mdbook .chapter li.expanded > a.toggle div {
transform: rotate(90deg);
}
.spacer {
#mdbook .spacer {
width: 100%;
height: 3px;
margin: 5px 0px;
}
.chapter .spacer {
#mdbook .chapter .spacer {
background-color: var(--sidebar-spacer);
}
@media (-moz-touch-enabled: 1), (pointer: coarse) {
.chapter li a { padding: 5px 0; }
.spacer { margin: 10px 0; }
#mdbook .chapter li a { padding: 5px 0; }
#mdbook .spacer { margin: 10px 0; }
}
.section {
#mdbook .section {
list-style: none outside none;
padding-left: 20px;
margin: 0;
padding: 0 0 0 20px;
line-height: 1.9em;
}
/* Theme Menu Popup */
.theme-popup {
#mdbook .theme-popup {
position: absolute;
left: 10px;
top: var(--menu-bar-height);
@ -508,10 +514,10 @@ ul#searchresults span.teaser em {
list-style: none;
display: none;
}
.theme-popup .default {
#mdbook .theme-popup .default {
color: var(--icons);
}
.theme-popup .theme {
#mdbook .theme-popup .theme {
width: 100%;
border: 0;
margin: 0;
@ -524,11 +530,11 @@ ul#searchresults span.teaser em {
background: inherit;
font-size: inherit;
}
.theme-popup .theme:hover {
#mdbook .theme-popup .theme:hover {
background-color: var(--theme-hover);
}
.theme-popup .theme:hover:first-child,
.theme-popup .theme:hover:last-child {
#mdbook .theme-popup .theme:hover:first-child,
#mdbook .theme-popup .theme:hover:last-child {
border-top-left-radius: inherit;
border-top-right-radius: inherit;
}

View file

@ -2,66 +2,60 @@
@import 'variables.css';
:root {
/* Browser default font-size is 16px, this way 1 rem = 10px */
font-size: 62.5%;
}
html {
#mdbook {
font-family: "Open Sans", sans-serif;
color: var(--fg);
background-color: var(--bg);
text-size-adjust: none;
-webkit-text-size-adjust: none;
}
body {
margin: 0;
font-size: 1.6rem;
overflow-x: hidden;
}
code {
#mdbook code {
font-family: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace !important;
font-size: 0.875em; /* please adjust the ace font size accordingly in editor.js */
}
/* make long words/inline code not x overflow */
main {
#mdbook main {
overflow-wrap: break-word;
}
/* make wide tables scroll if they overflow */
.table-wrapper {
#mdbook .table-wrapper {
overflow-x: auto;
}
/* Don't change font size in headers. */
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
#mdbook h1 code,
#mdbook h2 code,
#mdbook h3 code,
#mdbook h4 code,
#mdbook h5 code,
#mdbook h6 code {
font-size: unset;
}
.left { float: left; }
.right { float: right; }
.boring { opacity: 0.6; }
.hide-boring .boring { display: none; }
.hidden { display: none !important; }
#mdbook .left { float: left; }
#mdbook .right { float: right; }
#mdbook .boring { opacity: 0.6; }
#mdbook .hide-boring .boring { display: none; }
#mdbook .hidden { display: none !important; }
h2, h3 { margin-top: 2.5em; }
h4, h5 { margin-top: 2em; }
#mdbook h2, #mdbook h3 { margin-top: 2.5em; }
#mdbook h4, #mdbook h5 { margin-top: 2em; }
.header + .header h3,
.header + .header h4,
.header + .header h5 {
#mdbook .header + .header h3,
#mdbook .header + .header h4,
#mdbook .header + .header h5 {
margin-top: 1em;
}
h1:target::before,
h2:target::before,
h3:target::before,
h4:target::before,
h5:target::before,
h6:target::before {
#mdbook h1:target::before,
#mdbook h2:target::before,
#mdbook h3:target::before,
#mdbook h4:target::before,
#mdbook h5:target::before,
#mdbook h6:target::before {
display: inline-block;
content: "»";
margin-left: -30px;
@ -76,70 +70,70 @@ h6:target::before {
scroll-margin-top: calc(var(--menu-bar-height) + 0.5em);
}
.page {
#mdbook .page {
outline: 0;
padding: 0 var(--page-padding);
margin-top: calc(0px - var(--menu-bar-height)); /* Compensate for the #menu-bar-hover-placeholder */
}
.page-wrapper {
#mdbook .page-wrapper {
box-sizing: border-box;
}
.js:not(.sidebar-resizing) .page-wrapper {
.js:not(.sidebar-resizing) #mdbook .page-wrapper {
transition: margin-left 0.3s ease, transform 0.3s ease; /* Animation: slide away */
}
.content {
#mdbook .content {
overflow-y: auto;
padding: 0 5px 50px 5px;
padding: 20px 5px 50px 5px;
}
.content main {
#mdbook .content main {
margin-left: auto;
margin-right: auto;
max-width: var(--content-max-width);
}
.content p { line-height: 1.45em; }
.content ol { line-height: 1.45em; }
.content ul { line-height: 1.45em; }
.content a { text-decoration: none; }
.content a:hover { text-decoration: underline; }
.content img, .content video { max-width: 100%; }
.content .header:link,
.content .header:visited {
#mdbook .content p { line-height: 1.45em; }
#mdbook .content ol { line-height: 1.45em; }
#mdbook .content ul { line-height: 1.45em; }
#mdbook .content a { text-decoration: none; }
#mdbook .content a:hover { text-decoration: underline; }
#mdbook .content img, .content video { max-width: 100%; }
#mdbook .content .header:link,
#mdbook .content .header:visited {
color: var(--fg);
}
.content .header:link,
.content .header:visited:hover {
#mdbook .content .header:link,
#mdbook .content .header:visited:hover {
text-decoration: none;
}
table {
#mdbook table {
margin: 0 auto;
border-collapse: collapse;
}
table td {
#mdbook table td {
padding: 3px 20px;
border: 1px var(--table-border-color) solid;
}
table thead {
#mdbook table thead {
background: var(--table-header-bg);
}
table thead td {
#mdbook table thead td {
font-weight: 700;
border: none;
}
table thead th {
#mdbook table thead th {
padding: 3px 20px;
}
table thead tr {
#mdbook table thead tr {
border: 1px var(--table-header-bg) solid;
}
/* Alternate background colors for rows */
table tbody tr:nth-child(2n) {
#mdbook table tbody tr:nth-child(2n) {
background: var(--table-alternate-bg);
}
blockquote {
#mdbook blockquote {
margin: 20px 0;
padding: 0 20px;
color: var(--fg);
@ -149,19 +143,19 @@ blockquote {
}
:not(.footnote-definition) + .footnote-definition,
.footnote-definition + :not(.footnote-definition) {
#mdbook :not(.footnote-definition) + .footnote-definition,
#mdbook .footnote-definition + :not(.footnote-definition) {
margin-top: 2em;
}
.footnote-definition {
#mdbook .footnote-definition {
font-size: 0.9em;
margin: 0.5em 0;
}
.footnote-definition p {
#mdbook .footnote-definition p {
display: inline;
}
.tooltiptext {
#mdbook .tooltiptext {
position: absolute;
visibility: hidden;
color: #fff;
@ -176,16 +170,16 @@ blockquote {
margin: 5px;
z-index: 1000;
}
.tooltipped .tooltiptext {
#mdbook .tooltipped .tooltiptext {
visibility: visible;
}
.chapter li.part-title {
#mdbook .chapter li.part-title {
color: var(--sidebar-fg);
margin: 5px 0px;
font-weight: bold;
}
.result-no-output {
#mdbook .result-no-output {
font-style: italic;
}

View file

@ -1,14 +1,16 @@
#sidebar,
#menu-bar,
.nav-chapters,
.mobile-nav-chapters {
#mdbook .nav-chapters,
#mdbook .mobile-nav-chapters {
display: none;
}
#page-wrapper.page-wrapper {
transform: none;
margin-left: 0px;
#mdbook,
#page-wrapper {
margin: 0;
padding: 0;
max-width: none;
transform: none !important;
overflow-y: initial;
}
@ -18,37 +20,46 @@
padding: 0;
}
.page {
#mdbook .page {
overflow-y: initial;
}
code {
background-color: #666666;
#mdbook code {
background-color: #eeeeee;
border-radius: 5px;
/* Force background to be printed in Chrome */
-webkit-print-color-adjust: exact;
}
pre > .buttons {
#mdbook pre > .buttons {
z-index: 2;
}
a, a:visited, a:active, a:hover {
#mdbook a,
#mdbook a:visited,
#mdbook a:active,
#mdbook a:hover {
color: #4183c4;
text-decoration: none;
}
h1, h2, h3, h4, h5, h6 {
#mdbook h1,
#mdbook h2,
#mdbook h3,
#mdbook h4,
#mdbook h5,
#mdbook h6 {
page-break-inside: avoid;
page-break-after: avoid;
}
pre, code {
#mdbook pre,
#mdbook code {
page-break-inside: avoid;
white-space: pre-wrap;
}
.fa {
#mdbook .fa {
display: none !important;
}