Musings<Biefeld>
- curiosities of development, life, the universe and everything -
Posts Tagged ‘HTML’
Tuesday, April 14th, 2009


I just finalized my text color theme for visual studio. Just thought I would share it with everyone. It is geared towards those of you who have resharper installed, but it should still work fine without it.


The theme is based off of the textmate twilight theme. I was going for a low contrast theme that is easy on the eyes.  I have tried the Vibrant Ink theme and it is too abrasive for me. My goal was to make warnings and errors blatantly obvious and distinguish classes from interfaces. I also love how the comments are dark and do not draw attention, I am not a big fan of comments.  I think the code along with BDD tests should be self-explanatory of what is going on.


All resharper warnings show up as red text. Build errors have red squiggly lines under them.  Breakpoints have red background.


Here is a c# example:



Here is an example of an aspx page:



Style sheet example:



JavaScript example:



Let me know if you have any suggestions.


Grab the Visual Studio settings file here!


Monday, November 24th, 2008

Here is some useful JavaScript that wrote today to change a CSS class based on the state of a checkbox.

function replaceCssClassOnElementBasedOnCheckBoxState(checkboxId, elementToChangeId, checkedCssClassName, uncheckedCssClassName)
{
    var selectedElement = document.getElementById(elementToChangeId);
    var checkBox = document.getElementById(checkboxId);
    if(selectedElement && checkBox)
    {
        if(checkBox.checked)
            selectedElement.className = checkedCssClassName;
        else
            selectedElement.className = uncheckedCssClassName;
    }
}

For Example:

The style of this div should change based on the state of the checkbox.

Musings<Biefeld> is proudly powered by WordPress
Entries (RSS) and Comments (RSS).