Skip to content

Match Substack's font size and text column width - #231

Merged
thomasjpfan merged 1 commit into
scikit-learn:mainfrom
cakedev0:substack-like-reading-width
Nov 1, 2026
Merged

thomasjpfan merged 1 commit into
scikit-learn:mainfrom
cakedev0:substack-like-reading-width

Conversation

@cakedev0

@cakedev0 cakedev0 commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Follow-up to the readability remark in #228 (comment): the body text is very large and the column narrow, which makes posts hard to read on wide screens.

Both come from the theme, not from individual posts:

  • Font size. minimal-mistakes sets the root font size to 16/18/20/22px depending on the window width. An override to 15/17/19/21px was added in assets/css/main.scss in 2022 (d27bae7), but it has had no effect since 0b5b3f3 (Feb 2025) turned the file's front matter into comments: Jekyll now copies main.scss without compiling it (it is served raw at /assets/css/main.scss), and the live main.css uses the theme defaults. The archive-title and video rules of that file were lost the same way.
  • Column width. From 1024px wide, the theme reserves an empty right-hand column for a table of contents, even though no post uses toc. With the author sidebar on the left, the text is ~636px wide at 22px, 63 characters per line.

This PR restores the front matter and matches the Substack post used as a reference. Measured in headless Chrome:

Window width Substack Blog before This PR
1280px and wider 19px, 728px, 85 chars/line 22px, 636px, 63 chars/line 19px, 728px, 84 chars/line
1024px 19px, 728px, 85 chars/line 20px, 584px, 64 chars/line 19px, 728px, 84 chars/line
800px 19px, 728px, 85 chars/line 18px, 764px, 94 chars/line 19px, 728px, 84 chars/line
390px (phone) 17px, 358px, 45 chars/line 16px, 358px, 48 chars/line 17px, 356px, 44 chars/line

Each cell is font size, text column width, and the median number of characters on full lines (last line of each paragraph excluded), counted in the browser on the Substack post and on this post. At the same size and width, Substack's serif font and the theme's sans-serif fit about the same number of characters.

The font change scales the whole page (headings, navigation, sidebar), because the theme sizes everything relative to the root. Font family (Substack uses a serif) and line height (1.6 vs 1.5) are left unchanged.

🤖 Generated with Claude Code

Restore the front matter of assets/css/main.scss: since 0b5b3f3 it was
commented out, so Jekyll copied the file without compiling it and its
font-size override was ignored. Body text is now 17px on phones and 19px
from 768px up, instead of growing to 22px, and the post column is a fixed
728px instead of being squeezed by the empty table-of-contents column.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@welcome

welcome Bot commented Oct 29, 2026

Copy link
Copy Markdown

Thank You Banner

💖 Thanks for opening this pull request! 💖
scikit-learn community really appreciates your time and effort to contribute to the project.
Please make sure you have read our Contributing Guidelines and filled in our pull request template to the best of your ability.

@netlify

netlify Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for scikit-learn-blog ready!

Name Link
🔨 Latest commit 9d2df94
🔍 Latest deploy log https://app.netlify.com/projects/scikit-learn-blog/deploys/6ae36d43025c194d70b93c44
😎 Deploy Preview https://deploy-preview-231--scikit-learn-blog.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for scikit-learn-blog-view ready!

Name Link
🔨 Latest commit 9d2df94
🔍 Latest deploy log https://app.netlify.com/projects/scikit-learn-blog-view/deploys/6ae36d43ce819f80e3a7ebf7
😎 Deploy Preview https://deploy-preview-231--scikit-learn-blog-view.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@thomasjpfan thomasjpfan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thomasjpfan
thomasjpfan merged commit c16969e into scikit-learn:main Nov 1, 2026
8 checks passed
@welcome

welcome Bot commented Nov 1, 2026

Copy link
Copy Markdown

Congratulations Banner

Congrats on merging your first pull request! 🎉
We here at scikit-learn are proud of you! 💖
Thank you so much for your contribution 🎁

cakedev0 added a commit to cakedev0/my-scikit-learn-backlog that referenced this pull request Nov 2, 2026
done: Blog: [blog#231](scikit-learn/blog#231) (match Substack's font size), merged
todo: move [blog#228](scikit-learn/blog#228) from Waiting to Now: address lorentzenchr's review and answer jjerphan on the OpenBLAS threading layers
todo: move [sklearn#35181](scikit-learn/scikit-learn#35181) from Now to Waiting, adam2392's and antoinebaker's questions answered
add: Maintenance: follow up on [sklearn#35254](scikit-learn/scikit-learn#35254): settle option B with dherrera1911 and betatim (LDA solvers disagree with custom priors)
add: Maintenance: follow up on [sklearn#35209](scikit-learn/scikit-learn#35209): newton-cg LogisticRegressionCV test fails on the macOS x86_64 wheels
add: Maintenance: re-review [sklearn#34619](scikit-learn/scikit-learn#34619) (faster PCA mle; jberg5 addressed my comments)
add: Benchmarks: review [benchmarks#142](probabl-ai/scikit-learn-benchmarks#142) (cuML config) with the results of the AWS L4 run
add: Upstream: upstream to OpenBLAS or close [cakedev0/OpenBLAS#3](cakedev0/OpenBLAS#3) and [cakedev0/OpenBLAS#4](cakedev0/OpenBLAS#4)
todo: since dates on [sklearn#35062](scikit-learn/scikit-learn#35062) and [sklearn#35053](scikit-learn/scikit-learn#35053), and virchan's question on the latter
todo: lorentzenchr's note on [sklearn#35029](scikit-learn/scikit-learn#35029) in the fork#38 line

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants