ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.
Python astracloudflarecontrol-panelcyberpaneldnsfablehosting-control-panelhosting-panelkimi-k3server-managementserverkitubuntu-web-panelwebserver
// ============================================
// SERVERKIT DESIGN SYSTEM - MIXINS
// ============================================
// --------------------------------------------
// COMPATIBILITY FUNCTION: fade()
// Compatibility: LESS fade(color, N%) = color at N% opacity
// --------------------------------------------
@function fade($color, $amount) {
// Strip the % unit and convert to 0-1 range for rgba alpha
@if unit($amount) == '%' {
@return rgba($color, $amount / 100%);
} @else {
@return rgba($color, $amount / 100);
}
}
// --------------------------------------------
// FLEXBOX
// --------------------------------------------
@mixin flex-center() {
display: flex;
align-items: center;
justify-content: center;
}
@mixin flex-between() {
display: flex;
align-items: center;
justify-content: space-between;
}
@mixin flex-start() {
display: flex;
align-items: center;
justify-content: flex-start;
}
@mixin flex-column() {
display: flex;
flex-direction: column;
}
@mixin flex-column-gap($gap) {
display: flex;
flex-direction: column;
gap: $gap;
}
// --------------------------------------------
// TRUNCATE
// --------------------------------------------
@mixin truncate() {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
// --------------------------------------------
// TRANSITIONS
// --------------------------------------------
@mixin transition($property: all) {
transition: $property $transition-base;
}
@mixin transition-fast($property: all) {
transition: $property $transition-fast;
}
// --------------------------------------------
// CARDS & CONTAINERS
// --------------------------------------------
@mixin card-base() {
background-color: $bg-card;
border: 1px solid $border-subtle;
border-radius: $radius-overlay;
@include transition(border-color);
&:hover {
border-color: $border-active;
}
}
@mixin card-interactive() {
@include card-base();
cursor: pointer;
&:hover {
transform: translateY(-2px);
}
}
// --------------------------------------------
// INPUTS
// --------------------------------------------
@mixin input-base() {
width: 100%;
padding: $space-3 $space-4;
background: $bg-body;
border: 1px solid $border-default;
border-radius: $radius-card;
color: $text-primary;
font-size: $text-base;
@include transition(border-color);
&:focus {
border-color: $accent-primary;
outline: none;
}
&::placeholder {
color: $text-tertiary;
}
}
// --------------------------------------------
// BUTTONS
// --------------------------------------------
@mixin button-base() {
display: inline-flex;
align-items: center;
gap: $space-2;
padding: $space-2 $space-5;
border-radius: $radius-card;
border: 1px solid transparent;
font-size: $text-sm;
font-weight: $font-weight-medium;
cursor: pointer;
@include transition();
background: none;
&:disabled {
opacity: 0.6;
cursor: not-allowed;
}
}
// --------------------------------------------
// ICON CONTAINERS
// --------------------------------------------
@mixin icon-box($size: 40px) {
width: $size;
height: $size;
border-radius: $radius-card;
@include flex-center();
flex-shrink: 0;
}
// --------------------------------------------
// STATUS INDICATORS
// --------------------------------------------
@mixin status-dot($color) {
width: 6px;
height: 6px;
background: $color;
border-radius: $radius-full;
}
// --------------------------------------------
// LIST ITEMS
// --------------------------------------------
@mixin list-item-base() {
display: flex;
align-items: center;
gap: $space-5;
padding: $space-4 $space-5;
@include card-base();
}
// --------------------------------------------
// RESPONSIVE
// --------------------------------------------
@mixin respond-to($breakpoint) {
@media (max-width: $breakpoint) {
@content;
}
}
// --------------------------------------------
// SCROLLBAR
// --------------------------------------------
@mixin custom-scrollbar() {
&::-webkit-scrollbar {
width: 6px;
height: 6px;
}
&::-webkit-scrollbar-track {
background: var(--scrollbar-track, #0a0b0e);
}
&::-webkit-scrollbar-thumb {
background: $border-active;
border-radius: $radius-badge;
&:hover {
background: $text-tertiary;
}
}
}
// --------------------------------------------
// FOCUS RING
// --------------------------------------------
@mixin focus-ring() {
&:focus-visible {
outline: 2px solid $accent-primary;
outline-offset: 2px;
}
}
// --------------------------------------------
// CODE/MONO
// --------------------------------------------
@mixin mono-text() {
font-family: $font-mono;
font-size: $text-xs;
}
@mixin code-block() {
background: $bg-body;
border: 1px solid $border-subtle;
border-radius: $radius-card;
padding: $space-4;
@include mono-text();
@include custom-scrollbar();
}
// ============================================
// STATUS VARIANT
// ============================================
// The ONE shape for coloring a status-bearing element. Pages position the
// element and pass tones through this door; a convention change (adding a
// border, tweaking bg alpha, a focus ring) lands here once instead of in the
// ~83 re-rolled color/background/border blocks it replaces. New status
// styling MUST use this (ratchet: npm run lint -> check-status-scss).
@mixin status-variant($color, $bg: null, $border: null) {
color: $color;
@if $bg != null { background: $bg; }
@if $border != null { border-color: $border; }
}