Tuesday, 22 April 2008

Using Resharper 3.0 with CSS files causes Visual Studio 2008 to crash

Finally had enough of trying to edit CSS in Visual Studio 2008. Looks like Resharper is trying to work out the intellisense for the file and causes the whole solution to fall over. It's something that JetBrains are aware of but I can't seem to find a fix:


Anyway I've switched to using Notepad++ which I actually quite like. A friend suggested Topstyle 3 but I find the intellisense frustrating to use.

If anyone has a good CSS editor or even better if you know of a fix for Vis Studio 2008/Resharper 3.0 pls let me know!

Wednesday, 16 April 2008

Wicked streaming music site

Pandora.com have blocked users outside the States so I've been looking for a good online streaming music site to replace it. I'm not keen on LastFM and after loads of googling I've just found Musicovery:


Cool graphics, a sweet user interface (select the genres you want to hear and click your mood 'hotspot') it's the first site in a long time to really impress...

Tuesday, 15 April 2008

Safari bug which causes all CSS to be ignored

Our QA dept. recently raised a bug on a project I was working on suggesting Safari was ignoring all my CSS. OK bit wierd... so I checked it out and they were right all the other browsers were fine but Safari was rendering a page without styles.

So off I go doing the ol' half and half trick (pulling out half the CSS refreshing then halfing that until you isolate the issue). Finally I track it down to the fact that I had deleted a hex value but the empty background-color element was still in the CSS along with a badly used !important - background-color: !important.

Just to prove I wasn't going mad here is the HTML to prove it. Hopefully it will help some poor sod out there who is currently refreshing Safari with a rather bemused look on their face...


div { font:20px arial; width:250px; height:250px; background-color:!important; }

#red { width:250px; height:250px; background-color:red; }

#blue { width:250px; height:250px; background-color:blue; }



<div id="red">
This is red

<div id="blue">
This is blue


(Oh and before anyone says it... you should never use !important but that's another story...)

Monday, 14 April 2008

Subversion (SVN) cache is a pain in the arse

We use the Tortoise SVN client for source control and while it's a load better than using SourceSafe there is one issue that keeps coming up. In case you didn't know Subversion (SVN) will show a green tick for the files and folders that remain unchanged and red crosses to show files and folders that have been edited.

The problem is I select the folder and files with red crosses, commit to SVN, files get added but the red crosses still remain. Admittedly it doesn’t happen often but when it does there’s an easy fix – go into Task Manager and kill the TSVNCache.exe process:

TSVNCache.exe in Task Manager

The SVN folders should refresh and your green tick will come back… if it doesn’t make sure you have committed everything in that folder!

Friday, 11 April 2008

CSS hacks or filters that I can't live without!

Ok ok so there are various opinions on whether we should use hacks or filters to help us with CSS styles. Is it right, is it ethical, will we go to hell, whatever...

For what it's worth I don't believe in hacks - if your CSS is not cross browser compatible (at the very worst it should look the same in Firefox 2 and IE 7) then you need to look at the CSS, refactor the markup if necessary and tweak until it's correct.

BUT that is great if your starting a new project or have the ability to say 'right we're dumping this CSS and doing it all from scratch'. That's not always a possibility and you may find yourself looking at browser bugs that just need slight margin and padding tweaks to be correct.

So... waffle and social responsiblity lecture over. Please use these hacks as you wish, I've found them very handy although they are always my last resort!!!

(Copy and paste this code into a blank HTML file - If you are having problems cross browser, make Firefox look correct then change the other browsers accordingly)


/* ALL: Show in all browsers */
#hackthis { Width:200px; height:200px; background:green; border:1px solid #000; }

/*IE7: Purple IE6 Pink: */
* html #hackthis { *background: purple; -background: pink; }

/* SAFARI: Show in Safari only */
#hackthis:empty { background:yellow; }

/* OPERA: Show in Opera only */
@media screen and (min-width: 0px) { #hackthis { background:blue; }}


<div id="hackthis">

<p>FF = Green</p>
<p>IE7 = Purple</p>
<p>IE6 = Pink</p>
<p>Safari = Yellow</p>
<p>Opera = Blue</p>


First blog post...

So here it is... my (feeble) attempt to get some of my points of view as well as dev and CSS advice out and onto the web.

Comments are really welcome, especially if I'm wrong! Let's just try to share the love though ;D