It would be helpful if the CSS rendering of the code tag could be changed, to:

- slightly reduce the text size - from current 0.923em to something between 0.88em and 0.9em -- so that slightly more text fits on an unwrapped line without it becoming apparently smaller than the main body text.

- make the 'code' div horizontally scrollable, rather than wrapping, as the current state results in very confusing listings.

I hope these would be considered good; perhaps there's a better way?

Comments

rivimey’s picture

Project: Drupal.org site moderators » Bluecheese
Version: » 7.x-2.x-dev
Component: Textual improvements » User interface
drumm’s picture

drumm’s picture

Title: Change rendering of 'code' tag » Reduce font size of 'code' tag

#2927344-30: Specifically warn about end dates for PHP support for old versions is the first example I found with both inline and block code.

Down to .85em looks okay to me. That comes out to 11px, vs. 12 we have now.

And the pre.codeblock padding could be reduced slightly to padding: 0.25em 0.5em;

#2480515: Code blocks should show 80 characters without wrapping has a bunch of discussion about more-complicated solutions. I think this issue stands well on its own as an incremental improvement.

  • d4376f6 committed on 2532114-code-tag-font-size
    #2532114 - Reduces the code block font size.
    

  • d4376f6 committed on 7.x-2.x, dev
    #2532114 - Reduces the code block font size.
    
  • drumm committed f362c19 on 7.x-2.x, dev
    Issue #2532114: De-dupe styles
    

drumm’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.