Saturday, November 19, 2011

cfdump style fix

Sometimes when working with ColdFusion you just want to quickly dump out some variables into the page to see what's going wrong.  Normally this works fine, but if you happen to be working with a site that has a dark theme with a light colored font on the body, it can sometimes be difficult to read the output.

A simple solution is to add a class to your default stylesheet for the site.  Include the following rule:



.cfdump_struct {
     color: #000000 !important;
}

This will ensure that the body of the cfdump output is displayed in a dark color to make for easier reading.

1 comment:

  1. > ... a dark color ...

    Also known as "black". :)


    Of course, you can use "color: black !important" which is a little clearer and less typing.

    Also worth pointing out: any time you have three identical pairs, you can use a three digit hex code, so #000000 becomes #000, #FF9933 becomes #F93, #0000FF becomes #00F, and so on.

    ReplyDelete