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
Reduce spacing of heading cells #4786
Conversation
Is it possible (/practical) to, when the first cell is a heading, leave less space above it, so the document starts slightly nearer the toolbar? Not to worry if that's difficult. Otherwise, I think it looks good. |
I suppose we can add a |
I actually added a 1 em extra spacing at the top of the notebook because On Sun, Jan 12, 2014 at 8:02 AM, Matthias Bussonnier <
Brian E. Granger |
I like the general idea... and the code looks good 👍 |
@@ -16,7 +16,7 @@ div.text_cell_render { | |||
resize: none; | |||
width: inherit; | |||
border-style: none; | |||
padding: 5px; | |||
padding: 0.5em 0.5em 0.5em 0.4em; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the effect of the tiny nonuniformity here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use 0.5em all around, but the text in our code cells in indented
from the L by 0.4em. I wanted the heading/md text to match that indentation
level. But this reminds be that we have a less variable for this that I can
use.
On Sun, Jan 12, 2014 at 11:40 AM, Min RK notifications@github.com wrote:
In IPython/html/static/notebook/less/textcell.less:
@@ -16,7 +16,7 @@ div.text_cell_render {
resize: none;
width: inherit;
border-style: none;
- padding: 5px;
- padding: 0.5em 0.5em 0.5em 0.4em;
what is the effect of the tiny nonuniformity here?
—
Reply to this email directly or view it on GitHubhttps://github.com//pull/4786/files#r8814946
.
Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu and ellisonbg@gmail.com
OK I think all review changes have been made. |
h2 {font-size: 157.1%; margin: 1.27em 0 0 0; font-weight: bold; line-height: 1.0;} | ||
h3 {font-size: 128.6%; margin: 1.55em 0 0 0; font-weight: bold; line-height: 1.0;} | ||
h4 {font-size: 100%; margin: 2em 0 0 0; font-weight: bold; line-height: 1.0;} | ||
h5 {font-size: 100; margin: 2em 0 0 0; font-weight: bold; line-height: 1.0; font-style: italic} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just add semicolons at the end to keep consistency...
@ellisonbg : Do you want to respond to @damianavila's requests for semicolons? |
Yep On Fri, Jan 24, 2014 at 11:07 AM, Thomas Kluyver
Brian E. Granger |
Crap lost a comment. From a code perspective, this is ready to go. I addressed all the comments and cleaned up a bit more. We could probably fine tune the style more, but I think it is much better and we probably just need to live with this for a while to see how we like it. I am +1 for merging unless someone wants to try it out more. I have not made any style changes since we looked at in at the dev meeting. |
Reduce spacing of heading cells
The spacing above and below of heading cells has been off for a long time - since the very early days of the notebook. This is an attempt to improve the design of those elements. Here is a rough sketch of what I have done:
line-height
of headings have been set to 1.0. The reason for this is that line-height add of its space above and below the text. Thus it cannot be used to add asymetric spacing to headings. The sense from everyone is that we want more space above than below.margin-top
of 1em (measured wrt to the base font size of 14px). 5 and 6 get slightly smaller.If you want to try these changes out in your
custom.js
(please do) add the following:Here is what this looks like:
Another screenshot:
Another screenshot: