Kai_Wilke's avatar
Dec 01, 2022
Status:
Investigating

Review CSS for code snippets

Hi DevCentral Team,

the usable width of DevCentral content is sometimes very limited. Especially if you enable "Threaded format" (default mode) and post an iRule snipped far deep into a conversation, the <PRE> formated content will become hard to read. Thanks to annoying word-wraps...

TBH... i dont know a single developer which is turning on "word wrap" just to read the code better on very small monitors. Word wrap makes it basically just worse, but miliage may vary for 0,0001% of the human being... 😉

I would like to propose a CSS change to make it easier to read code snippets here on DevCentral. 

pre code {
    white-space: pre ;
    overflow-x: scroll ;
}

Cheers, Kai

5 Comments

  • Status changed:
    New
    to
    Investigating

    hmmmm - very interesting. the CSS we have now is...complex (and changing) but...this may just be doable.
    Will see what I can do.

  • Drop it somewhere in the CSS and add a !important to it... 😉

    On my Laptop i'm using a StyleBot plug-in to overwrite DevCentrals CSS as needed.

    But on my phone its almost impossible to read any code snippets. The word wrap makes it almost impossible...

    Cheers, Kai

     

  • Hi Lief,

    got a nice x-mas gift... 

    Now I can read iRule code from my iPhone 😬

    Many thanks and Cheers, Kai 

  • JRahm is, in your case then, Santa. 🎅🎅
    (Jason spent a BUNCH of time over the past few weeks scripting and manually fixing several hundred blargged code postings across the site. Despite efforts - there are still some lurkers. If you find another send it our way.)

    Cheers,
    Lief