mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-24 05:48:59 +08:00
2414aa5848
#### PR Dependency Tree * **PR #14485** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Admin static assets now served under /admin for self-hosted installs * CLI is directly executable from the command line * Build tooling supports a configurable self-hosted public path * Updated admin package script for adding UI components * Added a PostCSS dependency and plugin to the build toolchain for admin builds * **Style** * Switched queue module to a local queuedash stylesheet, added queuedash Tailwind layer, and scoped queuedash styles for the admin UI * **Bug Fixes** * Improved error propagation in the Electron renderer * Migration compatibility to repair a legacy checksum during native storage upgrades * **Tests** * Added tests covering the migration repair flow <!-- end of auto-generated comment: release notes by coderabbit.ai -->
188 lines
4.9 KiB
CSS
188 lines
4.9 KiB
CSS
@config '../tailwind.config.js';
|
|
|
|
@layer properties, theme, base, components, utilities, queuedash;
|
|
|
|
@import 'tailwindcss';
|
|
@import 'tailwindcss/utilities';
|
|
@import '@toeverything/theme/style.css';
|
|
|
|
@plugin 'tailwindcss-animate';
|
|
|
|
@custom-variant dark (&:is(.dark *, [data-theme='dark'] *));
|
|
|
|
@theme {
|
|
--color-border: var(--border);
|
|
--color-input: var(--input);
|
|
--color-ring: var(--ring);
|
|
--color-background: var(--background);
|
|
--color-foreground: var(--foreground);
|
|
|
|
--color-primary: var(--primary);
|
|
--color-primary-foreground: var(--primary-foreground);
|
|
|
|
--color-secondary: var(--secondary);
|
|
--color-secondary-foreground: var(--secondary-foreground);
|
|
|
|
--color-destructive: var(--destructive);
|
|
--color-destructive-foreground: var(--destructive-foreground);
|
|
|
|
--color-muted: var(--muted);
|
|
--color-muted-foreground: var(--muted-foreground);
|
|
|
|
--color-accent: var(--accent);
|
|
--color-accent-foreground: var(--accent-foreground);
|
|
|
|
--color-popover: var(--popover);
|
|
--color-popover-foreground: var(--popover-foreground);
|
|
|
|
--color-card: var(--card);
|
|
--color-card-foreground: var(--card-foreground);
|
|
|
|
/* Selfhost sidebar tokens */
|
|
--color-sidebar-bg: var(
|
|
--affine-v2-selfhost-layer-background-sidebarBg-sidebarBg
|
|
);
|
|
--color-sidebar-foreground: var(--affine-v2-selfhost-text-sidebar-primary);
|
|
--color-sidebar-foreground-secondary: var(
|
|
--affine-v2-selfhost-text-sidebar-secondary
|
|
);
|
|
--color-sidebar-hover: var(
|
|
--affine-v2-selfhost-button-sidebarButton-bg-hover
|
|
);
|
|
--color-sidebar-active: var(
|
|
--affine-v2-selfhost-button-sidebarButton-bg-select
|
|
);
|
|
|
|
/* Chip / badge tokens */
|
|
--color-chip-blue: var(--affine-v2-chip-label-blue);
|
|
--color-chip-white: var(--affine-v2-chip-label-white);
|
|
--color-chip-text: var(--affine-v2-chip-label-text);
|
|
|
|
/* Toggle tokens */
|
|
--color-toggle-on: var(--affine-v2-selfhost-toggle-backgroundOn);
|
|
--color-toggle-off: var(--affine-v2-selfhost-toggle-backgroundOff);
|
|
--color-toggle-thumb: var(--affine-v2-selfhost-toggle-foreground);
|
|
|
|
/* Custom font size */
|
|
--text-xxs: 11px;
|
|
|
|
--radius-lg: var(--radius);
|
|
--radius-md: calc(var(--radius) - 2px);
|
|
--radius-sm: calc(var(--radius) - 4px);
|
|
|
|
--animate-accordion-down: accordion-down 0.2s ease-out;
|
|
--animate-accordion-up: accordion-up 0.2s ease-out;
|
|
|
|
@keyframes accordion-down {
|
|
from {
|
|
height: 0;
|
|
}
|
|
to {
|
|
height: var(--radix-accordion-content-height);
|
|
}
|
|
}
|
|
@keyframes accordion-up {
|
|
from {
|
|
height: var(--radix-accordion-content-height);
|
|
}
|
|
to {
|
|
height: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
@utility container {
|
|
margin-inline: auto;
|
|
padding-inline: 2rem;
|
|
@media (width >= --theme(--breakpoint-sm)) {
|
|
max-width: none;
|
|
}
|
|
@media (width >= 1400px) {
|
|
max-width: 1400px;
|
|
}
|
|
}
|
|
|
|
/*
|
|
The default border color has changed to `currentColor` in Tailwind CSS v4,
|
|
so we've added these compatibility styles to make sure everything still
|
|
looks the same as it did with Tailwind CSS v3.
|
|
|
|
If we ever want to remove these styles, we need to add an explicit border
|
|
color utility to any element that depends on these defaults.
|
|
*/
|
|
@layer base {
|
|
*,
|
|
::after,
|
|
::before,
|
|
::backdrop,
|
|
::file-selector-button {
|
|
border-color: var(--border, currentColor);
|
|
}
|
|
}
|
|
|
|
@layer base {
|
|
:root {
|
|
--background: var(--affine-v2-layer-background-primary);
|
|
--foreground: var(--affine-v2-text-primary);
|
|
|
|
--card: var(--affine-v2-layer-background-secondary);
|
|
--card-foreground: var(--affine-v2-text-primary);
|
|
|
|
--popover: var(--affine-v2-layer-background-overlayPanel);
|
|
--popover-foreground: var(--affine-v2-text-primary);
|
|
|
|
--primary: var(--affine-v2-button-primary);
|
|
--primary-foreground: var(--affine-v2-button-pureWhiteText);
|
|
|
|
--secondary: var(--affine-v2-layer-background-secondary);
|
|
--secondary-foreground: var(--affine-v2-text-primary);
|
|
|
|
--muted: var(--affine-v2-layer-background-tertiary);
|
|
--muted-foreground: var(--affine-v2-text-secondary);
|
|
|
|
--accent: var(--affine-v2-layer-background-hoverOverlay);
|
|
--accent-foreground: var(--affine-v2-text-primary);
|
|
|
|
--destructive: var(--affine-v2-button-error);
|
|
--destructive-foreground: var(--affine-v2-button-pureWhiteText);
|
|
|
|
--border: var(--affine-v2-layer-insideBorder-border);
|
|
--input: var(--affine-v2-input-border-default);
|
|
--ring: var(--affine-v2-input-border-active);
|
|
--radius: var(--affine-popover-radius);
|
|
}
|
|
}
|
|
|
|
@layer base {
|
|
* {
|
|
@apply border-border;
|
|
}
|
|
|
|
body {
|
|
@apply bg-background text-foreground antialiased;
|
|
font-family: var(--affine-font-family);
|
|
}
|
|
|
|
/* Smooth scrollbars */
|
|
::-webkit-scrollbar {
|
|
width: 6px;
|
|
height: 6px;
|
|
}
|
|
::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
::-webkit-scrollbar-thumb {
|
|
background: var(--border);
|
|
border-radius: 999px;
|
|
}
|
|
::-webkit-scrollbar-thumb:hover {
|
|
background: var(--muted-foreground);
|
|
}
|
|
|
|
/* Text selection */
|
|
::selection {
|
|
background: var(--primary);
|
|
color: var(--primary-foreground);
|
|
}
|
|
}
|