mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
483 lines
7.7 KiB
CSS
483 lines
7.7 KiB
CSS
* {
|
|
box-sizing: border-box;
|
|
-webkit-overflow-scrolling: touch;
|
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
-webkit-text-size-adjust: none;
|
|
-webkit-touch-callout: none;
|
|
-webkit-font-smoothing: antialiased;
|
|
}
|
|
|
|
.emoji {
|
|
height: 1.2em;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.progress {
|
|
background-color: var(--theme-color, $color-primary);
|
|
height: 2px;
|
|
left: 0px;
|
|
position: fixed;
|
|
right: 0px;
|
|
top: 0px;
|
|
transition: width 0.2s, opacity 0.4s;
|
|
width: 0%;
|
|
z-index: 999999;
|
|
}
|
|
|
|
.search a:hover {
|
|
color: var(--theme-color, $color-primary);
|
|
}
|
|
|
|
.search .search-keyword {
|
|
color: var(--theme-color, $color-primary);
|
|
font-style: normal;
|
|
}
|
|
|
|
html, body {
|
|
height: 100%;
|
|
}
|
|
|
|
body {
|
|
-moz-osx-font-smoothing: grayscale;
|
|
-webkit-font-smoothing: antialiased;
|
|
font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
|
|
font-size: 15px;
|
|
letter-spacing: 0;
|
|
margin: 0;
|
|
overflow-x: hidden;
|
|
color: $color-text;
|
|
}
|
|
|
|
img {
|
|
max-width: 100%;
|
|
}
|
|
|
|
kbd {
|
|
display: inline-block;
|
|
padding: 3px 5px;
|
|
margin-bottom : 3px;
|
|
font-size: 12px !important;
|
|
line-height: 12px;
|
|
vertical-align: middle;
|
|
border: solid 1px #ccc;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
/* navbar */
|
|
nav {
|
|
position: absolute;
|
|
right: 0;
|
|
left: 0;
|
|
z-index: 10;
|
|
margin: 25px 60px 0 0;
|
|
text-align: right;
|
|
|
|
&.no-badge {
|
|
margin-right: 25px;
|
|
}
|
|
|
|
p {
|
|
margin: 0;
|
|
}
|
|
|
|
>a {
|
|
margin: 0 1em;
|
|
padding: 5px 0;
|
|
}
|
|
|
|
ul, li {
|
|
list-style: none;
|
|
display: inline-block;
|
|
margin: 0;
|
|
}
|
|
|
|
a {
|
|
font-size: 16px;
|
|
text-decoration: none;
|
|
color: inherit;
|
|
transition: color .3s;
|
|
|
|
&:hover {
|
|
color: var(--theme-color, $color-primary);
|
|
}
|
|
|
|
&.active {
|
|
color: var(--theme-color, $color-primary);
|
|
border-bottom: 2px solid var(--theme-color, $color-primary);
|
|
}
|
|
}
|
|
|
|
/* navbar dropdown */
|
|
li {
|
|
position: relative;
|
|
display: inline-block;
|
|
margin: 0 1em;
|
|
padding: 5px 0;
|
|
|
|
ul {
|
|
display: none;
|
|
box-sizing: border-box;
|
|
max-height: calc(100vh - 61px);
|
|
overflow-y: scroll;
|
|
position: absolute;
|
|
top: 100%;
|
|
right: -15px;
|
|
background-color: #fff;
|
|
padding: 10px 0;
|
|
border: 1px solid #ddd;
|
|
border-bottom-color: #ccc;
|
|
text-align: left;
|
|
border-radius: 4px;
|
|
white-space: nowrap;
|
|
|
|
li {
|
|
display: block;
|
|
font-size: 14px;
|
|
margin: 0;
|
|
margin: 8px 14px;
|
|
white-space: nowrap;
|
|
line-height: 1em;
|
|
}
|
|
|
|
a {
|
|
display: block;
|
|
font-size: inherit;
|
|
margin: 0;
|
|
padding: 0;
|
|
|
|
&.active {
|
|
border-bottom: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
&:hover ul {
|
|
display: block;
|
|
}
|
|
}
|
|
}
|
|
|
|
/* github corner */
|
|
.github-corner {
|
|
position: fixed;
|
|
top: 0;
|
|
right: 0;
|
|
z-index: 1;
|
|
text-decoration: none;
|
|
border-bottom: 0;
|
|
|
|
&:hover .octo-arm {
|
|
animation:octocat-wave 560ms ease-in-out;
|
|
}
|
|
|
|
svg {
|
|
color: $color-bg;
|
|
height: 80px;
|
|
width: 80px;
|
|
fill: var(--theme-color, $color-primary);
|
|
}
|
|
}
|
|
|
|
/* main */
|
|
main {
|
|
display: block;
|
|
size: 100vw 100%;
|
|
position: relative;
|
|
}
|
|
|
|
.anchor {
|
|
text-decoration: none;
|
|
transition: all .3s;
|
|
display: inline-block;
|
|
|
|
span {
|
|
color: $color-text;
|
|
}
|
|
|
|
&:hover {
|
|
text-decoration: underline;
|
|
}
|
|
}
|
|
|
|
/* sidebar */
|
|
.sidebar {
|
|
overflow-y: auto;
|
|
padding: 40px 0;
|
|
position: absolute 0 * 0 0;
|
|
transition: transform 250ms ease-out;
|
|
width: $sidebar-width;
|
|
z-index: 20;
|
|
border-right: 1px solid rgba(0, 0, 0, .07);
|
|
|
|
> h1 {
|
|
text-align: center;
|
|
margin: 0 auto 1em;
|
|
font-size: 1.5em;
|
|
font-weight: 300;
|
|
|
|
a {
|
|
color: inherit;
|
|
text-decoration: none;
|
|
}
|
|
}
|
|
|
|
ul {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
li>p {
|
|
font-weight: 700;
|
|
margin: 0;
|
|
}
|
|
|
|
ul, ul li {
|
|
list-style: none;
|
|
}
|
|
|
|
ul li a {
|
|
display: block;
|
|
border-bottom: none;
|
|
}
|
|
|
|
ul li ul {
|
|
padding-left: 20px;
|
|
}
|
|
|
|
&::-webkit-scrollbar {
|
|
width: 4px;
|
|
}
|
|
|
|
&::-webkit-scrollbar-thumb {
|
|
background: transparent;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
&:hover::-webkit-scrollbar-thumb {
|
|
background: rgba(136, 136, 136, 0.4);
|
|
}
|
|
|
|
&:hover::-webkit-scrollbar-track {
|
|
background: rgba(136, 136, 136, 0.1);
|
|
}
|
|
}
|
|
|
|
/* sidebar toggle */
|
|
.sidebar-toggle {
|
|
background-color: transparent;
|
|
border: 0;
|
|
outline: none;
|
|
position: absolute * * 0 0;
|
|
text-align: center;
|
|
transition: opacity .3s;
|
|
width: 30px;
|
|
z-index: 30;
|
|
outline: none;
|
|
width: calc($sidebar-width - 16px);
|
|
padding: 10px;
|
|
background-color: rgba($color-bg, .8);
|
|
|
|
.sidebar-toggle-button:hover {
|
|
opacity: .4;
|
|
}
|
|
|
|
span {
|
|
background-color: var(--theme-color, $color-primary);
|
|
display: block;
|
|
size: 16px 2px;
|
|
margin-bottom: 4px;
|
|
}
|
|
}
|
|
|
|
body.sticky {
|
|
.sidebar, .sidebar-toggle {
|
|
position: fixed;
|
|
}
|
|
}
|
|
|
|
/* main content */
|
|
.content {
|
|
position: absolute 0 0 0 $sidebar-width;
|
|
padding-top: 20px;
|
|
transition: left 250ms ease;
|
|
}
|
|
|
|
/* markdown content found on pages */
|
|
.markdown-section {
|
|
position: relative;
|
|
margin: 0 auto;
|
|
max-width: 800px;
|
|
padding: 20px 15px 40px 15px;
|
|
|
|
> * {
|
|
box-sizing: border-box;
|
|
font-size: inherit;
|
|
}
|
|
|
|
>:first-child {
|
|
margin-top: 0!important;
|
|
}
|
|
}
|
|
|
|
.markdown-section hr {
|
|
border: none;
|
|
margin: 2em 0;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.markdown-section table {
|
|
display: block;
|
|
width: 100%;
|
|
overflow: auto;
|
|
border-spacing: 0;
|
|
border-collapse: collapse;
|
|
margin-bottom: 1em;
|
|
}
|
|
|
|
.markdown-section th {
|
|
font-weight: bold;
|
|
padding: 6px 13px;
|
|
border: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-section td {
|
|
padding: 6px 13px;
|
|
border: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-section tr {
|
|
border-top: 1px solid #ccc;
|
|
&:nth-child(2n) {
|
|
background-color: #f8f8f8;
|
|
}
|
|
}
|
|
|
|
.markdown-section p.tip {
|
|
padding: 12px 24px 12px 30px;
|
|
margin: 2em 0;
|
|
border-left: 4px solid #f66;
|
|
background-color: #f8f8f8;
|
|
position: relative;
|
|
border-bottom-right-radius: 2px;
|
|
border-top-right-radius: 2px;
|
|
|
|
&:before {
|
|
position: absolute;
|
|
top: 14px;
|
|
left: -12px;
|
|
background-color: #f66;
|
|
color: $color-bg;
|
|
content: "!";
|
|
size: 20px;
|
|
border-radius: 100%;
|
|
text-align: center;
|
|
line-height: 20px;
|
|
font-weight: bold;
|
|
font-family: 'Dosis', 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif;
|
|
font-size: 14px;
|
|
}
|
|
|
|
code {
|
|
background-color: #efefef;
|
|
}
|
|
|
|
em {
|
|
color: $color-text;
|
|
}
|
|
}
|
|
|
|
.markdown-section p.warn {
|
|
padding: 1em;
|
|
background: rgba($color-primary, 0.1);
|
|
border-radius: 2px;
|
|
}
|
|
|
|
body.close {
|
|
.sidebar {
|
|
transform: translateX(-$sidebar-width);
|
|
}
|
|
|
|
.sidebar-toggle {
|
|
width: auto;
|
|
}
|
|
|
|
.content {
|
|
left: 0;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
.github-corner, .sidebar-toggle, .sidebar {
|
|
position: fixed;
|
|
}
|
|
|
|
nav {
|
|
margin-top: 16px;
|
|
}
|
|
|
|
nav li ul {
|
|
top: 30px;
|
|
}
|
|
|
|
main {
|
|
height: auto;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
.sidebar {
|
|
left: -$sidebar-width;
|
|
transition: transform 250ms ease-out;
|
|
}
|
|
|
|
.content {
|
|
left: 0;
|
|
max-width: 100vw;
|
|
position: static;
|
|
transition: transform 250ms ease;
|
|
}
|
|
|
|
nav, .github-corner {
|
|
transition: transform 250ms ease-out;
|
|
}
|
|
|
|
.sidebar-toggle {
|
|
width: auto;
|
|
background-color: transparent;
|
|
}
|
|
|
|
body.close {
|
|
.sidebar {
|
|
transform: translateX($sidebar-width);
|
|
}
|
|
|
|
.sidebar-toggle {
|
|
width: calc($sidebar-width - 16px);
|
|
background-color: rgba($color-bg, .8);
|
|
transition: 1s background-color;
|
|
}
|
|
|
|
.content {
|
|
transform: translateX($sidebar-width);
|
|
}
|
|
|
|
nav, .github-corner {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.github-corner {
|
|
&:hover .octo-arm {
|
|
animation: none;
|
|
}
|
|
.octo-arm {
|
|
animation: octocat-wave 560ms ease-in-out;
|
|
}
|
|
}
|
|
}
|
|
|
|
@keyframes octocat-wave {
|
|
0%,100% { transform: rotate(0); }
|
|
20%,60% { transform: rotate(-25deg); }
|
|
40%,80% { transform: rotate(10deg); }
|
|
}
|