coder / style.css
nofl's picture
Update style.css
9b0279d verified
raw
history blame
2.63 kB
/* Reset and base styles */
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
/* Variables for consistent theming */
:root {
--font-primary: -apple-system, BlinkMacSystemFont, 'Arial', system-ui, sans-serif;
--color-text-primary: #1a1a1a;
--color-text-secondary: rgb(107, 114, 128);
--color-border: #e5e7eb;
--spacing-base: 1rem;
--card-max-width: 38.75rem;
--card-radius: 1rem;
--transition-speed: 0.2s;
}
/* Body styles */
body {
padding: clamp(1rem, 5vw, 2rem);
font-family: var(--font-primary);
line-height: 1.5;
color: var(--color-text-primary);
background-color: #f9fafb;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* Typography */
h1 {
font-size: 1rem;
font-weight: 600;
margin-top: 0;
margin-bottom: var(--spacing-base);
line-height: 1.4;
}
p {
color: var(--color-text-secondary);
font-size: 0.9375rem;
margin-top: 0.3125rem;
margin-bottom: 0.625rem;
line-height: 1.6;
}
/* Card component */
.card {
max-width: var(--card-max-width);
margin: 0 auto;
padding: var(--spacing-base);
background-color: white;
border: 1px solid var(--color-border);
border-radius: var(--card-radius);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
transition: transform var(--transition-speed) ease-in-out,
box-shadow var(--transition-speed) ease-in-out;
}
/* Card hover effects */
.card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
/* Remove margin from last paragraph in card */
.card p:last-child {
margin-bottom: 0;
}
/* Dark mode support */
@media (prefers-color-scheme: dark) {
:root {
--color-text-primary: #e5e7eb;
--color-text-secondary: #9ca3af;
--color-border: #374151;
}
body {
background-color: #111827;
}
.card {
background-color: #1f2937;
}
}
/* Responsive adjustments */
@media (max-width: 640px) {
:root {
--card-radius: 0.75rem;
}
.card {
padding: 0.875rem;
}
h1 {
font-size: 0.9375rem;
}
p {
font-size: 0.875rem;
}
}
/* Print styles */
@media print {
body {
padding: 0;
background: none;
}
.card {
box-shadow: none;
border: 1px solid #000;
}
}
/* body {
padding: 2rem;
font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
}
h1 {
font-size: 16px;
margin-top: 0;
}
p {
color: rgb(107, 114, 128);
font-size: 15px;
margin-bottom: 10px;
margin-top: 5px;
}
.card {
max-width: 620px;
margin: 0 auto;
padding: 16px;
border: 1px solid lightgray;
border-radius: 16px;
}
.card p:last-child {
margin-bottom: 0;
}
*/