289 lines
4.3 KiB
SCSS
289 lines
4.3 KiB
SCSS
/* Components and utilities that are good candidates for extraction to StyleKit. */
|
|
|
|
.border-2 {
|
|
border-width: 2px;
|
|
}
|
|
|
|
.border-b-1 {
|
|
border-bottom-width: 1px;
|
|
}
|
|
|
|
.border-background {
|
|
border-color: var(--sn-stylekit-background-color);
|
|
}
|
|
|
|
.border-transparent {
|
|
border-color: transparent;
|
|
}
|
|
|
|
.border-info {
|
|
border-color: var(--sn-stylekit-info-color);
|
|
}
|
|
|
|
.border-neutral {
|
|
border-color: var(--sn-stylekit-neutral-color);
|
|
}
|
|
|
|
.bg-border {
|
|
background-color: var(--sn-stylekit-border-color);
|
|
}
|
|
|
|
.bg-clip-padding {
|
|
background-clip: padding-box;
|
|
}
|
|
|
|
.bg-neutral {
|
|
background-color: var(--sn-stylekit-neutral-color);
|
|
}
|
|
|
|
.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);
|
|
}
|
|
|
|
.color-danger {
|
|
color: var(--sn-stylekit-danger-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\:bg-contrast:focus {
|
|
@extend .bg-contrast;
|
|
}
|
|
|
|
.hover\:color-text:hover {
|
|
@extend .color-text;
|
|
}
|
|
|
|
.focus\:color-text:focus {
|
|
@extend .color-text;
|
|
}
|
|
|
|
.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-3\.5 {
|
|
width: 0.875rem;
|
|
}
|
|
|
|
.w-5 {
|
|
width: 1.25rem;
|
|
}
|
|
|
|
.w-8 {
|
|
width: 2rem;
|
|
}
|
|
|
|
.max-w-60 {
|
|
max-width: 15rem;
|
|
}
|
|
|
|
.max-w-80 {
|
|
max-width: 20rem;
|
|
}
|
|
|
|
.h-1px {
|
|
height: 1px;
|
|
}
|
|
|
|
.h-3\.5 {
|
|
height: 0.875rem;
|
|
}
|
|
|
|
.h-4\.5 {
|
|
height: 1.125rem;
|
|
}
|
|
|
|
.h-5 {
|
|
height: 1.25rem;
|
|
}
|
|
|
|
.h-8 {
|
|
height: 2rem;
|
|
}
|
|
|
|
.h-10 {
|
|
height: 2.5rem;
|
|
}
|
|
|
|
.max-h-120 {
|
|
max-height: 30rem;
|
|
}
|
|
|
|
.fixed {
|
|
position: fixed;
|
|
}
|
|
|
|
.overflow-y-scroll {
|
|
overflow-y: scroll;
|
|
}
|
|
|
|
.items-start {
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.whitespace-nowrap {
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.overflow-hidden {
|
|
overflow: hidden;
|
|
}
|
|
|
|
.overflow-ellipsis {
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
/**
|
|
* A button that is just an icon. Separated from .sn-button because there
|
|
* is almost no style overlap.
|
|
*/
|
|
.sn-icon-button {
|
|
@extend .w-8;
|
|
@extend .h-8;
|
|
@extend .flex;
|
|
@extend .justify-center;
|
|
@extend .items-center;
|
|
@extend .border-solid;
|
|
@extend .border-1;
|
|
@extend .border-neutral;
|
|
@extend .bg-clip-padding;
|
|
@extend .m-0;
|
|
@extend .p-0;
|
|
@extend .bg-transparent;
|
|
@extend .cursor-pointer;
|
|
@extend .rounded-full;
|
|
@extend .color-neutral;
|
|
@extend .hover\:color-text;
|
|
@extend .focus\:color-text;
|
|
@extend .hover\:bg-contrast;
|
|
@extend .focus\:bg-contrast;
|
|
@extend .focus\:outline-none;
|
|
@extend .focus\:ring-info;
|
|
}
|
|
|
|
.sn-icon {
|
|
@extend .h-5;
|
|
@extend .w-5;
|
|
@extend .fill-current;
|
|
}
|
|
|
|
.sn-dropdown {
|
|
@extend .bg-default;
|
|
@extend .min-w-80;
|
|
@extend .rounded;
|
|
@extend .box-shadow;
|
|
|
|
z-index: $z-index-dropdown-menu;
|
|
|
|
&.sn-dropdown--anchor-right {
|
|
right: 0;
|
|
}
|
|
|
|
&[data-state='collapsed'] {
|
|
display: none;
|
|
}
|
|
|
|
&.sn-dropdown--animated {
|
|
@extend .transition-transform;
|
|
@extend .duration-150;
|
|
@extend .slide-down-animation;
|
|
}
|
|
}
|
|
|
|
/** 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;
|
|
@extend .w-8;
|
|
@extend .h-4\.5;
|
|
@extend .border-2;
|
|
@extend .border-solid;
|
|
@extend .focus-within\:ring-info;
|
|
@extend .focus-within\:outline-none;
|
|
@extend .focus-within\:border-background;
|
|
box-sizing: content-box;
|
|
}
|
|
|
|
.sn-switch-handle {
|
|
@extend .absolute;
|
|
@extend .block;
|
|
@extend .bg-default;
|
|
@extend .rounded-full;
|
|
|
|
@extend .ease-out;
|
|
@extend .transition-transform;
|
|
@extend .duration-150;
|
|
|
|
left: 2px;
|
|
@extend .w-3\.5;
|
|
@extend .h-3\.5;
|
|
top: 50%;
|
|
transform: translate(0px, -50%);
|
|
|
|
&.sn-switch-handle-right {
|
|
transform: translate(
|
|
calc(2rem - 1.125rem),
|
|
-50%
|
|
);
|
|
}
|
|
}
|
|
|
|
.sn-component .sk-app-bar .sk-app-bar-item {
|
|
justify-content: flex-start;
|
|
}
|