mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2026-03-04 02:20:19 +01:00
Css fixes, Tailwind forward
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
/* Use Tailwind for most styles, keep only complex layouts in CSS modules */
|
||||
|
||||
.leftSidebar {
|
||||
min-width: var(--sidebar-width-min);
|
||||
max-width: var(--sidebar-width-max);
|
||||
width: var(--sidebar-width);
|
||||
}
|
||||
|
||||
.rightSidebar {
|
||||
min-width: 260px;
|
||||
max-width: 400px;
|
||||
width: 22vw;
|
||||
}
|
||||
@@ -1,123 +0,0 @@
|
||||
/* Custom component styles that don't fit Tailwind patterns */
|
||||
|
||||
/* Mantine component overrides */
|
||||
.mantine-override {
|
||||
/* Custom overrides for Mantine components when needed */
|
||||
}
|
||||
|
||||
/* PDF-specific custom components */
|
||||
.pdf-page-thumbnail {
|
||||
aspect-ratio: 3/4;
|
||||
background: var(--bg-surface);
|
||||
border: 1px solid var(--border-subtle);
|
||||
border-radius: var(--radius-sm);
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.pdf-page-thumbnail:hover {
|
||||
border-color: var(--color-primary-500);
|
||||
box-shadow: var(--shadow-md);
|
||||
}
|
||||
|
||||
.pdf-page-thumbnail img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
/* Loading spinner for PDF operations */
|
||||
.pdf-loading {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 200px;
|
||||
background: var(--bg-surface);
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
|
||||
/* Custom scrollbar for PDF viewer */
|
||||
.pdf-viewer-container {
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--border-strong) var(--bg-muted);
|
||||
}
|
||||
|
||||
.pdf-viewer-container::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
.pdf-viewer-container::-webkit-scrollbar-track {
|
||||
background: var(--bg-muted);
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
|
||||
.pdf-viewer-container::-webkit-scrollbar-thumb {
|
||||
background: var(--border-strong);
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
|
||||
.pdf-viewer-container::-webkit-scrollbar-thumb:hover {
|
||||
background: var(--color-primary-500);
|
||||
}
|
||||
|
||||
/* File upload drag and drop animations */
|
||||
.file-drop-zone.drag-over {
|
||||
animation: pulse 1s infinite;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0%, 100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
50% {
|
||||
transform: scale(1.02);
|
||||
}
|
||||
}
|
||||
|
||||
/* Progress bar for operations */
|
||||
.progress-bar {
|
||||
width: 100%;
|
||||
height: 4px;
|
||||
background: var(--bg-muted);
|
||||
border-radius: var(--radius-full);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.progress-bar-fill {
|
||||
height: 100%;
|
||||
background: var(--color-primary-500);
|
||||
border-radius: var(--radius-full);
|
||||
transition: width 0.3s ease;
|
||||
}
|
||||
|
||||
/* Tool-specific layouts that need custom CSS */
|
||||
.split-preview-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
||||
gap: var(--space-md);
|
||||
padding: var(--space-md);
|
||||
background: var(--bg-surface);
|
||||
border-radius: var(--radius-lg);
|
||||
border: 1px solid var(--border-subtle);
|
||||
}
|
||||
|
||||
/* Error states */
|
||||
.error-state {
|
||||
padding: var(--space-lg);
|
||||
text-align: center;
|
||||
background: var(--bg-surface);
|
||||
border: 1px solid var(--color-error);
|
||||
border-radius: var(--radius-md);
|
||||
color: var(--color-error);
|
||||
}
|
||||
|
||||
/* Success states */
|
||||
.success-state {
|
||||
padding: var(--space-lg);
|
||||
text-align: center;
|
||||
background: var(--bg-surface);
|
||||
border: 1px solid var(--color-success);
|
||||
border-radius: var(--radius-md);
|
||||
color: var(--color-success);
|
||||
}
|
||||
@@ -1,66 +1,7 @@
|
||||
|
||||
/* Import minimal theme variables */
|
||||
@import './theme.css';
|
||||
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
/* Custom component classes using Tailwind (with app- prefix to avoid Mantine conflicts) */
|
||||
@layer components {
|
||||
.app-card {
|
||||
@apply bg-bg-surface border border-border-subtle rounded-app-lg p-app-lg shadow-app-md;
|
||||
}
|
||||
|
||||
.app-surface {
|
||||
@apply bg-bg-surface border border-border-subtle rounded-app-md shadow-app-sm;
|
||||
}
|
||||
|
||||
.app-raised {
|
||||
@apply bg-bg-raised shadow-app-sm rounded-app-md;
|
||||
}
|
||||
|
||||
.app-interactive {
|
||||
@apply cursor-pointer transition-all duration-200 hover:bg-hover-bg active:bg-active-bg;
|
||||
}
|
||||
|
||||
.app-file-drop-zone {
|
||||
@apply border-2 border-dashed border-file-drop rounded-app-lg bg-bg-surface transition-all duration-200;
|
||||
}
|
||||
|
||||
.app-file-drop-zone:hover,
|
||||
.app-file-drop-zone.drag-over {
|
||||
@apply border-app-primary-500 bg-file-drop-hover;
|
||||
}
|
||||
|
||||
/* PDF-specific component classes */
|
||||
.app-pdf-viewer-bg {
|
||||
@apply bg-pdf-viewer;
|
||||
}
|
||||
|
||||
.app-pdf-toolbar {
|
||||
@apply bg-pdf-toolbar border-b border-border-subtle;
|
||||
}
|
||||
|
||||
/* Button variants */
|
||||
.app-btn-pdf-tool {
|
||||
@apply bg-bg-surface border border-border-default text-text-primary px-app-md py-app-sm rounded-app-md font-medium transition-all duration-200 hover:bg-hover-bg hover:border-app-primary-500;
|
||||
}
|
||||
|
||||
/* Focus styles */
|
||||
.app-focus-ring {
|
||||
@apply focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2;
|
||||
}
|
||||
}
|
||||
|
||||
/* Custom utilities */
|
||||
@layer utilities {
|
||||
.text-balance {
|
||||
text-wrap: balance;
|
||||
}
|
||||
|
||||
.scrollbar-hide {
|
||||
-ms-overflow-style: none;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
.scrollbar-hide::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,24 @@
|
||||
/* Design System CSS Variables - Single Source of Truth */
|
||||
/* CSS variables for Tailwind + Mantine integration */
|
||||
|
||||
:root {
|
||||
/* Color System */
|
||||
/* Standard gray scale */
|
||||
--gray-50: 249 250 251;
|
||||
--gray-100: 243 244 246;
|
||||
--gray-200: 229 231 235;
|
||||
--gray-300: 209 213 219;
|
||||
--gray-400: 156 163 175;
|
||||
--gray-500: 107 114 128;
|
||||
--gray-600: 75 85 99;
|
||||
--gray-700: 55 65 81;
|
||||
--gray-800: 31 41 55;
|
||||
--gray-900: 17 24 39;
|
||||
|
||||
/* Semantic colors for Tailwind */
|
||||
--surface: 255 255 255;
|
||||
--background: 249 250 251;
|
||||
--border: 229 231 235;
|
||||
|
||||
/* Colors for Mantine integration */
|
||||
--color-primary-50: #eff6ff;
|
||||
--color-primary-100: #dbeafe;
|
||||
--color-primary-200: #bfdbfe;
|
||||
@@ -24,123 +41,91 @@
|
||||
--color-gray-800: #1f2937;
|
||||
--color-gray-900: #111827;
|
||||
|
||||
/* Semantic Colors */
|
||||
--color-success: #10b981;
|
||||
--color-warning: #f59e0b;
|
||||
--color-error: #ef4444;
|
||||
--color-info: #3b82f6;
|
||||
|
||||
/* Spacing System */
|
||||
/* Spacing system */
|
||||
--space-xs: 4px;
|
||||
--space-sm: 8px;
|
||||
--space-md: 16px;
|
||||
--space-lg: 24px;
|
||||
--space-xl: 32px;
|
||||
--space-2xl: 48px;
|
||||
|
||||
/* Radius System */
|
||||
/* Radius system */
|
||||
--radius-xs: 2px;
|
||||
--radius-sm: 4px;
|
||||
--radius-md: 8px;
|
||||
--radius-lg: 12px;
|
||||
--radius-xl: 16px;
|
||||
--radius-2xl: 24px;
|
||||
--radius-full: 9999px;
|
||||
|
||||
/* Shadow System */
|
||||
/* Shadow system */
|
||||
--shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||
--shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||
--shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
|
||||
--shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
|
||||
|
||||
/* Layout */
|
||||
--sidebar-width-min: 180px;
|
||||
--sidebar-width-max: 240px;
|
||||
--sidebar-width: 16vw;
|
||||
--header-height: 60px;
|
||||
--border-width: 1px;
|
||||
|
||||
/* Typography */
|
||||
/* Font weights */
|
||||
--font-weight-normal: 400;
|
||||
--font-weight-medium: 500;
|
||||
--font-weight-semibold: 600;
|
||||
--font-weight-bold: 700;
|
||||
|
||||
/* Z-Index Scale */
|
||||
--z-dropdown: 1000;
|
||||
--z-sticky: 1020;
|
||||
--z-fixed: 1030;
|
||||
--z-modal-backdrop: 1040;
|
||||
--z-modal: 1050;
|
||||
--z-popover: 1060;
|
||||
--z-tooltip: 1070;
|
||||
}
|
||||
|
||||
/* Light Theme */
|
||||
:root, [data-mantine-color-scheme="light"] {
|
||||
/* Background Colors */
|
||||
--bg-app: var(--color-gray-50);
|
||||
/* Light theme semantic colors */
|
||||
--bg-surface: #ffffff;
|
||||
--bg-raised: var(--color-gray-50);
|
||||
--bg-overlay: rgba(255, 255, 255, 0.8);
|
||||
--bg-muted: var(--color-gray-100);
|
||||
|
||||
/* Text Colors */
|
||||
--text-primary: var(--color-gray-900);
|
||||
--text-secondary: var(--color-gray-600);
|
||||
--text-muted: var(--color-gray-500);
|
||||
--text-inverse: #ffffff;
|
||||
|
||||
/* Border Colors */
|
||||
--border-subtle: var(--color-gray-200);
|
||||
--border-default: var(--color-gray-300);
|
||||
--border-strong: var(--color-gray-400);
|
||||
|
||||
/* Interactive States */
|
||||
--hover-bg: var(--color-gray-50);
|
||||
--active-bg: var(--color-gray-100);
|
||||
--focus-ring: var(--color-primary-500);
|
||||
|
||||
/* PDF Tool Specific */
|
||||
--pdf-viewer-bg: #f8fafc;
|
||||
--pdf-toolbar-bg: var(--bg-surface);
|
||||
--file-drop-border: var(--color-gray-300);
|
||||
--file-drop-hover: var(--color-primary-100);
|
||||
--bg-raised: #f9fafb;
|
||||
--bg-muted: #f3f4f6;
|
||||
--text-primary: #111827;
|
||||
--text-secondary: #4b5563;
|
||||
--text-muted: #6b7280;
|
||||
--border-subtle: #e5e7eb;
|
||||
--border-default: #d1d5db;
|
||||
--border-strong: #9ca3af;
|
||||
--hover-bg: #f9fafb;
|
||||
--active-bg: #f3f4f6;
|
||||
}
|
||||
|
||||
/* Dark Theme */
|
||||
[data-mantine-color-scheme="dark"] {
|
||||
/* Background Colors */
|
||||
--bg-app: var(--color-gray-900);
|
||||
--bg-surface: var(--color-gray-800);
|
||||
--bg-raised: var(--color-gray-700);
|
||||
--bg-overlay: rgba(17, 24, 39, 0.8);
|
||||
--bg-muted: var(--color-gray-700);
|
||||
/* Dark theme gray scale (inverted) */
|
||||
--gray-50: 17 24 39;
|
||||
--gray-100: 31 41 55;
|
||||
--gray-200: 55 65 81;
|
||||
--gray-300: 75 85 99;
|
||||
--gray-400: 107 114 128;
|
||||
--gray-500: 156 163 175;
|
||||
--gray-600: 209 213 219;
|
||||
--gray-700: 229 231 235;
|
||||
--gray-800: 243 244 246;
|
||||
--gray-900: 249 250 251;
|
||||
|
||||
/* Text Colors */
|
||||
--text-primary: var(--color-gray-50);
|
||||
--text-secondary: var(--color-gray-300);
|
||||
--text-muted: var(--color-gray-400);
|
||||
--text-inverse: var(--color-gray-900);
|
||||
/* Dark semantic colors for Tailwind */
|
||||
--surface: 31 41 55;
|
||||
--background: 17 24 39;
|
||||
--border: 75 85 99;
|
||||
|
||||
/* Border Colors */
|
||||
--border-subtle: var(--color-gray-700);
|
||||
--border-default: var(--color-gray-600);
|
||||
--border-strong: var(--color-gray-500);
|
||||
/* Dark theme Mantine colors */
|
||||
--color-gray-50: #111827;
|
||||
--color-gray-100: #1f2937;
|
||||
--color-gray-200: #374151;
|
||||
--color-gray-300: #4b5563;
|
||||
--color-gray-400: #6b7280;
|
||||
--color-gray-500: #9ca3af;
|
||||
--color-gray-600: #d1d5db;
|
||||
--color-gray-700: #e5e7eb;
|
||||
--color-gray-800: #f3f4f6;
|
||||
--color-gray-900: #f9fafb;
|
||||
|
||||
/* Interactive States */
|
||||
--hover-bg: var(--color-gray-700);
|
||||
--active-bg: var(--color-gray-600);
|
||||
--focus-ring: var(--color-primary-400);
|
||||
/* Dark theme semantic colors */
|
||||
--bg-surface: #1f2937;
|
||||
--bg-raised: #374151;
|
||||
--bg-muted: #374151;
|
||||
--text-primary: #f9fafb;
|
||||
--text-secondary: #d1d5db;
|
||||
--text-muted: #9ca3af;
|
||||
--border-subtle: #374151;
|
||||
--border-default: #4b5563;
|
||||
--border-strong: #6b7280;
|
||||
--hover-bg: #374151;
|
||||
--active-bg: #4b5563;
|
||||
|
||||
/* PDF Tool Specific */
|
||||
--pdf-viewer-bg: var(--color-gray-800);
|
||||
--pdf-toolbar-bg: var(--bg-surface);
|
||||
--file-drop-border: var(--color-gray-600);
|
||||
--file-drop-hover: var(--color-primary-900);
|
||||
|
||||
/* Shadow adjustments for dark mode */
|
||||
/* Adjust shadows for dark mode */
|
||||
--shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
|
||||
--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
|
||||
--shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
|
||||
@@ -151,10 +136,4 @@
|
||||
/* Smooth transitions for theme switching */
|
||||
* {
|
||||
transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
|
||||
}
|
||||
|
||||
/* Focus styles */
|
||||
*:focus-visible {
|
||||
outline: 2px solid var(--focus-ring);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
Reference in New Issue
Block a user