Readur/docs/stylesheets/extra.css

381 lines
8.3 KiB
CSS

/* Custom styles for Readur documentation */
/* Enhanced color scheme for better readability and warmth */
:root {
--readur-primary: #00acc1; /* Cyan - more vibrant */
--readur-accent: #64b5f6; /* Light blue - consistent accent */
--readur-success: #66bb6a;
--readur-info: #42a5f5;
--readur-warning: #ffa726;
--readur-danger: #ef5350;
}
/* Light theme overrides - warmer, more inviting */
[data-md-color-scheme="default"] {
--md-default-bg-color: #fafbfc; /* Slightly warm white */
--md-default-bg-color--light: #f5f7f9;
--md-default-bg-color--lighter: #eceff3;
--md-default-fg-color: #2d3748; /* Warmer dark text */
--md-default-fg-color--light: #4a5568;
--md-default-fg-color--lighter: #718096;
--md-code-bg-color: #f7f9fb; /* Light blue-gray code bg */
--md-code-fg-color: #2d3748;
--md-typeset-a-color: #0284c7; /* Friendly blue links */
}
/* Dark theme overrides - warmer, less depressing */
[data-md-color-scheme="slate"] {
--md-default-bg-color: #202324; /* Dark background matching viewer */
--md-default-bg-color--light: #272d35;
--md-default-bg-color--lighter: #323842;
--md-default-fg-color: #dbd8d3; /* Text color rgb(219, 216, 211) */
--md-default-fg-color--light: #b8bec7;
--md-default-fg-color--lighter: #8b939e;
--md-code-bg-color: #2a3038; /* Warmer code background */
--md-code-fg-color: #dbd8d3;
--md-typeset-a-color: #64b5f6; /* Softer blue links */
}
/* Typography improvements */
.md-typeset {
font-size: 0.95rem; /* Comfortable reading size */
line-height: 1.65; /* Better line spacing */
}
.md-typeset h1 {
font-size: 2rem;
font-weight: 600;
letter-spacing: -0.02em;
margin: 1.5rem 0 1rem;
}
/* Softer title colors in dark mode */
[data-md-color-scheme="slate"] .md-typeset h1 {
color: #cbd2db; /* Slightly muted for less brightness */
}
.md-typeset h2 {
font-size: 1.65rem;
font-weight: 600;
letter-spacing: -0.01em;
margin: 1.25rem 0 0.75rem;
}
[data-md-color-scheme="slate"] .md-typeset h2 {
color: #d4dae2;
}
.md-typeset h3 {
font-size: 1.3rem;
font-weight: 600;
margin: 1rem 0 0.5rem;
}
[data-md-color-scheme="slate"] .md-typeset h3 {
color: #dde2e8;
}
.md-typeset p {
margin: 1rem 0;
}
/* Better code blocks */
.md-typeset pre > code {
font-size: 0.9rem;
line-height: 1.6;
padding: 1.25rem;
}
[data-md-color-scheme="slate"] .md-typeset code {
background-color: #2a3038;
color: #80cbc4; /* Cyan tint for inline code */
padding: 0.2em 0.4em;
border-radius: 0.25rem;
}
[data-md-color-scheme="default"] .md-typeset code {
background-color: #e8f4f8;
color: #0891b2; /* Teal code in light mode */
padding: 0.2em 0.4em;
border-radius: 0.25rem;
font-weight: 500;
}
/* Navigation improvements */
.md-nav__link {
font-size: 0.95rem;
padding: 0.6rem 0.8rem;
transition: all 0.2s ease;
}
.md-nav__link:hover {
color: #64b5f6; /* Consistent light blue */
}
[data-md-color-scheme="slate"] .md-nav__link--active {
color: #64b5f6;
font-weight: 500;
}
/* Sidebar styling */
.md-sidebar {
width: 15rem;
}
.md-sidebar--primary .md-sidebar__scrollwrap {
padding: 1rem 0;
}
/* Content area improvements */
.md-content {
max-width: 55rem; /* Optimal reading width */
margin: 0 auto;
padding: 1rem 2rem;
}
.md-content__inner {
margin: 0 auto;
padding: 0;
}
/* Table of contents */
.md-nav--secondary .md-nav__link {
font-size: 0.85rem;
padding: 0.4rem 0.8rem;
}
[data-md-color-scheme="slate"] .md-nav--secondary {
border-left: 2px solid #323842;
}
/* Grid cards for homepage */
.grid.cards {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 1.25rem;
margin: 2rem 0;
}
.grid.cards > * {
padding: 1.25rem;
border: 1px solid var(--md-default-fg-color--lightest);
border-radius: 0.5rem;
transition: all 0.3s ease;
background: var(--md-default-bg-color--light);
}
[data-md-color-scheme="default"] .grid.cards > * {
border-color: #e2e8f0;
background: #ffffff;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
[data-md-color-scheme="slate"] .grid.cards > * {
border-color: #3a4149;
background: #272d35;
}
.grid.cards > *:hover {
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
transform: translateY(-3px);
border-color: #64b5f6;
}
/* Custom admonitions with warmer colors */
[data-md-color-scheme="slate"] .md-typeset .admonition {
background-color: #272d35;
border-radius: 0.5rem;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.md-typeset .admonition.example,
.md-typeset details.example {
border-color: #66bb6a;
}
.md-typeset .example > .admonition-title,
.md-typeset .example > summary {
background-color: rgba(102, 187, 106, 0.15);
border-color: #66bb6a;
}
/* Better table styling */
.md-typeset table:not([class]) {
font-size: 0.9rem;
border-radius: 0.5rem;
overflow: hidden;
}
[data-md-color-scheme="default"] .md-typeset table:not([class]) th {
background-color: #f1f5f9;
color: #1e293b;
font-weight: 600;
}
[data-md-color-scheme="default"] .md-typeset table:not([class]) td {
border-color: #e2e8f0;
}
[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
background-color: #323842;
color: #e8eaed;
font-weight: 600;
}
[data-md-color-scheme="slate"] .md-typeset table:not([class]) td {
border-color: #3a4149;
}
/* Responsive images */
.md-typeset img {
max-width: 100%;
height: auto;
border-radius: 0.5rem;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
margin: 1.5rem 0;
}
/* Custom badges */
.badge {
display: inline-block;
padding: 0.3em 0.6em;
font-size: 0.8rem;
font-weight: 600;
line-height: 1;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: 0.25rem;
}
.badge-new {
background-color: #66bb6a;
color: white;
}
.badge-beta {
background-color: #ffa726;
color: #1e2329;
}
.badge-deprecated {
background-color: #ef5350;
color: white;
}
/* Search improvements */
[data-md-color-scheme="slate"] .md-search__form {
background-color: #2a3038;
border: 1px solid #3a4149;
}
[data-md-color-scheme="slate"] .md-search__input {
color: #e8eaed;
}
.md-search-result__meta {
color: var(--md-default-fg-color--light);
font-size: 0.8rem;
}
/* Header improvements */
.md-header {
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
[data-md-color-scheme="slate"] .md-header {
background-color: #454a4d; /* Lighter gray matching scrollbar thumb rgb(69, 74, 77) */
border-bottom: 1px solid #5a6165;
}
/* Tone down the primary color in header for dark mode */
[data-md-color-scheme="slate"] .md-header {
--md-primary-fg-color: #dbd8d3; /* Match main text color for consistency */
--md-primary-bg-color: #454a4d; /* Match the header background */
}
/* Also adjust tabs if present */
[data-md-color-scheme="slate"] .md-tabs {
background-color: #2d3748; /* Slightly darker than header for hierarchy */
}
[data-md-color-scheme="slate"] .md-tabs__link--active {
color: #64b5f6;
}
/* Footer styling */
[data-md-color-scheme="slate"] .md-footer {
background-color: #1a1f25;
border-top: 1px solid #323842;
}
.md-footer-meta__inner {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem;
}
/* Announcement bar */
.md-banner {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 0.75rem;
}
.md-banner a {
color: white;
text-decoration: underline;
font-weight: 500;
}
/* Smooth scrolling */
html {
scroll-behavior: smooth;
}
/* Focus improvements for accessibility */
*:focus-visible {
outline: 2px solid #64b5f6;
outline-offset: 2px;
border-radius: 0.25rem;
}
/* Scrollbar styling */
[data-md-color-scheme="slate"] ::-webkit-scrollbar {
background-color: #202324; /* rgb(32, 35, 36) */
}
[data-md-color-scheme="slate"] ::-webkit-scrollbar-thumb {
background-color: #454a4d; /* rgb(69, 74, 77) */
border-radius: 0.25rem;
}
[data-md-color-scheme="slate"] ::-webkit-scrollbar-thumb:hover {
background-color: #5a6165; /* Slightly lighter on hover */
}
[data-md-color-scheme="default"] ::-webkit-scrollbar-thumb {
background-color: #90cdf4;
border-radius: 0.25rem;
}
[data-md-color-scheme="default"] ::-webkit-scrollbar-thumb:hover {
background-color: #64b5f6;
}
/* Animation for page transitions */
.md-content__inner {
animation: fadeIn 0.3s ease-in;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}