Skip to content

Conversation

@DavidOliver
Copy link
Contributor

Fixes #2191

@github-actions
Copy link

github-actions bot commented Jan 26, 2026

@DavidOliver DavidOliver marked this pull request as draft January 26, 2026 17:19
@DavidOliver DavidOliver marked this pull request as ready for review January 26, 2026 17:27
@josevalim
Copy link
Member

@DavidOliver I am afraid this fix is not correct. ExDoc allows you to define custom groups and, if we target the headers IDs here, then custom groups won't be correct. We need to add a generic selector. If it is not possible today without partially undoing #2164, then we can add new selectors to the template.

@josevalim
Copy link
Member

@DavidOliver perhaps a simple answer is to convert those to h2 and h3 in the template, so they don't need the special selectors no more.

@DavidOliver
Copy link
Contributor Author

ExDoc allows you to define custom groups

Ah - sorry!

perhaps a simple answer is to convert those to h2 and h3 in the template

I've just tried that and it's looking like it's going to work fine. I'll spend some more time checking and trying to find issues before pushing again.

@DavidOliver
Copy link
Contributor Author

Okay - I believe main headings are now level context-correct, which makes styling them simpler and more reliable. The 'Types' Summary subheading is now correctly sized.


docstring headings continue to be handled via the .docstring class. I took the opportunity to tweak them, very slightly opening up their margin-top spacing and making h4 smallcaps to distinguish from h3.

image

Before

image

After

image

Copy link
Member

@josevalim josevalim left a comment

Choose a reason for hiding this comment

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

This is perfect! ❤️

Let's add minification back and I can ship a new release!!!!

Previously, it seemed that esbuild was adding erroneous spaces in
':is(', but that isn't happening now. All minification is now enabled
whether in watch/dev mode or not, so that devs get the same results as a
production build. (Browsers do a good job of un-minifying for
inspection.)
@DavidOliver
Copy link
Contributor Author

Even though whitespace minification is enabled, I can no longer find any erroneous spaces in ':is('. Not sure what happened there.

All minification is now enabled whether in watch/dev mode or not, so that devs get the same results as a production build. (Browsers do a good job of un-minifying for inspection.)

@DavidOliver DavidOliver merged commit f44f6fe into elixir-lang:main Jan 27, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Section headings are styled unevenly (solution included)

2 participants