UNPKG

kompendium

Version:

Documentation generator for Stencil components

403 lines (385 loc) 9.92 kB
/* Box sizing rules */ *, *::before, *::after { box-sizing: border-box; } /* Remove default padding */ ul[class], ol[class] { padding: 0; } /* Remove default margin */ body, h1, h2, h3, h4, p, ul[class], ol[class], li, figure, figcaption, blockquote, dl, dd { margin: 0; } /* Remove list styles on ul, ol elements with a class attribute */ ul[class], ol[class] { list-style: none; } /* A elements that don't have a class get default styles */ a:not([class]) { text-decoration-skip-ink: auto; } /* Make images easier to work with */ img { max-width: 100%; } /* Natural flow and rhythm in articles by default */ /* Inherit fonts for inputs and buttons */ input, button, textarea, select { font: inherit; } /* Remove all animations and transitions for people that prefer not to see them */ @media (prefers-reduced-motion: reduce) { * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } } :root { --width-nav-panel: 16rem; } :host { display: block; font-family: var(--kompendium-font-primary); --size-show-nav-panel-button: 2.25rem; } header a { text-decoration: none; color: unset; } .nav-panel-scrim { display: none; z-index: 99; position: fixed; top: 0; right: 0; bottom: 0; left: 0; } .nav-panel { transition: transform 0.44s cubic-bezier(1, 0.12, 0.2, 0.88), background-color 0.3s ease; width: var(--width-nav-panel); height: 100vh; position: fixed; background-color: rgb(var(--kompendium-contrast-400)); display: flex; flex-direction: column; } .nav-panel .panel-header { transition: border 0.3s ease; flex-direction: row; padding: 1rem; border-bottom: 1px solid rgb(var(--kompendium-contrast-600)); margin-bottom: 0.5rem; } .nav-panel .panel-list { overflow-y: auto; list-style: none; } .nav-panel .panel-list:not(.chapters) { padding: 0 0.75rem 2rem 0.75rem; } .nav-panel .panel-list li { margin-left: 0; } .nav-panel .panel-list li::before { content: none; display: none; } .nav-panel.display-nav-panel { z-index: 100; } .branding-and-mode { display: flex; align-items: center; margin-bottom: 0.75rem; } .branding-and-mode h1 { all: unset; font-size: 1rem; font-weight: normal; color: rgb(var(--kompendium-contrast-900)); flex-grow: 1; line-height: 1; } .branding-and-mode a { border-radius: 0.125rem; } .branding-and-mode a:focus { outline: none; } .branding-and-mode a:focus-visible { outline: none; box-shadow: var(--kompendium-shadow-depth-8-focused); } .branding-and-mode kompendium-darkmode-switch { position: relative; flex-shrink: 0; margin-left: 0.75rem; padding-left: 0.5rem; } .branding-and-mode kompendium-darkmode-switch:before { transition: background-color 0.3s ease; content: ""; position: absolute; background-color: rgb(var(--kompendium-contrast-600)); border-radius: 0.5rem; height: 1.25rem; width: 0.125rem; left: 0.0625rem; top: 0; bottom: 0; margin: auto; } .powered-by { position: absolute; bottom: 0; left: 0; font-size: 0.75rem; padding: 0.5rem 0.75rem; background-color: rgba(var(--kompendium-contrast-100), 0.4); backdrop-filter: blur(0.25rem); width: 100%; } .powered-by p { padding-left: 1.75rem; font-size: 0.75rem; background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 148 80" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path fill="none" d="M-.003 0h148v80h-148z"/><path d="M148.008 20c0-11.038-8.96-20-19.999-20H19.977c-11.038 0-20 8.962-20 20v40c0 11.038 8.962 20 20 20H128.01c11.038 0 20-8.962 20-20V20z" fill="rgb(36,71,88)"/><path d="M26.564 43.651v14.604H19.26V43.65h7.304zm0-7.302H19.26V21.745h7.304V36.35z" fill="rgb(255,160,0)"/><path d="M106.82 58.254v-7.303h7.304V43.65h7.304v-7.301h-7.304v-7.303h-7.304v-7.302h7.304v7.302h7.304v7.303h7.293v7.301h-7.293v7.302h-7.304v7.303h-7.304zm-43.812 0v-7.303h7.304V43.65h7.304v-7.301h7.303v-7.303h7.293v-7.302h7.304v7.302h-7.304v7.303H84.92v7.301h-7.303v7.302h-7.304v7.303h-7.304zm-14.597 0v-7.303h-7.304V43.65h-7.304v-7.301h7.304v-7.303h7.304v-7.302h7.293v7.302H48.41v7.303h-7.304v7.301h7.304v7.302h7.293v7.303H48.41z" fill="rgb(0,200,82)"/></svg>'); background-position: left center; background-repeat: no-repeat; background-size: 1.5rem; } .powered-by a { transition: color 0.2s ease; color: rgb(var(--kompendium-color-blue-default)); text-decoration: none; font-size: 0.75rem; } .powered-by a:hover { color: rgb(var(--kompendium-color-blue-light)); } .nav-panel__responsive-menu { transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out; box-shadow: var(--kompendium-button-shadow-normal); } .nav-panel__responsive-menu:hover { box-shadow: var(--kompendium-button-shadow-hovered); } .nav-panel__responsive-menu:active { box-shadow: var(--kompendium-button-shadow-pressed); transform: translate3d(0, 0.08rem, 0); } .nav-panel__responsive-menu:focus { outline: none; } .nav-panel__responsive-menu:focus-visible { outline: none; box-shadow: var(--kompendium-shadow-depth-8-focused); } .nav-panel__responsive-menu { transition: all 0.2s ease; display: none; cursor: pointer; position: absolute; top: 0.75rem; right: calc(var(--size-show-nav-panel-button) * -1 - 1rem); width: var(--size-show-nav-panel-button); height: var(--size-show-nav-panel-button); margin: 0.25rem; border-radius: 50%; text-align: center; font-weight: bold; background-color: rgba(var(--kompendium-contrast-200), 0.7); backdrop-filter: blur(0.25rem); color: rgb(var(--kompendium-contrast-900)); } .nav-panel__responsive-menu span { transition: background-color 0.2s ease, transform 0.2s ease 0.3s, opacity 0.15s ease 0.3s; display: block; position: absolute; left: 0; right: 0; margin: auto; height: 0.125rem; width: 1rem; border-radius: 0.25rem; background-color: rgb(var(--kompendium-contrast-900)); } .nav-panel__responsive-menu span:nth-child(1) { top: 0.75rem; } .nav-panel__responsive-menu span:nth-child(2), .nav-panel__responsive-menu span:nth-child(3) { top: 0; bottom: 0; } .nav-panel__responsive-menu span:nth-child(4) { bottom: 0.75rem; } .nav-panel__responsive-menu:hover span { background-color: rgb(var(--kompendium-contrast-1200)); } @media (max-width: 1000px) { .nav-panel-scrim.display-nav-panel { display: block; } .nav-panel { transform: translate3d(calc(var(--width-nav-panel) * -1), 0, 0); } .nav-panel.display-nav-panel { transform: translate3d(0, 0, 0); box-shadow: 0 0.09375rem 0.225rem 0 rgba(0, 0, 0, 0.232), 0 0.01875rem 0.05625rem 0 rgba(0, 0, 0, 0.208); } .nav-panel.display-nav-panel .nav-panel__responsive-menu { right: calc(var(--size-show-nav-panel-button) * -1 - 0.3125rem); border-radius: 0 0.5rem 0.5rem 0; } .nav-panel.display-nav-panel .nav-panel__responsive-menu span:nth-child(1), .nav-panel.display-nav-panel .nav-panel__responsive-menu span:nth-child(4) { transform: scaleX(0); opacity: 0; } .nav-panel.display-nav-panel .nav-panel__responsive-menu span:nth-child(2) { transform: rotate(45deg); } .nav-panel.display-nav-panel .nav-panel__responsive-menu span:nth-child(3) { transform: rotate(-45deg); } .nav-panel__responsive-menu { display: block; } } .panel-item { transition: opacity 0.2s ease; width: 100%; border-radius: 0.375rem; } .panel-item.active { background-color: rgb(var(--kompendium-contrast-100), 0.5); } .panel-link { display: grid; grid-auto-flow: column; grid-template-columns: 1fr 1.75rem; line-height: 1.75rem; color: rgb(var(--kompendium-contrast-900)); text-decoration: none; border-radius: 0.375rem; } .panel-link:hover, .panel-link.active { color: rgb(var(--kompendium-color-blue-default)); } .panel-link.active svg { transform: scale(0.64) rotate(-90deg); } .panel-link:focus { outline: none; } .panel-link:focus-visible { outline: none; box-shadow: var(--kompendium-shadow-depth-8-focused); } .panel-link svg { visibility: hidden; transition: transform 0.2s ease; transform: scale(0.64) rotate(90deg); height: 2rem; } .panel-link.has-children svg { visibility: visible; } .link-text { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; width: 100%; padding-left: 0.5rem; } .chapters { height: 0; } .chapters > .panel-item { padding: 0 0.5rem; } .chapters:not(.active) { visibility: hidden; } .chapters.active { transition: height 0.2s ease; height: 100%; } .chapters.active .panel-item { opacity: 1; transition-delay: 0.2s; } .chapters.active .panel-item:nth-child(1) { transition-delay: 0s; } .chapters.active .panel-item:nth-child(2) { transition-delay: 0.04s; } .chapters.active .panel-item:nth-child(3) { transition-delay: 0.06s; } .chapters.active .panel-item:nth-child(4) { transition-delay: 0.08s; } .chapters.active .panel-item:nth-child(5) { transition-delay: 0.1s; } .chapters.active .panel-item:nth-child(6) { transition-delay: 0.12s; } .chapters.active .panel-item:nth-child(7) { transition-delay: 0.14s; } .chapters.active .panel-item:nth-child(8) { transition-delay: 0.15s; } .chapters.active .panel-item:nth-child(9) { transition-delay: 0.16s; } .chapters.active .panel-item:nth-child(10) { transition-delay: 0.17s; } .chapters.active .panel-item:nth-child(11) { transition-delay: 0.18s; } .chapters.active .panel-item:nth-child(12) { transition-delay: 0.19s; } .chapters.active .panel-item:last-child { margin-bottom: 0.5rem; } .chapters .panel-link.has-children svg { visibility: hidden; } .chapters .panel-item { opacity: 0; } .chapters .panel-item .chapters { font-size: 0.8125rem; padding-left: 0.5rem; } .chapters .panel-item .chapters:first-child { margin-top: 0.25rem; }