You are here

Code Tag Styling

Trent's picture
I was in the War!
Community VIPKickstarter BackerCompetition Winner
Posts: 2997
Code Tag Styling
#1 Submitted: Wed, 25/02/2015 - 12:57

I was wondering if there was any chance of the forum's Code tag getting a bit of extra styling to make it stand out as actual code a bit better? Currently it just seems to be wrapped in a Pre tag which, while it retains white space, doesn't actually indicate the fact it's code. Having it actually styled to make it stand out would be useful, or ideally a syntax highlighter like https://highlightjs.org/ would be perfect. :)

shane's picture
Community Manager
Stainless
Posts: 1275
Submitted: Wed, 25/02/2015 - 13:47

Think I had originally put some basic styling in place but looking through my CSS I'm not sure! Anyways, I've added something that should highlight it better for now and I'll take a look at that link you sent.

using System;

#pragma warning disable 414, 3021

/// <summary>Main task</summary>
async Task<int> AccessTheWebAsync()
{
    Console.WriteLine("Hello, World!");
    string urlContents = await getStringTask;
    return urlContents.Length;
}
Trent's picture
I was in the War!
Community VIPKickstarter BackerCompetition Winner
Posts: 2997
Submitted: Wed, 25/02/2015 - 15:14

Awwesome, thanks, that's plenty for now :D

randomness