Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve CSS layout #5602

Merged
merged 1 commit into from
Jul 14, 2019
Merged

Improve CSS layout #5602

merged 1 commit into from
Jul 14, 2019

Conversation

timhoffm
Copy link
Contributor

@timhoffm timhoffm commented Jul 14, 2019

This PR improves some aspects of the documentation layout.

Links

  • Links are now colored #606413, a muted version of the green logo color #C9D22A.

  • Hovered links are now colored with the blue logo color #009de0.
    before:
    image
    after:
    image

  • Links in the sidebar do not have dotted underlines. This gives a more clean look. The color itself should be indication enough that this is not normal text. Highlighting and underline on hover is kept.
    before: image after: image

  • The same hold for the links in the Reference TOC:
    before: image after: image

Font

  • The body font size is reduced from 17px to 16px. 17px felt a bit too large and 16px is actually the most recommended body font size.
  • The headings are switched from serif to sans-serif. IMHO sans-serif reflects the clean and simple approach of pytest better.

Margins

  • Code blocks and andmonitions were layouted so that the contained text lines up with the body text. As a result the box itself spread out beyond the margin. This gave a false impression of scope, because the box does not follow layout and indentation lines, e.g.

image

This has been changed so that the edge of the box aligns with the text

image

  • Code elements in the reference section are now separated by a horizontal line (see also the picture above). This gives a clearer structure and helps to distinguish the different code elements.

  • Lists elements get 0.5em vertical margin (before/after):
    image image

@codecov
Copy link

codecov bot commented Jul 14, 2019

Codecov Report

Merging #5602 into master will increase coverage by 1.35%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5602      +/-   ##
==========================================
+ Coverage   94.75%   96.11%   +1.35%     
==========================================
  Files         117      117              
  Lines       25775    25775              
  Branches     2495     2495              
==========================================
+ Hits        24424    24773     +349     
+ Misses       1032      697     -335     
+ Partials      319      305      -14
Impacted Files Coverage Δ
testing/test_pytester.py 89.27% <0%> (+0.57%) ⬆️
src/_pytest/pytester.py 90.96% <0%> (+1.03%) ⬆️
src/_pytest/capture.py 94.75% <0%> (+1.31%) ⬆️
testing/test_terminal.py 99.84% <0%> (+1.4%) ⬆️
src/_pytest/terminal.py 93.02% <0%> (+2.27%) ⬆️
src/_pytest/unittest.py 94.97% <0%> (+5.58%) ⬆️
src/_pytest/debugging.py 90.05% <0%> (+20.41%) ⬆️
testing/test_pdb.py 99% <0%> (+51.68%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6afbac2...da5add1. Read the comment docs.

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

Great improvements, thanks!

@nicoddemus nicoddemus merged commit 8f2f3bb into pytest-dev:master Jul 14, 2019
@timhoffm timhoffm deleted the doc-css branch July 15, 2019 08:54
@timhoffm timhoffm mentioned this pull request Jul 15, 2019
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