Spaces:
Running
Running
File size: 4,060 Bytes
c49cb47 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | /**
* Custom styles for OCR Text Explorer
* Extends Tailwind CSS with specific styling needs
*/
/* Custom scrollbar styling */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
@apply bg-gray-100 dark:bg-gray-800;
}
::-webkit-scrollbar-thumb {
@apply bg-gray-400 dark:bg-gray-600 rounded;
}
::-webkit-scrollbar-thumb:hover {
@apply bg-gray-500 dark:bg-gray-500;
}
/* Firefox scrollbar */
* {
scrollbar-width: thin;
scrollbar-color: theme('colors.gray.400') theme('colors.gray.100');
}
.dark * {
scrollbar-color: theme('colors.gray.600') theme('colors.gray.800');
}
/* Smooth transitions for theme switching */
body {
transition: background-color 0.3s ease, color 0.3s ease;
}
/* Image panel sticky positioning adjustment */
.sticky {
position: -webkit-sticky;
position: sticky;
}
/* Diff content styling */
.diff-content {
line-height: 1.6;
word-break: break-word;
}
/* Keyboard hint styling */
kbd {
@apply inline-block px-2 py-1 text-xs font-semibold text-gray-800 bg-gray-100 border border-gray-300 rounded dark:bg-gray-700 dark:text-gray-200 dark:border-gray-600;
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}
/* Loading spinner animation (in case Tailwind's animate-spin needs adjustment) */
@keyframes spin {
to {
transform: rotate(360deg);
}
}
.animate-spin {
animation: spin 1s linear infinite;
}
/* Tab hover effect */
nav button {
position: relative;
transition: color 0.2s ease;
}
nav button::after {
content: '';
position: absolute;
bottom: -2px;
left: 0;
right: 0;
height: 2px;
background-color: transparent;
transition: background-color 0.2s ease;
}
nav button:hover::after {
@apply bg-gray-300 dark:bg-gray-600;
}
/* Image loading state */
img {
@apply bg-gray-200 dark:bg-gray-700;
min-height: 200px;
}
img[src=""] {
visibility: hidden;
}
/* Print styles */
@media print {
header, footer {
display: none !important;
}
.no-print {
display: none !important;
}
main {
height: auto !important;
}
.diff-content {
page-break-inside: avoid;
}
}
/* Responsive adjustments */
@media (max-width: 768px) {
/* Stack panels vertically on mobile */
main.flex {
@apply flex-col;
}
/* Full width for panels on mobile */
main > div:first-child {
@apply w-full max-h-96;
}
/* Adjust text size */
.prose-sm {
@apply text-xs;
}
/* Hide keyboard hints on mobile */
footer .text-sm:last-child {
@apply hidden;
}
}
/* Focus styles for accessibility */
button:focus, input:focus, select:focus {
@apply outline-none ring-2 ring-blue-500 ring-offset-2 dark:ring-offset-gray-900;
}
/* Custom tooltip styles (if needed later) */
.tooltip {
@apply invisible absolute z-10 px-2 py-1 text-xs text-white bg-gray-900 rounded shadow-lg dark:bg-gray-700;
}
.tooltip-trigger:hover .tooltip {
@apply visible;
}
/* Preserve whitespace in diff views */
.whitespace-pre-wrap {
white-space: pre-wrap;
word-wrap: break-word;
}
/* Enhanced diff highlighting with better dark mode contrast */
.diff-delete {
@apply bg-red-200 dark:bg-red-950 text-red-800 dark:text-red-300;
text-decoration: line-through;
text-decoration-color: currentColor;
text-decoration-thickness: 2px;
}
.diff-insert {
@apply bg-green-200 dark:bg-green-950 text-green-800 dark:text-green-300;
position: relative;
}
/* Dark mode specific improvements */
.dark .prose {
@apply text-gray-200;
}
.dark .prose h3 {
@apply text-gray-100;
}
/* Remove this - handled inline with classes
.dark pre {
@apply bg-gray-800 text-gray-200;
} */
/* Line numbers for future enhancement */
.line-numbers {
counter-reset: line;
}
.line-numbers > div::before {
counter-increment: line;
content: counter(line);
@apply inline-block w-12 mr-4 text-right text-gray-400 dark:text-gray-600 select-none;
} |