diff --git a/docs/css/style.css b/docs/css/style.css index d1994f0abc..915a4ed1e1 100644 --- a/docs/css/style.css +++ b/docs/css/style.css @@ -27,23 +27,6 @@ --border-color: var(--gray2); } -@keyframes octocat { - 0%, - to { - transform: rotate(0); - } - - 20%, - 60% { - transform: rotate(-25deg); - } - - 40%, - 80% { - transform: rotate(10deg); - } -} - ::selection { background: #f9e4ac; /* WebKit/Blink Browsers */ @@ -86,25 +69,7 @@ img[src*='#gh-dark-mode-only'] { display: none; } -.github-corner { - border-bottom: 0; - position: fixed; - right: 0; - text-decoration: none; - top: 0; - z-index: 1; -} -.github-corner svg { - color: #fff; - fill: var(--primary-color); - height: 80px; - width: 80px; -} - -.github-corner:hover .octo-arm { - animation: octocat 0.5s ease-in-out; -} main { display: block; @@ -157,7 +122,7 @@ main { text-decoration: underline; } -.sidebar ul li.active > a { +.sidebar ul li.active>a { border-right: 2px solid var(--primary-color); color: var(--primary-color); font-weight: 700; @@ -202,12 +167,12 @@ body.sticky .sidebar-toggle { position: relative; } -.markdown-section > * { +.markdown-section>* { box-sizing: border-box; font-size: inherit; } -.markdown-section > :first-child { +.markdown-section> :first-child { margin-top: 0 !important; } @@ -231,6 +196,7 @@ body.sticky .sidebar-toggle { } @media print { + .github-corner, .sidebar, .sidebar-toggle { @@ -239,6 +205,7 @@ body.sticky .sidebar-toggle { } @media screen and (max-width: 768px) { + .github-corner, .sidebar { position: fixed; @@ -391,7 +358,7 @@ body { -webkit-font-smoothing: initial; } -.markdown-section pre > code { +.markdown-section pre>code { border: 0; display: block; font-family: var(--code-font); @@ -429,3 +396,43 @@ body { .token.comment { color: var(--gray7); } + +/* github corner */ + +@keyframes b { + 0%, + 100% { + transform: rotate(0); + } + + 20%, + 60% { + transform: rotate(-25deg); + } + + 40%, + 80% { + transform: rotate(10deg); + } +} + +.github-corner svg { + border-bottom: 0; + position: fixed; + right: 0; + text-decoration: none; + top: 0; + z-index: 1; +} + +.github-corner:hover svg .octo-arm { + opacity: 1; + animation: b 560ms ease-in-out; +} + +.github-corner svg { + color: white; + fill: black; + height: 80px; + width: 80px; +} diff --git a/gulpfile.js b/gulpfile.js index 3195099853..5ea4434076 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,10 +1,8 @@ 'use strict' -const strip = require('gulp-strip-css-comments') -const prefix = require('gulp-autoprefixer') -const cssnano = require('gulp-cssnano') -const uglify = require('gulp-uglify') +const postcss = require('gulp-postcss') const concat = require('gulp-concat') +const uglify = require('gulp-uglify') const gulp = require('gulp') const src = { @@ -24,9 +22,14 @@ const styles = () => gulp .src(src.css) .pipe(concat(`${dist.name.css}.min.css`)) - .pipe(prefix()) - .pipe(strip({ all: true })) - .pipe(cssnano()) + .pipe( + postcss([ + require('postcss-focus'), + require('cssnano')({ + preset: ['cssnano-preset-advanced'] + }) + ]) + ) .pipe(gulp.dest(dist.path)) const scripts = () => diff --git a/index.html b/index.html index 16a971437b..a3c11e3335 100644 --- a/index.html +++ b/index.html @@ -75,8 +75,8 @@ /> - + diff --git a/package.json b/package.json index 55250ec950..0b3318da41 100644 --- a/package.json +++ b/package.json @@ -91,16 +91,18 @@ "browser-sync": "latest", "c8": "latest", "concurrently": "latest", + "cssnano": "latest", + "cssnano-preset-advanced": "latest", "finepack": "latest", "git-authors-cli": "latest", "gulp": "4", - "gulp-autoprefixer": "8", "gulp-concat": "latest", - "gulp-cssnano": "latest", - "gulp-strip-css-comments": "2", + "gulp-postcss": "latest", "gulp-uglify": "latest", "nano-staged": "latest", "npm-check-updates": "latest", + "postcss": "latest", + "postcss-focus": "latest", "simple-git-hooks": "latest", "standard": "latest" }, diff --git a/static/style.min.css b/static/style.min.css index f2a85f5411..b4510dd1a1 100644 --- a/static/style.min.css +++ b/static/style.min.css @@ -1 +1 @@ -@import url("https://rsms.me/inter/inter-ui.css");:root{--base:#000;--black:#3f3f3f;--gray0:#f9f9f9;--gray1:#ededed;--gray2:#e0e0e0;--gray3:#d2d2d2;--gray4:#c3c3c3;--gray5:#b2b2b2;--gray6:#9f9f9f;--gray7:#888;--gray8:#6c6c6c;--gray9:#3f3f3f;--blue:#067df7;--green:#42b983;--red:#f66;--primary-color:var(--base);--secondary-color:var(--blue);--bg-color:#fff;--serif-font:"Nunito",sans-serif;--sans-serif-font:"Nunito Sans",sans-serif;--code-font:"Roboto Mono",monospace;--border-color:var(--gray2)}@keyframes a{0%,to{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}::selection{background:#f9e4ac}::-moz-selection{background:#f9e4ac}*{-webkit-font-smoothing:antialiased;-webkit-overflow-scrolling:touch;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-text-size-adjust:none;-webkit-touch-callout:none;box-sizing:border-box}body,html{height:100%}body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--sans-serif-font);font-size:16px;letter-spacing:0;margin:0;overflow-x:hidden}img{max-width:100%}img[src*="#gh-dark-mode-only"]{display:none}.github-corner{border-bottom:0;position:fixed;right:0;text-decoration:none;top:0;z-index:1}.github-corner svg{color:#fff;fill:var(--primary-color);height:80px;width:80px}.github-corner:hover .octo-arm{animation:a .5s ease-in-out}main{display:block;position:relative;width:100vw;height:100%;z-index:0}.sidebar{font-family:var(--sans-serif-font);padding:40px;width:300px;transition:transform .25s ease-out;overflow:auto;height:100vh}.sidebar .sidebar-nav{line-height:2em;padding-bottom:40px}.sidebar li{margin:6px 0 6px 15px}.sidebar ul{margin:0;padding:0}.sidebar ul ul{margin-left:15px}.sidebar ul,.sidebar ul li{list-style:none}.sidebar ul li a{color:var(--gray8);display:block;font-size:14px;text-decoration:none}.sidebar ul li a:hover{text-decoration:underline}.sidebar ul li.active>a{border-right:2px solid var(--primary-color);color:var(--primary-color);font-weight:700}.sidebar::-webkit-scrollbar{width:4px}.sidebar::-webkit-scrollbar-thumb{background:transparent;border-radius:4px}.sidebar:hover::-webkit-scrollbar-thumb{background:hsla(0,0%,53%,.4)}.sidebar:hover::-webkit-scrollbar-track{background:hsla(0,0%,53%,.1)}body.sticky .sidebar,body.sticky .sidebar-toggle{position:fixed}.content{padding-top:60px;top:0;right:0;bottom:0;left:300px;position:absolute;transition:left .25s ease}.markdown-section{margin:0 auto;max-width:800px;padding:30px 15px 40px;position:relative}.markdown-section>*{box-sizing:border-box;font-size:inherit}.markdown-section>:first-child{margin-top:0!important}.markdown-section table{border-spacing:0;border-collapse:collapse;display:block;width:-moz-max-content;width:max-content;max-width:100%;overflow:auto}.markdown-section table thead tr{text-align:left}.markdown-section td,.markdown-section th{border:1px solid var(--border-color);padding:.5rem}@media print{.github-corner,.sidebar,.sidebar-toggle{display:none}}@media screen and (max-width:768px){.github-corner,.sidebar{position:fixed}.sidebar,.sidebar-toggle{display:none}main{height:auto;overflow-x:hidden}.content{left:0;max-width:100vw;position:static;padding-top:20px;transition:transform .25s ease}.github-corner:hover .octo-arm{animation:none}}.sidebar,body{background-color:var(--bg-color);color:var(--primary-color)}.markdown-section :is(h1,h2,h3,h4,h5){font-family:var(--serif-font)}.markdown-section :is(h1,h2,h3,h4,h5) a:hover:after{content:"#";position:relative;margin-left:6px;display:inline-block}.markdown-section a{color:var(--primary-color);text-decoration:none;font-weight:700}.markdown-section :is(li,p,td) a{color:var(--secondary-color)}.markdown-section :is(li,p) a:hover{text-decoration:underline;text-underline-offset:2px}.markdown-section h1{font-size:2rem;margin:4rem 0 1rem}.markdown-section h2{font-size:1.75rem;margin:3.5rem 0 1rem}.markdown-section h3{font-size:1.5rem;margin:3rem 0 1rem}.markdown-section h4{font-size:1.25rem;margin:2.5rem 0 1rem}.markdown-section h5{font-size:1rem}.markdown-section p{margin:1.2em 0}.markdown-section :is(p,ul){line-height:1.8rem;word-spacing:.05rem}.markdown-section ul li{margin-bottom:10px}.markdown-section ul{padding-left:2rem}.markdown-section blockquote{border-left:4px solid var(--primary-color);margin:2em 0;padding-left:20px}.markdown-section blockquote p{margin-left:0;padding:12px 0}.markdown-section :is(code,pre,img){border-radius:4px}.markdown-section code{border:1px solid var(--border-color);font-family:var(--code-font);font-size:.75rem;padding:3px 5px;white-space:nowrap}.markdown-section pre{border:1px solid var(--border-color);line-height:1.5rem;margin:1.2em 0;overflow:auto;padding:0 .7rem;position:relative;word-wrap:normal}.markdown-section pre:after{color:var(--gray6);content:attr(data-lang);font-size:.6rem;height:15px;line-height:15px;padding:5px 10px 0;position:absolute;right:0;text-align:right;top:0}.markdown-section :is(pre,pre>code){-moz-osx-font-smoothing:initial;-webkit-font-smoothing:initial}.markdown-section pre>code{border:0;display:block;font-family:var(--code-font);font-size:.8rem;line-height:inherit;margin:0 2px;max-width:inherit;overflow:inherit;padding:1.25em 5px;white-space:inherit}.markdown-section :is(code:after,code:before){letter-spacing:.8px;letter-spacing:.05rem}.token.keyword{color:#ff0078;font-weight:bolder}.token:is(.class-name,.function,.number){color:var(--blue)}.token.string{color:#028265}.token:is(.boolean,.constant){color:var(--red)}.token.comment{color:var(--gray7)} \ No newline at end of file +@import url("https://rsms.me/inter/inter-ui.css");:root{--base:#000;--black:#3f3f3f;--gray0:#f9f9f9;--gray1:#ededed;--gray2:#e0e0e0;--gray3:#d2d2d2;--gray4:#c3c3c3;--gray5:#b2b2b2;--gray6:#9f9f9f;--gray7:#888;--gray8:#6c6c6c;--gray9:#3f3f3f;--blue:#067df7;--green:#42b983;--red:#f66;--primary-color:var(--base);--secondary-color:var(--blue);--bg-color:#fff;--serif-font:"Nunito",sans-serif;--sans-serif-font:"Nunito Sans",sans-serif;--code-font:"Roboto Mono",monospace;--border-color:var(--gray2)}::selection{background:#f9e4ac}::-moz-selection{background:#f9e4ac}*{-webkit-font-smoothing:antialiased;-webkit-overflow-scrolling:touch;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-text-size-adjust:none;-webkit-touch-callout:none;box-sizing:border-box}body,html{height:100%}body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--sans-serif-font);font-size:16px;letter-spacing:0;margin:0;overflow-x:hidden}img{max-width:100%}img[src*="#gh-dark-mode-only"]{display:none}main{display:block;height:100%;position:relative;width:100vw;z-index:0}.sidebar{font-family:var(--sans-serif-font);height:100vh;overflow:auto;padding:40px;transition:transform .25s ease-out;width:300px}.sidebar .sidebar-nav{line-height:2em;padding-bottom:40px}.sidebar li{margin:6px 0 6px 15px}.sidebar ul{margin:0;padding:0}.sidebar ul ul{margin-left:15px}.sidebar ul,.sidebar ul li{list-style:none}.sidebar ul li a{color:var(--gray8);display:block;font-size:14px;text-decoration:none}.sidebar ul li a:hover{text-decoration:underline}.sidebar ul li a:focus-visible{text-decoration:underline}.sidebar ul li.active>a{border-right:2px solid var(--primary-color);color:var(--primary-color);font-weight:700}.sidebar::-webkit-scrollbar{width:4px}.sidebar::-webkit-scrollbar-thumb{background:transparent;border-radius:4px}.sidebar:hover::-webkit-scrollbar-thumb{background:hsla(0,0%,53%,.4)}.sidebar:focus-visible::-webkit-scrollbar-thumb{background:hsla(0,0%,53%,.4)}.sidebar:hover::-webkit-scrollbar-track{background:hsla(0,0%,53%,.1)}.sidebar:focus-visible::-webkit-scrollbar-track{background:hsla(0,0%,53%,.1)}body.sticky .sidebar,body.sticky .sidebar-toggle{position:fixed}.content{bottom:0;left:300px;padding-top:60px;position:absolute;right:0;top:0;transition:left .25s ease}.markdown-section{margin:0 auto;max-width:800px;padding:30px 15px 40px;position:relative}.markdown-section>*{box-sizing:border-box;font-size:inherit}.markdown-section>:first-child{margin-top:0!important}.markdown-section table{border-collapse:collapse;border-spacing:0;display:block;max-width:100%;overflow:auto;width:max-content}.markdown-section table thead tr{text-align:left}.markdown-section td,.markdown-section th{border:1px solid var(--border-color);padding:.5rem}@media print{.github-corner,.sidebar,.sidebar-toggle{display:none}}@media screen and (max-width:768px){.github-corner,.sidebar{position:fixed}.sidebar,.sidebar-toggle{display:none}main{height:auto;overflow-x:hidden}.content{left:0;max-width:100vw;padding-top:20px;position:static;transition:transform .25s ease}.github-corner:hover .octo-arm{animation:none}.github-corner:focus-visible .octo-arm{animation:none}}.sidebar,body{background-color:var(--bg-color);color:var(--primary-color)}.markdown-section :is(h1,h2,h3,h4,h5){font-family:var(--serif-font)}.markdown-section :is(h1,h2,h3,h4,h5) a:hover:after{content:"#";display:inline-block;margin-left:6px;position:relative}.markdown-section :is(h1,h2,h3,h4,h5) a:focus-visible:after{content:"#";display:inline-block;margin-left:6px;position:relative}.markdown-section a{color:var(--primary-color);font-weight:700;text-decoration:none}.markdown-section :is(li,p,td) a{color:var(--secondary-color)}.markdown-section :is(li,p) a:hover{text-decoration:underline;text-underline-offset:2px}.markdown-section :is(li,p) a:focus-visible{text-decoration:underline;text-underline-offset:2px}.markdown-section h1{font-size:2rem;margin:4rem 0 1rem}.markdown-section h2{font-size:1.75rem;margin:3.5rem 0 1rem}.markdown-section h3{font-size:1.5rem;margin:3rem 0 1rem}.markdown-section h4{font-size:1.25rem;margin:2.5rem 0 1rem}.markdown-section h5{font-size:1rem}.markdown-section p{margin:1.2em 0}.markdown-section :is(p,ul){line-height:1.8rem;word-spacing:.05rem}.markdown-section ul li{margin-bottom:10px}.markdown-section ul{padding-left:2rem}.markdown-section blockquote{border-left:4px solid var(--primary-color);margin:2em 0;padding-left:20px}.markdown-section blockquote p{margin-left:0;padding:12px 0}.markdown-section :is(code,pre,img){border-radius:4px}.markdown-section code{border:1px solid var(--border-color);font-family:var(--code-font);font-size:.75rem;padding:3px 5px;white-space:nowrap}.markdown-section pre{border:1px solid var(--border-color);line-height:1.5rem;margin:1.2em 0;overflow:auto;padding:0 .7rem;position:relative;word-wrap:normal}.markdown-section pre:after{color:var(--gray6);content:attr(data-lang);font-size:.6rem;height:15px;line-height:15px;padding:5px 10px 0;position:absolute;right:0;text-align:right;top:0}.markdown-section :is(pre,pre>code){-moz-osx-font-smoothing:initial;-webkit-font-smoothing:initial}.markdown-section pre>code{border:0;display:block;font-family:var(--code-font);font-size:.8rem;line-height:inherit;margin:0 2px;max-width:inherit;overflow:inherit;padding:1.25em 5px;white-space:inherit}.markdown-section :is(code:after,code:before){letter-spacing:.8px;letter-spacing:.05rem}.token.keyword{color:#ff0078;font-weight:bolder}.token:is(.class-name,.function,.number){color:var(--blue)}.token.string{color:#028265}.token:is(.boolean,.constant){color:var(--red)}.token.comment{color:var(--gray7)}@keyframes a{0%,to{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}.github-corner svg{border-bottom:0;position:fixed;right:0;text-decoration:none;top:0;z-index:1}.github-corner:hover svg .octo-arm{animation:a .56s ease-in-out;opacity:1}.github-corner:focus-visible svg .octo-arm{animation:a .56s ease-in-out;opacity:1}.github-corner svg{color:#fff;fill:#000;height:80px;width:80px} \ No newline at end of file