in

ASP.NET Weblogs

This Blog

Syndication

ShowUsYour<Blog>

Irregular expressions regularly

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.

Published Feb 03 2004, 11:22 PM by digory
Filed under:

Comments

 

Scott Mitchell said:

Darren, while your code samples look very pretty in my browser, BlogLines (http://bloglines.com) basically shows your blogs as one long line - no spacing - meaning there is a lot of horizontal scrolling going on for your blog there. :-(

Just an FYI...
February 3, 2004 12:32 PM
 

Darren Neimke said:

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.
February 3, 2004 4:48 PM
 

TrackBack said:

April 13, 2004 3:52 AM

Leave a Comment

(required)  
(optional)
(required)  
Add