none
Box around code block is too big.

    Question

  • Paragraph one.

    one_line_of_code();

    Paragraph two.


    As you can see above, the box drawn around the code block is the wrong size.  It seems to include some extra blank vertical space at the bottom of the code block inside the box.  The code block contains no vertical space, not even a line ending.

    Is this merely a matter of style of the code block?  Or did the code block formatter insert some bogus extra space?

    Either way, it's a bug to me.  It looks unpleasing and inconsistent.

    EDIT (More info): The final HTML is:

    <pre class="prettyprint" style="">one_line_of_code();</pre>

    ... with no extra line breaks, so it's a style issue.  The markup is correct.

    • Edited by Wyck Wednesday, July 17, 2013 2:03 PM More Info -- the markup is correct, the style is bogus.
    Wednesday, July 17, 2013 1:58 PM

Answers

All replies

  • If I remember correctly, this is actually by design. It was definitely also happening before the UX change. I'm pretty sure I remember a post from Ed Price saying that the code block was increased to that size to make it more noticeable.

    Don't retire TechNet!

    Wednesday, July 17, 2013 2:45 PM
    Moderator
  • I also dislike the extra blank space. I don't see the need when the code block has a border. But it is unfortunately by design.

    You might add a feature request in this Wiki article:

    http://social.technet.microsoft.com/wiki/contents/articles/4703.feature-requests-for-technet-and-msdn-profiles-and-social-platform-tools.aspx


    Richard Mueller - MVP Directory Services

    Wednesday, July 17, 2013 2:57 PM
    Moderator
  • There seems to be a minimum size for the box to allow room for about 3.5 lines of code. But what bothers me even more is that the distance between the box and the paragraph above is more than the distance between the box and the paragraph below.  This visually associates a box with the paragraph below it rather than the paragraph above it.  Can't find any typography references to back me up here, but this seems wrong because it suggests some kind of hierarchy or association of paragraphs that doesn't exist.


    one

    line_one();

    two

    line_one();
    line_two();

    three

    line_one();
    line_two();
    line_three();

    four

    line_one();
    line_two();
    line_three();
    line_four();

    five

    line_one();
    line_two();
    line_three();
    line_four();
    line_five();

    end


    Thursday, July 18, 2013 2:10 PM
  • I completely agree with you on that point.

    Don't retire TechNet!

    Thursday, July 18, 2013 2:19 PM
    Moderator