mirror of
https://github.com/sophokles187/data-cards.git
synced 2026-07-22 12:30:26 +00:00
419 lines
7.1 KiB
CSS
419 lines
7.1 KiB
CSS
/*
|
|
* DataCards Custom Documentation Styling
|
|
* Modern, clean, Apple-inspired design
|
|
*/
|
|
|
|
/* Typography */
|
|
:root {
|
|
--body-font-family: -apple-system, BlinkMacSystemFont, "San Francisco", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
--mono-font-family: "SF Mono", SFMono-Regular, ui-monospace, Menlo, Consolas, Monaco, "Liberation Mono", "Courier New", monospace;
|
|
--body-line-height: 1.6;
|
|
--content-line-height: 1.8;
|
|
}
|
|
|
|
body {
|
|
font-family: var(--body-font-family);
|
|
font-weight: 400;
|
|
line-height: var(--body-line-height);
|
|
color: #333333;
|
|
background-color: #ffffff;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
}
|
|
|
|
pre, code {
|
|
font-family: var(--mono-font-family);
|
|
border-radius: 6px;
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
code {
|
|
padding: 0.2em 0.4em;
|
|
background-color: #f5f5f7;
|
|
border-radius: 4px;
|
|
color: #333;
|
|
}
|
|
|
|
/* Headings */
|
|
h1, h2, h3, h4, h5, h6 {
|
|
font-weight: 600;
|
|
margin-top: 1.5em;
|
|
margin-bottom: 0.5em;
|
|
line-height: 1.25;
|
|
letter-spacing: -0.01em;
|
|
color: #111111;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 2.5rem;
|
|
font-weight: 700;
|
|
letter-spacing: -0.03em;
|
|
margin-top: 0;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 1.75rem;
|
|
border-bottom: 1px solid #f0f0f0;
|
|
padding-bottom: 0.3em;
|
|
}
|
|
|
|
h3 {
|
|
font-size: 1.25rem;
|
|
}
|
|
|
|
h4 {
|
|
font-size: 1.1rem;
|
|
}
|
|
|
|
/* Links */
|
|
a {
|
|
color: #0070c9;
|
|
text-decoration: none;
|
|
transition: color 0.2s ease;
|
|
}
|
|
|
|
a:hover {
|
|
color: #0056b3;
|
|
text-decoration: none;
|
|
}
|
|
|
|
/* Navigation */
|
|
.side-bar {
|
|
background-color: #f5f5f7;
|
|
border-right: none;
|
|
box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.nav-list .nav-list-item .nav-list-link {
|
|
color: #333333;
|
|
padding: 8px 16px;
|
|
border-radius: 8px;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.nav-list .nav-list-item .nav-list-link:hover,
|
|
.nav-list .nav-list-item .nav-list-link.active {
|
|
background-color: rgba(0, 112, 201, 0.08);
|
|
color: #0070c9;
|
|
}
|
|
|
|
.nav-list .nav-list-item .nav-list-expander {
|
|
color: #888888;
|
|
}
|
|
|
|
.site-title {
|
|
font-weight: 700;
|
|
font-size: 1.5rem;
|
|
padding: 24px 16px;
|
|
}
|
|
|
|
.site-header {
|
|
border-bottom: 1px solid #f0f0f0;
|
|
box-shadow: none;
|
|
}
|
|
|
|
/* Main content */
|
|
.main-content {
|
|
padding: 3rem;
|
|
line-height: var(--content-line-height);
|
|
}
|
|
|
|
.main-content p {
|
|
margin-bottom: 1.5em;
|
|
}
|
|
|
|
.main-content-wrap {
|
|
background-color: #ffffff;
|
|
}
|
|
|
|
.main {
|
|
max-width: 1200px;
|
|
}
|
|
|
|
/* Tables */
|
|
table {
|
|
border-collapse: collapse;
|
|
width: 100%;
|
|
margin-bottom: 2rem;
|
|
border-radius: 8px;
|
|
overflow: hidden;
|
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
|
|
border: none;
|
|
}
|
|
|
|
th {
|
|
background-color: #f5f5f7;
|
|
padding: 12px 16px;
|
|
text-align: left;
|
|
font-weight: 600;
|
|
color: #333;
|
|
border: none;
|
|
border-bottom: 1px solid #e0e0e0;
|
|
}
|
|
|
|
td {
|
|
padding: 12px 16px;
|
|
border: none;
|
|
border-bottom: 1px solid #f0f0f0;
|
|
}
|
|
|
|
tr:last-child td {
|
|
border-bottom: none;
|
|
}
|
|
|
|
tr:hover {
|
|
background-color: #f9f9fb;
|
|
}
|
|
|
|
/* Buttons and labels */
|
|
.btn {
|
|
border-radius: 8px;
|
|
padding: 12px 20px;
|
|
font-weight: 500;
|
|
transition: all 0.2s ease;
|
|
border: none;
|
|
}
|
|
|
|
.btn-primary {
|
|
background-color: #0070c9;
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background-color: #0056b3;
|
|
}
|
|
|
|
.label {
|
|
border-radius: 4px;
|
|
padding: 4px 10px;
|
|
}
|
|
|
|
/* Code blocks */
|
|
.highlight {
|
|
background-color: #f5f5f7;
|
|
border-radius: 8px;
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
pre.highlight {
|
|
padding: 16px;
|
|
overflow-x: auto;
|
|
border: none;
|
|
}
|
|
|
|
/* Blockquotes */
|
|
blockquote {
|
|
margin: 1rem 0;
|
|
padding: 0.75rem 1.5rem;
|
|
border-left: 4px solid #0070c9;
|
|
border-radius: 0 8px 8px 0;
|
|
background-color: #f5f7fa;
|
|
color: #444;
|
|
}
|
|
|
|
blockquote p:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
/* Search */
|
|
.search-input {
|
|
border-radius: 8px;
|
|
padding: 12px 16px;
|
|
border: 1px solid #e0e0e0;
|
|
background-color: #fafafa;
|
|
transition: all 0.2s ease;
|
|
margin: 16px;
|
|
}
|
|
|
|
.search-input:focus {
|
|
outline: none;
|
|
border-color: #0070c9;
|
|
background-color: #ffffff;
|
|
box-shadow: 0 0 0 2px rgba(0, 112, 201, 0.2);
|
|
}
|
|
|
|
/* Box elements */
|
|
.deprecated, .warning {
|
|
padding: 12px 16px;
|
|
margin: 20px 0;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
.deprecated {
|
|
background-color: #fff3e0;
|
|
border-left: 4px solid #ff9800;
|
|
}
|
|
|
|
.warning {
|
|
background-color: #ffebee;
|
|
border-left: 4px solid #f44336;
|
|
}
|
|
|
|
/* Scroll bar */
|
|
::-webkit-scrollbar {
|
|
width: 10px;
|
|
height: 10px;
|
|
}
|
|
|
|
::-webkit-scrollbar-track {
|
|
background: #f1f1f1;
|
|
border-radius: 10px;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
background: #ccc;
|
|
border-radius: 10px;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb:hover {
|
|
background: #aaa;
|
|
}
|
|
|
|
/* No-JS fallback */
|
|
.no-js-message {
|
|
padding: 2rem;
|
|
text-align: center;
|
|
background-color: #f9f9fb;
|
|
border-radius: 8px;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
/* Tables of contents */
|
|
.table-of-contents {
|
|
background-color: #f9f9fb;
|
|
padding: 20px;
|
|
border-radius: 8px;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.table-of-contents ul {
|
|
padding-left: 20px;
|
|
}
|
|
|
|
.table-of-contents code {
|
|
background-color: #f0f0f0;
|
|
}
|
|
|
|
/* Footer */
|
|
.site-footer {
|
|
background-color: #f9f9fb;
|
|
padding: 2rem 0;
|
|
text-align: center;
|
|
border-top: 1px solid #f0f0f0;
|
|
color: #888;
|
|
}
|
|
|
|
/* Responsive adjustments */
|
|
@media (max-width: 768px) {
|
|
.main-content {
|
|
padding: 1.5rem;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 2rem;
|
|
}
|
|
|
|
h2 {
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
table {
|
|
display: block;
|
|
overflow-x: auto;
|
|
}
|
|
}
|
|
|
|
/* Apple-style cards for examples */
|
|
.example-card {
|
|
background-color: white;
|
|
border-radius: 12px;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
|
margin: 24px 0;
|
|
padding: 24px;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.example-card:hover {
|
|
transform: translateY(-4px);
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
|
|
}
|
|
|
|
.example-card h3 {
|
|
margin-top: 0;
|
|
color: #0070c9;
|
|
}
|
|
|
|
/* Image styling */
|
|
img {
|
|
max-width: 100%;
|
|
border-radius: 8px;
|
|
margin: 1.5rem 0;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
/* Dark mode support (if enabled) */
|
|
@media (prefers-color-scheme: dark) {
|
|
:root {
|
|
--body-background: #1e1e1e;
|
|
--sidebar-color: #252525;
|
|
--content-background: #1e1e1e;
|
|
--link-color: #0a84ff;
|
|
--text-color: #e0e0e0;
|
|
--heading-color: #ffffff;
|
|
--code-background: #2d2d2d;
|
|
--border-color: #3d3d3d;
|
|
--search-background: #252525;
|
|
}
|
|
|
|
/* This will only apply if the site has dark mode support enabled */
|
|
.dark-theme {
|
|
background-color: var(--body-background);
|
|
color: var(--text-color);
|
|
}
|
|
|
|
.dark-theme .side-bar {
|
|
background-color: var(--sidebar-color);
|
|
border-right: 1px solid var(--border-color);
|
|
}
|
|
|
|
.dark-theme .main-content-wrap {
|
|
background-color: var(--content-background);
|
|
}
|
|
|
|
.dark-theme h1, .dark-theme h2, .dark-theme h3, .dark-theme h4, .dark-theme h5, .dark-theme h6 {
|
|
color: var(--heading-color);
|
|
}
|
|
|
|
.dark-theme code {
|
|
background-color: var(--code-background);
|
|
color: #e0e0e0;
|
|
}
|
|
|
|
.dark-theme a {
|
|
color: var(--link-color);
|
|
}
|
|
|
|
.dark-theme .example-card {
|
|
background-color: #252525;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
.dark-theme table th {
|
|
background-color: #252525;
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
.dark-theme table td {
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
.dark-theme tr:hover {
|
|
background-color: #2a2a2a;
|
|
}
|
|
|
|
.dark-theme .search-input {
|
|
background-color: var(--search-background);
|
|
border-color: var(--border-color);
|
|
color: var(--text-color);
|
|
}
|
|
}
|