* { box-sizing: border-box; } :root { --color-grey: #f2f3f5; --color-grey-lighter: #f7f8fa; --color-text-1: #1d2129; --color-text-2: #4e5969; --color-text-3: rgb(118, 124, 130); --color-primary: rgba(22, 93, 255, 1); --color-primary-lighter: rgba(106, 161, 255, 1); --color-primary-lighter-5: rgba(106, 161, 255, 0.1); --color-primary-hover: rgba(22, 93, 255, 0.05); } @import "./prism-laserwave.less"; html, body { position: relative; margin: 0; padding: 0; line-height: 1; font-family: Inter, "-apple-system", BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "noto sans", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; color: var(--color-text-2); } h1, h2, h3, h4, h5, h6 { color: var(--color-text-1); } ul { margin: 0; padding: 0; list-style: none; } li { padding: 0; } a { text-decoration: none; color: var(--color-primary-lighter); &:hover { color: var(--color-primary); } } .curtain-top { position: relative; &::before { position: absolute; content: ""; top: 20px; z-index: 10; left: 0; right: 0; height: 32px; background: linear-gradient(to top, transparent, #fff 70%); } } .curtain-bottom { position: relative; &::after { position: absolute; content: ""; bottom: 0; z-index: 10; left: 0; right: 0; height: 32px; background: linear-gradient(to bottom, transparent, #fff 70%); } } .hidden-scrollbar { position: relative; overflow-y: auto; &::-webkit-scrollbar { display: none; } } .box { margin-top: 24px; padding: 48px; color: #282f38; background-color: #fff; border: 1px solid var(--color-grey); border-radius: 2px 2px 0 0; } .root-container { nav { padding: 0 40px; display: flex; align-items: center; justify-content: space-between; position: fixed; left: 260px; right: 0; height: 60px; // border-bottom: 1px solid var(--color-grey); backdrop-filter: saturate(50%) blur(8px); background: rgba(255, 255, 255, 0.7); z-index: 199401; .end { display: flex; align-items: center; .search-container { position: relative; margin-right: 40px; height: 32px; width: 180px; svg { position: absolute; left: 5px; top: 50%; margin-top: -10px; width: 20px; height: 20px; z-index: 10; } input { transition: all 0.25s ease; padding-left: 25px; padding-right: 10px; position: absolute; top: 0; bottom: 0; left: 0; right: 0; border: 0; outline: 0; border-radius: 4px; background-color: var(--color-grey-lighter); &:focus { background-color: var(--color-grey); } } } ul { display: flex; margin: 0; li { margin-right: 30px; &:last-of-type { margin-right: 0; } span { user-select: none; font-size: 14px; cursor: pointer; &:hover { color: var(--color-primary); } &.active { color: var(--color-primary); } } } } } } aside { transition: all 0.15s ease-in-out; position: fixed; top: 0; bottom: 0; width: 260px; border-right: 1px solid var(--color-grey); padding: 0 20px; overflow: auto; .logo { display: flex; align-items: center; margin-top: 10px; height: 40px; img { height: 100%; } span { position: relative; padding-left: 10px; font-size: 16px; &::after { margin-left: 10px; padding: 0 2px; line-height: 1.3; border-radius: 3px; position: absolute; top: -10px; content: attr(data-version); font-size: 12px; color: var(--color-primary); border-radius: 4px; border: 1px solid var(--color-primary); background: var(--color-primary-lighter-5); } } } > h4 { margin: 0; padding: 20px 0; font-weight: 400; font-size: 12px; color: var(--color-text-3); } > header { display: flex; align-items: center; padding: 10px 10px 10px 30px; img { width: 32px; } } .nav-list { li { margin-bottom: 5px; &:last-of-type { margin-bottom: 0; } &:hover { border-radius: 4px; background-color: var(--color-grey-lighter); } a { border-radius: 4px; cursor: pointer; user-select: none; display: inline-block; display: block; padding-left: 20px; color: var(--color-text-1); line-height: 40px; text-decoration: none; &.active { color: var(--color-primary); background-color: var(--color-primary-hover); } } } } } > main { padding: 20px 40px 0 40px; margin-left: 260px; margin-right: 180px; } } .page-loading { position: fixed; left: 0; right: 0; top: 0; bottom: 0; background: #fff; z-index: 1023; &::after { position: absolute; content: ""; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 20px; height: 20px; border: 2px solid transparent; border-top-color: var(--color-primary-lighter); border-bottom-color: var(--color-primary-lighter); border-radius: 50%; animation: rotation 1s ease infinite; } } [data-lang] { position: relative; &::after { position: absolute; top: 1em; right: 1em; content: attr(data-lang); } } @keyframes rotation { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .btn { position: relative; transition: all 0.25s ease-in-out; display: inline-flex; justify-content: center; align-items: center; padding: 5px; box-sizing: border-box; width: 28px; height: 28px; border: 1px solid #e5e6eb; background: #fff; border-radius: 50%; z-index: 2; cursor: pointer; &:hover { box-shadow: 0 4px 10px #0000001a; &::before { display: inline-block; position: absolute; content: attr(data-placement); top: 50%; transform: translateY(-50%); left: -65px; width: 60px; text-align: center; padding: 4px 0; color: var(--color-text-2); border-radius: 2px; } } } .markdown-container { > h1, > h2, > h3, > h4, > h5, > h6 { margin: 0; padding: 48px 0 12px 0; font-weight: 500; font-size: 20px; } > ul { list-style-position: inside; list-style-type: square; > li { line-height: 2; } } li { list-style-type: circle; } > blockquote { margin: 20px 0; padding: 16px; color: var(--color-primary); border-radius: 8px; border: 1px solid var(--color-primary); background: var(--color-primary-lighter-5); > p { margin: 0; } } > p, li { margin: 0; line-height: 2; code { padding: 2px 4px; margin: 0 2px; font-size: 85%; color: #3c81a6; background-color: #d4eefc; border-radius: 3px; font-family: Inter, "-apple-system", BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "noto sans", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; } } } .api-table-container { > h1 { margin: 0; padding: 48px 0 12px 0; font-weight: 500; font-size: 20px; } .api-table { border-collapse: collapse; table-layout: fixed; border: 0; width: 100%; td, th { padding: 12px; font-size: 13px; text-align: left; } thead { tr { th { background: #f2f3f5; &:nth-of-type(1) { width: 10%; border-radius: 8px 0 0 8px; } &:nth-of-type(2) { width: 45%; } &:nth-of-type(3) { width: 21%; } &:nth-of-type(4) { width: 8%; } &:nth-of-type(5) { width: 8%; } &:nth-of-type(6) { width: 8%; border-radius: 0 8px 8px 0; } .annotation-prop { padding-top: 3px; font-weight: 300; font-size: 12px; color: #989898; } } } } tbody { tr { &:hover { background: rgba(60, 90, 100, 0.04); } } td { color: var(--color-text-1); line-height: 20px; border-bottom: 1px solid rgba(0, 0, 0, 0.06); &:nth-of-type(1) { font-weight: 600; } &:nth-of-type(2) { color: var(--color-text-3); word-break: break-all; } &:nth-of-type(3), &:nth-of-type(4) { color: #40b4c4; font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace; word-break: break-all; } &:nth-of-type(5) { color: #eb64b9; font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace; word-break: break-all; } } } } } .toc { position: fixed; width: 180px; top: 120px; bottom: 0; right: 0; background: #fff; h4 { display: flex; align-items: center; font-weight: 400; color: var(--color-text-3); font-size: 12px; } ul { height: 100%; border-left: 1px solid var(--color-grey); li { .toc-lvl { color: var(--color-text-2); display: block; padding-right: 20px; height: 28px; line-height: 28px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; &:hover { cursor: pointer; background-color: var(--color-grey-lighter); } &.active { color: var(--color-primary); border-left-color: var(--color-primary); background-color: var(--color-primary-hover); } &-1 { padding-left: 15px; } &-2 { padding-left: 25px; } } } } } .code-container { .btn { &.active { background: #27212e; color: #fff; } } }