Improved styling of tables in docs#2603
Open
blighj wants to merge 1 commit into
Open
Conversation
|
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. |
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 ⭐ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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