UNPKG

kompendium

Version:

Documentation generator for Stencil components

141 lines (136 loc) 3.9 kB
:host { --toggle-size: 1.25rem; } :host * { box-sizing: border-box; } .mode-toggle { margin: 0.75rem; position: relative; width: var(--toggle-size); height: var(--toggle-size); transition: opacity 0.3s ease; opacity: 0.7; } .mode-toggle:hover { opacity: 1; } .mode-visualization { pointer-events: none; position: absolute; width: var(--toggle-size); height: var(--toggle-size); } .circle { transition: background-color 0.6s ease; border-radius: 50%; width: var(--toggle-size); height: var(--toggle-size); overflow: hidden; display: flex; align-items: center; justify-content: center; transform: translate3d(0, 0, 0); } .circle:after { transition: transform 0.7s ease, background-color 0.4s ease; content: ""; display: block; border-radius: 50%; width: calc(var(--toggle-size) - 0.25rem); height: calc(var(--toggle-size) - 0.25rem); } .ray { transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.37, -0.03, 0.4, 1.18); position: absolute; top: 0; left: 0; width: var(--toggle-size); height: var(--toggle-size); } .ray:before, .ray:after { content: ""; display: block; height: 0.375rem; width: 0.125rem; border-radius: var(--toggle-size); background-color: rgba(var(--kompendium-color-orange-light), 1); position: absolute; left: 0; right: 0; margin: auto; } .ray:before { top: -0.5rem; } .ray:after { bottom: -0.5rem; } .ray.three:before, .ray.three:after, .ray.four:before, .ray.four:after { height: 0.25rem; } input[type=checkbox] { -webkit-appearance: none; position: absolute; width: 100%; height: 100%; margin: 0; cursor: pointer; border-radius: 0.125rem; } input[type=checkbox]:focus { outline: none; } input[type=checkbox]:focus-visible { outline: none; box-shadow: var(--kompendium-shadow-depth-8-focused); } input[type=checkbox]:not(:checked) + .mode-visualization .circle { background-color: rgba(var(--kompendium-color-orange-default), 1); box-shadow: 0 0 0.5rem 0.125rem rgba(var(--kompendium-color-orange-light), 0.8), 0 0 0.25rem 0.1875rem rgb(var(--kompendium-color-white)); } input[type=checkbox]:not(:checked) + .mode-visualization .circle:after { background-color: rgba(var(--kompendium-color-orange-default), 1); transform: translate3d(1rem, -1rem, 0); } input[type=checkbox]:not(:checked) + .mode-visualization .ray { opacity: 0.6; } input[type=checkbox]:not(:checked) + .mode-visualization .ray.three, input[type=checkbox]:not(:checked) + .mode-visualization .ray.four { opacity: 0.4; } input[type=checkbox]:not(:checked) + .mode-visualization .ray.one { transform: rotate(0deg) scale(1); } input[type=checkbox]:not(:checked) + .mode-visualization .ray.two { transform: rotate(90deg) scale(1); } input[type=checkbox]:not(:checked) + .mode-visualization .ray.three { transform: rotate(45deg) scale(1); } input[type=checkbox]:not(:checked) + .mode-visualization .ray.four { transform: rotate(-45deg) scale(1); } input[type=checkbox]:checked + .mode-visualization .circle { background-color: rgba(var(--kompendium-contrast-1700), 0.7); box-shadow: 0 0 0.5rem 0.125rem rgba(var(--kompendium-color-white), 0.4), 0 0 0.25rem 0.125rem rgb(var(--kompendium-color-black)); } input[type=checkbox]:checked + .mode-visualization .circle:after { transform: translate3d(0.25rem, -0.25rem, 0); background-color: rgb(var(--kompendium-contrast-400)); } input[type=checkbox]:checked + .mode-visualization .ray { opacity: 0; } input[type=checkbox]:checked + .mode-visualization .ray.one { transform: rotate(60deg) scale(0.5); } input[type=checkbox]:checked + .mode-visualization .ray.two { transform: rotate(150deg) scale(0.5); } input[type=checkbox]:checked + .mode-visualization .ray.three { transform: rotate(105deg) scale(0.5); } input[type=checkbox]:checked + .mode-visualization .ray.four { transform: rotate(15deg) scale(0.5); }