Files
thrillwiki_django_no_react/static/css/diff-viewer.css

195 lines
3.2 KiB
CSS

/* Diff Viewer Styles */
.diff-viewer {
font-family: ui-monospace, monospace;
margin: 1rem 0;
border: 1px solid #e5e7eb;
border-radius: 0.375rem;
overflow: hidden;
background: #fff;
}
.diff-viewer.side-by-side .diff-blocks {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1px;
background: #e5e7eb;
}
.diff-header {
padding: 1rem;
border-bottom: 1px solid #e5e7eb;
background: #f9fafb;
}
.diff-metadata {
display: flex;
gap: 1rem;
font-size: 0.875rem;
color: #4b5563;
}
.diff-controls {
margin-top: 0.5rem;
display: flex;
gap: 0.5rem;
}
.diff-controls button {
padding: 0.25rem 0.75rem;
border: 1px solid #d1d5db;
border-radius: 0.25rem;
background: #fff;
font-size: 0.875rem;
color: #374151;
cursor: pointer;
transition: all 0.2s;
}
.diff-controls button:hover {
background: #f3f4f6;
}
.diff-section {
border-bottom: 1px solid #e5e7eb;
}
.diff-field-header {
padding: 0.5rem 1rem;
background: #f9fafb;
border-bottom: 1px solid #e5e7eb;
font-weight: 500;
cursor: pointer;
}
.diff-field-header .syntax-type {
font-size: 0.75rem;
color: #6b7280;
margin-left: 0.5rem;
}
.diff-block {
display: grid;
grid-template-columns: auto 1fr;
background: #fff;
}
.line-numbers {
padding: 0.5rem;
background: #f9fafb;
border-right: 1px solid #e5e7eb;
text-align: right;
color: #6b7280;
user-select: none;
}
.line-number {
display: block;
padding: 0 0.5rem;
font-size: 0.875rem;
}
.diff-block pre {
margin: 0;
padding: 0.5rem;
overflow-x: auto;
}
.diff-block code {
font-family: ui-monospace, monospace;
font-size: 0.875rem;
line-height: 1.5;
}
/* Inline diff styles */
.diff-removed {
background-color: #fee2e2;
text-decoration: line-through;
color: #991b1b;
}
.diff-added {
background-color: #dcfce7;
color: #166534;
}
/* Syntax highlighting */
.language-json .json-key {
color: #059669;
}
.language-python .keyword {
color: #7c3aed;
}
.language-python .string {
color: #059669;
}
.language-python .comment {
color: #6b7280;
font-style: italic;
}
/* Comment threads */
.comment-thread {
border-top: 1px solid #e5e7eb;
padding: 1rem;
background: #f9fafb;
}
.comment {
margin-bottom: 1rem;
padding: 0.5rem;
background: #fff;
border: 1px solid #e5e7eb;
border-radius: 0.25rem;
}
.comment:last-child {
margin-bottom: 0;
}
.comment-header {
display: flex;
justify-content: space-between;
font-size: 0.75rem;
color: #6b7280;
margin-bottom: 0.25rem;
}
.comment-content {
font-size: 0.875rem;
color: #374151;
}
/* Navigation */
.diff-navigation {
padding: 1rem;
display: flex;
justify-content: space-between;
align-items: center;
border-top: 1px solid #e5e7eb;
background: #f9fafb;
}
.position-indicator {
font-size: 0.875rem;
color: #6b7280;
}
/* Collapsed state */
.diff-section.collapsed .diff-blocks {
display: none;
}
/* Performance warning */
.performance-warning {
padding: 0.5rem;
background: #fffbeb;
border: 1px solid #fcd34d;
color: #92400e;
font-size: 0.875rem;
margin: 0.5rem 1rem;
border-radius: 0.25rem;
}