Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 16, 2024. It is now read-only.

Limit content width - Take 2 #13

Merged
merged 4 commits into from
Jan 19, 2018
Merged

Limit content width - Take 2 #13

merged 4 commits into from
Jan 19, 2018

Conversation

pradyunsg
Copy link
Member

From #11.

Some extra styling to make things look nicer.

Before:

screen shot 2017-12-22 at 1 16 25 am

After:

screen shot 2017-12-22 at 1 14 45 am

@pradyunsg pradyunsg self-assigned this Dec 21, 2017
@pradyunsg pradyunsg requested a review from theacodes December 21, 2017 19:47
@@ -71,7 +72,7 @@ $(function() {
bodywrapper.css('margin-left', bw_margin_collapsed);
sidebarbutton.css({
'margin-left': '0',
'height': bodywrapper.height(),
'height': documentwrapper.height(),
Copy link
Member Author

Choose a reason for hiding this comment

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

The reason for making this change is: If there's an element with margin at an extreme, the sidebar didn't take 100% height of the white portions on load.

This fixes that issue.

@@ -0,0 +1,194 @@
/*
Copy link
Member

Choose a reason for hiding this comment

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

Why did we end up with a totally new file here for this? Seems unrelated to the body size change?

@pradyunsg
Copy link
Member Author

pradyunsg commented Jan 3, 2018

@jonparrot there's an inline comment and also 2 commits with summaries describing it.

The reason for making this change is: If there's an element with margin at an extreme, the sidebar didn't take 100% height of the white portions on load.

This fixes that issue.

I'm gonna assume it just slipped under the radar here.

@theacodes
Copy link
Member

Gotcha, so you're essentially overriding the sidebar.js from the upstream theme?

@pradyunsg
Copy link
Member Author

pradyunsg commented Jan 4, 2018 via email

@pradyunsg
Copy link
Member Author

pradyunsg commented Jan 4, 2018 via email

@theacodes
Copy link
Member

No worries - just a question: is it possible for us to make the change to that script upstream and have it work for both variants?

@pradyunsg
Copy link
Member Author

I didn't wanna fiddle with upstream.

A quick look suggests this exact change will add 1em of height to the lower portion of the sidebar, for example when there's a list involved.

It'll sort of be more consistent across various pages -- currently an element at an extreme that has a margin can cause bodywrapper to be shorter than documentwrapper. But it's a change no one would notice on the site.

@pradyunsg
Copy link
Member Author

In a word: Yes.

@theacodes
Copy link
Member

Let's do it then. Python proper still isn't using the upstream theme (I need to pick that thread back up)

@pradyunsg
Copy link
Member Author

Cool. I'll drop the change here and put it in there.

@pradyunsg
Copy link
Member Author

@jonparrott I've removed sidebar.js and made python/python-docs-theme#9.

@theacodes
Copy link
Member

@pradyunsg great, we can merge this. :)

@theacodes theacodes merged commit ab09045 into pypa:master Jan 19, 2018
@pradyunsg pradyunsg deleted the fixed-width-content-take-2 branch January 19, 2018 18:46
@pradyunsg
Copy link
Member Author

Now to trigger a doc rebuild of pip, PyPUG and the rest. :P

@pradyunsg
Copy link
Member Author

@jonparrott sphinx 1.7 has an upstream fix for this. I'm tempted to revert the changes here now and just move to the newer version of sphinx.

@pradyunsg
Copy link
Member Author

Your thoughts?

@theacodes
Copy link
Member

@pradyunsg I'm totally cool with that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants