Skip to content

Improved styling of tables in docs#2603

Open
blighj wants to merge 1 commit into
django:mainfrom
blighj:issue_2128
Open

Improved styling of tables in docs#2603
blighj wants to merge 1 commit into
django:mainfrom
blighj:issue_2128

Conversation

@blighj

@blighj blighj commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

Addresses #2128, PR is a follow on from #2129. The various comments have been addressed.

For the row highlight I went with a color-mix approach, making it 5% darker/lighter for even rows and 10% for hover.
That is less colorful than what was there from the previous PR and my original prototyping. I'm still happy with it.

Color-mix is supported since May 2023 according to caniuse and mdn. I put in a fallback for the even row highlight, but the hover is more additive so I left it out.

image image

It's subtle in darkmode, but its a tradeoff with color contrast.
Currently the dark-mode hover highlight is already slightly outside AAA. If we aim for that, I'd recommend droping the hover highlight in darkmode, like I said above, additive.

If you are reviewing this, worth checking out how it looks in places with lots of tables near each other like
/en/dev/ref/templates/builtins/#floatformat

and somewhere with an example box (which has a similar background) right above a table
/en/dev/ref/templates/builtins/#yesno

@ronnzw

ronnzw commented Apr 29, 2026

Copy link
Copy Markdown

Thank you very much for your PR, I'm not sure if you are aware that we have plans to design the website. I wouldn't want to see such a fantastic work not being utilised. @sabderemane might be in a better position to advice.

@sabderemane

Copy link
Copy Markdown
Member

Late reply, I'm sorry but I think that make sense to get this on before the redesign phase, at least it will be used until the redesign and it's definitely an improvement ⭐

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.

3 participants