mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-07 18:18:42 -05:00
- Create shared/ directory with centralized SCSS partials and site-head.html so site subsites (about, community, newsletter) no longer duplicate inline header config or reference book-only styles - Fix subscribe modal: change script src from broken relative path (../../book/quarto/assets/scripts/subscribe-modal.js) to absolute URL (https://mlsysbook.ai/vol1/assets/scripts/subscribe-modal.js) which the rewrite-dev-urls.sh script converts for dev preview automatically
36 lines
1.1 KiB
SCSS
36 lines
1.1 KiB
SCSS
// =============================================================================
|
|
// FIGURE STYLES — Spacing, captions, responsive images
|
|
// =============================================================================
|
|
|
|
// Figure spacing improvements
|
|
figure {
|
|
margin-top: 2rem !important;
|
|
/* More space above figures */
|
|
margin-bottom: 1.5rem !important;
|
|
/* Consistent space below */
|
|
}
|
|
|
|
// Responsive figure images: scale to container, preserve aspect ratio
|
|
// Fixes Python-generated figures that have explicit width/height and can render stretched
|
|
.quarto-figure img.figure-img,
|
|
.cell-output-display img.figure-img {
|
|
max-width: 100% !important;
|
|
height: auto !important;
|
|
}
|
|
|
|
// Figure captions
|
|
.figure-caption,
|
|
.caption,
|
|
figure figcaption {
|
|
margin-top: 1rem !important;
|
|
/* Space between image and caption */
|
|
font-size: 0.9rem !important;
|
|
/* Slightly smaller caption text */
|
|
color: #666 !important;
|
|
/* Subtle caption color */
|
|
line-height: 1.4 !important;
|
|
/* Better caption readability */
|
|
text-align: left !important;
|
|
text-align-last: left !important;
|
|
}
|