/* Components and utilities that are good candidates for extraction to StyleKit. */ .border-2 { border-width: 2px; } .border-background { border-color: var(--sn-stylekit-background-color); } .border-transparent { border-color: transparent; } .border-info { border-color: var(--sn-stylekit-info-color); } .bg-clip-padding { background-clip: padding-box; } .bg-secondary-contrast { background-color: var(--sn-stylekit-secondary-contrast-background-color); } .bg-transparent { background-color: transparent; } .focus-within\:border-background:focus-within { border-color: var(--sn-stylekit-background-color); } .grid { display: grid; } .justify-start { justify-content: flex-start; } .my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; } .py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; } .outline-none { outline: none; } .color-foreground { color: var(--sn-stylekit-foreground-color); } .ring-info { box-shadow: 0 0 0 2px var(--sn-stylekit-info-color); } .inner-ring-info { box-shadow: inset 0 0 0 2px var(--sn-stylekit-info-color); } .focus\:inner-ring-info:focus { @extend .inner-ring-info; } .focus\:ring-info:focus { @extend .ring-info; } .focus-within\:ring-info:focus-within { @extend .ring-info; } .text-left { text-align: left; } .text-3xl { font-size: 1.875rem; line-height: 2.25rem; } .w-32px { width: 32px; } .max-w-60 { max-width: 15rem; } .max-w-265px { max-width: 265px; } .h-1px { height: 1px; } .h-10 { height: 2.5rem; } .max-h-80 { max-height: 20rem; } .overflow-y-scroll { overflow-y: scroll; } /** * A button that is just an icon. Separated from .sn-button because there * is almost no style overlap. */ .sn-icon-button { @extend .border-2; @extend .border-transparent; @extend .bg-clip-padding; @extend .m-0; @extend .p-0; @extend .bg-transparent; @extend .cursor-pointer; @extend .rounded-full; @extend .color-neutral; @extend .focus\:outline-none; @extend .focus\:ring-info; } .sn-dropdown { @extend .absolute; @extend .bg-default; @extend .min-w-80; @extend .transition-transform; @extend .duration-150; @extend .slide-down-animation; @extend .rounded; @extend .box-shadow; z-index: $z-index-dropdown-menu; &.sn-dropdown-anchor-right { right: 0; } &[data-state='collapsed'] { display: none; } } $switch-width: 35px; $switch-handle-size: 14px; $border-width: 2px; /** Lesser specificity will give priority to reach's styles */ [data-reach-custom-checkbox-container].sn-switch { @extend .duration-150; @extend .ease-out; @extend .rounded-full; @extend .transition-background; @extend .bg-clip-padding; @extend .cursor-pointer; @extend .border-transparent; width: $switch-width; height: 22px; border-style: solid; border-width: $border-width; @extend .focus-within\:ring-info; @extend .focus-within\:outline-none; @extend .focus-within\:border-background; } .sn-switch-handle { @extend .absolute; @extend .block; @extend .bg-default; @extend .rounded-full; @extend .ease-out; @extend .transition-transform; @extend .duration-150; left: $border-width; width: $switch-handle-size; height: $switch-handle-size; top: 50%; transform: translate(0px, -50%); &.sn-switch-handle-right { transform: translate( $switch-width - $switch-handle-size - ($border-width * 4), -50% ); } } .sn-component .sk-app-bar .sk-app-bar-item { justify-content: flex-start; }