X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fassets%2Fstyle.css;h=0db60927435bdb5532c2826b2cf3c88b85fc5b5a;hb=124119cf66af88a8583aef7ff2e41b855b0a8937;hp=958d2c263e0ca64f530c8de1a8c95b88dfb66243;hpb=a76fac14098cf2138cf8d6997ac7c89d8c3ae508;p=poolifier.git diff --git a/docs/assets/style.css b/docs/assets/style.css index 958d2c26..0db60927 100644 --- a/docs/assets/style.css +++ b/docs/assets/style.css @@ -2,6 +2,8 @@ /* Light */ --light-color-background: #f2f4f8; --light-color-background-secondary: #eff0f1; + --light-color-warning-text: #222; + --light-color-background-warning: #e6e600; --light-color-icon-background: var(--light-color-background); --light-color-accent: #c5c7c9; --light-color-text: #222; @@ -21,6 +23,8 @@ /* Dark */ --dark-color-background: #2b2e33; --dark-color-background-secondary: #1e2024; + --dark-color-background-warning: #bebe00; + --dark-color-warning-text: #222; --dark-color-icon-background: var(--dark-color-background-secondary); --dark-color-accent: #9096a2; --dark-color-text: #f5f5f5; @@ -42,6 +46,8 @@ :root { --color-background: var(--light-color-background); --color-background-secondary: var(--light-color-background-secondary); + --color-background-warning: var(--light-color-background-warning); + --color-warning-text: var(--light-color-warning-text); --color-icon-background: var(--light-color-icon-background); --color-accent: var(--light-color-accent); --color-text: var(--light-color-text); @@ -64,6 +70,8 @@ :root { --color-background: var(--dark-color-background); --color-background-secondary: var(--dark-color-background-secondary); + --color-background-warning: var(--dark-color-background-warning); + --color-warning-text: var(--dark-color-warning-text); --color-icon-background: var(--dark-color-icon-background); --color-accent: var(--dark-color-accent); --color-text: var(--dark-color-text); @@ -93,6 +101,8 @@ body { :root[data-theme="light"] { --color-background: var(--light-color-background); --color-background-secondary: var(--light-color-background-secondary); + --color-background-warning: var(--light-color-background-warning); + --color-warning-text: var(--light-color-warning-text); --color-icon-background: var(--light-color-icon-background); --color-accent: var(--light-color-accent); --color-text: var(--light-color-text); @@ -113,6 +123,8 @@ body { :root[data-theme="dark"] { --color-background: var(--dark-color-background); --color-background-secondary: var(--dark-color-background-secondary); + --color-background-warning: var(--dark-color-background-warning); + --color-warning-text: var(--dark-color-warning-text); --color-icon-background: var(--dark-color-icon-background); --color-accent: var(--dark-color-accent); --color-text: var(--dark-color-text); @@ -130,6 +142,11 @@ body { --color-scheme: var(--dark-color-scheme); } +.always-visible, +.always-visible .tsd-signatures { + display: inherit !important; +} + h1, h2, h3, @@ -191,26 +208,10 @@ dd { } .container { - max-width: 1600px; + max-width: 1700px; padding: 0 2rem; } -@media (min-width: 640px) { - .container { - padding: 0 4rem; - } -} -@media (min-width: 1200px) { - .container { - padding: 0 8rem; - } -} -@media (min-width: 1600px) { - .container { - padding: 0 12rem; - } -} - /* Footer */ .tsd-generator { border-top: 1px solid var(--color-accent); @@ -226,26 +227,9 @@ dd { } .container-main { - display: flex; - justify-content: space-between; - position: relative; margin: 0 auto; -} - -.col-4, -.col-8 { - box-sizing: border-box; - float: left; - padding: 2rem 1rem; -} - -.col-4 { - flex: 0 0 25%; -} -.col-8 { - flex: 1 0; - flex-wrap: wrap; - padding-left: 0; + /* toolbar, footer, margin */ + min-height: calc(100vh - 41px - 56px - 4rem); } @keyframes fade-in { @@ -288,22 +272,6 @@ dd { opacity: 0; } } -@keyframes shift-to-left { - from { - transform: translate(0, 0); - } - to { - transform: translate(-25%, 0); - } -} -@keyframes unshift-to-left { - from { - transform: translate(-25%, 0); - } - to { - transform: translate(0, 0); - } -} @keyframes pop-in-from-right { from { transform: translate(100%, 0); @@ -392,92 +360,6 @@ blockquote { margin: 1em 0; } -@media (max-width: 1024px) { - html .col-content { - float: none; - max-width: 100%; - width: 100%; - padding-top: 3rem; - } - html .col-menu { - position: fixed !important; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - z-index: 1024; - top: 0 !important; - bottom: 0 !important; - left: auto !important; - right: 0 !important; - padding: 1.5rem 1.5rem 0 0; - max-width: 25rem; - visibility: hidden; - background-color: var(--color-background); - transform: translate(100%, 0); - } - html .col-menu > *:last-child { - padding-bottom: 20px; - } - html .overlay { - content: ""; - display: block; - position: fixed; - z-index: 1023; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: rgba(0, 0, 0, 0.75); - visibility: hidden; - } - - .to-has-menu .overlay { - animation: fade-in 0.4s; - } - - .to-has-menu :is(header, footer, .col-content) { - animation: shift-to-left 0.4s; - } - - .to-has-menu .col-menu { - animation: pop-in-from-right 0.4s; - } - - .from-has-menu .overlay { - animation: fade-out 0.4s; - } - - .from-has-menu :is(header, footer, .col-content) { - animation: unshift-to-left 0.4s; - } - - .from-has-menu .col-menu { - animation: pop-out-to-right 0.4s; - } - - .has-menu body { - overflow: hidden; - } - .has-menu .overlay { - visibility: visible; - } - .has-menu :is(header, footer, .col-content) { - transform: translate(-25%, 0); - } - .has-menu .col-menu { - visibility: visible; - transform: translate(0, 0); - display: grid; - align-items: center; - grid-template-rows: auto 1fr; - grid-gap: 1.5rem; - max-height: 100vh; - padding: 1rem 2rem; - } - .has-menu .tsd-navigation { - max-height: 100%; - } -} - .tsd-breadcrumb { margin: 0; padding: 0; @@ -707,7 +589,7 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { } .tsd-anchor { - position: absolute; + position: relative; top: -100px; } @@ -737,117 +619,85 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { color: var(--color-ts-private); } -.tsd-navigation a { - display: block; - margin: 0.4rem 0; - border-left: 2px solid transparent; +.tsd-navigation.settings { + margin: 1rem 0; +} +.tsd-navigation a, +.tsd-page-navigation a { + display: inline-flex; + align-items: center; + padding: 0.25rem 0; color: var(--color-text); text-decoration: none; - transition: border-left-color 0.1s; } -.tsd-navigation a:hover { +.tsd-navigation a { + /* why 3rem? No idea, but it seems to work. */ + width: calc(100% - 3rem); +} +.tsd-page-navigation a { + /* why is this different? */ + width: 100%; +} +.tsd-navigation a.current, +.tsd-page-navigation a.current { + background: var(--color-accent); +} +.tsd-navigation a:hover, +.tsd-page-navigation a:hover { text-decoration: underline; } -.tsd-navigation ul { +.tsd-navigation ul, +.tsd-page-navigation ul { margin: 0; padding: 0; list-style: none; } -.tsd-navigation li { +.tsd-navigation li, +.tsd-page-navigation li { padding: 0; + max-width: 100%; } - -.tsd-navigation.primary .tsd-accordion-details > ul { - margin-top: 0.75rem; -} -.tsd-navigation.primary a { - padding: 0.75rem 0.5rem; - margin: 0; +.tsd-nested-navigation > li > a { + margin-left: 3rem; } -.tsd-navigation.primary ul li a { - margin-left: 0.5rem; -} -.tsd-navigation.primary ul li li a { +.tsd-nested-navigation > li > details { margin-left: 1.5rem; } -.tsd-navigation.primary ul li li li a { - margin-left: 2.5rem; -} -.tsd-navigation.primary ul li li li li a { - margin-left: 3.5rem; -} -.tsd-navigation.primary ul li li li li li a { - margin-left: 4.5rem; -} -.tsd-navigation.primary ul li li li li li li a { - margin-left: 5.5rem; -} -.tsd-navigation.primary li.current > a { - border-left: 0.15rem var(--color-text) solid; -} -.tsd-navigation.primary li.selected > a { - font-weight: bold; - border-left: 0.2rem var(--color-text) solid; +.tsd-small-nested-navigation > li > a { + margin-left: 1.5rem; } -.tsd-navigation.primary ul li a:hover { - border-left: 0.2rem var(--color-text-aside) solid; +.tsd-small-nested-navigation > li > details { + margin-left: 0; } -.tsd-navigation.primary li.globals + li > span, -.tsd-navigation.primary li.globals + li > a { - padding-top: 20px; +.tsd-page-navigation ul { + padding-left: 1.75rem; } -.tsd-navigation.secondary.tsd-navigation--toolbar-hide { - max-height: calc(100vh - 1rem); - top: 0.5rem; -} -.tsd-navigation.secondary > ul { - display: inline; - padding-right: 0.5rem; - transition: opacity 0.2s; -} -.tsd-navigation.secondary ul li a { - padding-left: 0; -} -.tsd-navigation.secondary ul li li a { - padding-left: 1.1rem; -} -.tsd-navigation.secondary ul li li li a { - padding-left: 2.2rem; -} -.tsd-navigation.secondary ul li li li li a { - padding-left: 3.3rem; -} -.tsd-navigation.secondary ul li li li li li a { - padding-left: 4.4rem; +#tsd-sidebar-links a { + margin-top: 0; + margin-bottom: 0.5rem; + line-height: 1.25rem; } -.tsd-navigation.secondary ul li li li li li li a { - padding-left: 5.5rem; +#tsd-sidebar-links a:last-of-type { + margin-bottom: 0; } a.tsd-index-link { - margin: 0.25rem 0; + padding: 0.25rem 0 !important; font-size: 1rem; line-height: 1.25rem; display: inline-flex; align-items: center; } -.tsd-accordion-summary > h1, -.tsd-accordion-summary > h2, -.tsd-accordion-summary > h3, -.tsd-accordion-summary > h4, -.tsd-accordion-summary > h5 { - display: inline-flex; - align-items: center; - vertical-align: middle; - margin-bottom: 0; +.tsd-accordion-summary, +.tsd-accordion-summary a { user-select: none; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; -} -.tsd-accordion-summary { - display: block; + + display: flex; + align-items: center; cursor: pointer; } .tsd-accordion-summary > * { @@ -885,34 +735,6 @@ a.tsd-index-link { margin-right: 0.8rem; } -@media (min-width: 1024px) { - .col-content { - margin: 2rem auto; - } - - .menu-sticky-wrap { - position: sticky; - height: calc(100vh - 2rem); - top: 4rem; - right: 0; - padding: 0 1.5rem; - padding-top: 1rem; - margin-top: 3rem; - transition: 0.3s ease-in-out; - transition-property: top, padding-top, padding, height; - overflow-y: auto; - } - .col-menu { - border-left: 1px solid var(--color-accent); - } - .col-menu--hide { - top: 1rem; - } - .col-menu .tsd-navigation:not(:last-child) { - padding-bottom: 1.75rem; - } -} - .tsd-panel { margin-bottom: 2.5rem; } @@ -978,7 +800,8 @@ a.tsd-index-link { right: -40px; } #tsd-search .field input, -#tsd-search .title { +#tsd-search .title, +#tsd-toolbar-links a { transition: opacity 0.2s; } #tsd-search .results { @@ -1022,7 +845,8 @@ a.tsd-index-link { top: 0; opacity: 1; } -#tsd-search.has-focus .title { +#tsd-search.has-focus .title, +#tsd-search.has-focus #tsd-toolbar-links a { z-index: 0; opacity: 0; } @@ -1036,6 +860,22 @@ a.tsd-index-link { display: block; } +#tsd-toolbar-links { + position: absolute; + top: 0; + right: 2rem; + height: 100%; + display: flex; + align-items: center; + justify-content: flex-end; +} +#tsd-toolbar-links a { + margin-left: 1.5rem; +} +#tsd-toolbar-links a:hover { + text-decoration: underline; +} + .tsd-signature { margin: 0 0 1rem 0; padding: 1rem 0.5rem; @@ -1100,7 +940,7 @@ ul.tsd-type-parameter-list h5 { } .tsd-page-toolbar { - position: fixed; + position: sticky; z-index: 1; top: 0; left: 0; @@ -1134,9 +974,10 @@ ul.tsd-type-parameter-list h5 { .tsd-page-toolbar .table-cell:first-child { width: 100%; } - -.tsd-page-toolbar--hide { - transform: translateY(-100%); +.tsd-page-toolbar .tsd-toolbar-icon { + box-sizing: border-box; + line-height: 0; + padding: 12px 0; } .tsd-widget { @@ -1166,12 +1007,6 @@ ul.tsd-type-parameter-list h5 { .tsd-widget.menu { display: none; } -@media (max-width: 1024px) { - .tsd-widget.options, - .tsd-widget.menu { - display: inline-block; - } -} input[type="checkbox"] + .tsd-widget:before { background-position: -120px 0; } @@ -1205,6 +1040,12 @@ img { text-decoration: line-through; } +.warning { + padding: 1rem; + color: var(--color-warning-text); + background: var(--color-background-warning); +} + * { scrollbar-width: thin; scrollbar-color: var(--color-accent) var(--color-icon-background); @@ -1223,3 +1064,144 @@ img { border-radius: 999rem; border: 0.25rem solid var(--color-icon-background); } + +/* mobile */ +@media (max-width: 769px) { + .tsd-widget.options, + .tsd-widget.menu { + display: inline-block; + } + + .container-main { + display: flex; + } + html .col-content { + float: none; + max-width: 100%; + width: 100%; + } + html .col-sidebar { + position: fixed !important; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + z-index: 1024; + top: 0 !important; + bottom: 0 !important; + left: auto !important; + right: 0 !important; + padding: 1.5rem 1.5rem 0 0; + width: 75vw; + visibility: hidden; + background-color: var(--color-background); + transform: translate(100%, 0); + } + html .col-sidebar > *:last-child { + padding-bottom: 20px; + } + html .overlay { + content: ""; + display: block; + position: fixed; + z-index: 1023; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.75); + visibility: hidden; + } + + .to-has-menu .overlay { + animation: fade-in 0.4s; + } + + .to-has-menu .col-sidebar { + animation: pop-in-from-right 0.4s; + } + + .from-has-menu .overlay { + animation: fade-out 0.4s; + } + + .from-has-menu .col-sidebar { + animation: pop-out-to-right 0.4s; + } + + .has-menu body { + overflow: hidden; + } + .has-menu .overlay { + visibility: visible; + } + .has-menu .col-sidebar { + visibility: visible; + transform: translate(0, 0); + display: flex; + flex-direction: column; + gap: 1.5rem; + max-height: 100vh; + padding: 1rem 2rem; + } + .has-menu .tsd-navigation { + max-height: 100%; + } +} + +/* one sidebar */ +@media (min-width: 770px) { + .container-main { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); + grid-template-areas: "sidebar content"; + margin: 2rem auto; + } + + .col-sidebar { + grid-area: sidebar; + } + .col-content { + grid-area: content; + padding: 0 1rem; + } +} +@media (min-width: 770px) and (max-width: 1399px) { + .col-sidebar { + max-height: calc(100vh - 2rem - 42px); + overflow: auto; + position: sticky; + top: 42px; + padding-top: 1rem; + } +} + +/* two sidebars */ +@media (min-width: 1200px) { + .container-main { + grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr) minmax(0, 20rem); + grid-template-areas: "sidebar content toc"; + } + + .col-sidebar { + display: contents; + } + + .page-menu { + grid-area: toc; + padding-left: 1rem; + } + .site-menu { + grid-area: sidebar; + } + + .site-menu { + margin-top: 1rem 0; + } + + .page-menu, + .site-menu { + max-height: calc(100vh - 2rem - 42px); + overflow: auto; + position: sticky; + top: 42px; + } +}