Some new styles for my code samples

Today I've altered my Css styles the PRE elements that are used to display code snippets on both my regex blog and my asp blog. The new style definition is:

PRE.CodeSnippet
{
    background-color: #f0f0f0;
    padding  : 1em;
    margin  : 0px 2em;
    padding  : 1em;
    border  : 1px dotted gray;
    font-family : "Lucida Console";
    font-size : 1em ;
    color  : #000000;
}

 

A good example of that can be seen here:
    http://blogs.regexadvice.com/dneimke/archive/2004/01/23/379.aspx

All code in my blogs in marked-up using my MarkUp tool. The code (and .exe) for this tool can be downloaded from its new WorkSpace on GotDotNet:
    http://workspaces.gotdotnet.com/markup

Currently the tool has language definitions for the following languages:

  • Javascript
  • C#
  • VB.NET
  • TSQL

...and can emit marked-up code in either FONT or SPAN elements - the SPAN elements use Css classes whereas the FONT elements use in-line color attributes. I'm using the SPAN format because it gives me central control over the coloring and styling of my samples.

1 Comment

  • Thanks Scott, I'd never heard of that application until now. I'm not really sure *why* they choose to display blog content that way? They basically grab the content from the feed, strip the line-breaks and render it - client-side! That seems like a bizarre way of doing it if you ask me. A) They are altering the content (stripping linebreaks and B) double-handling it by writing out the javascript, then executing the javascript seems a little odd.

Comments have been disabled for this content.