Maybe others here are more familiar with the newer features that we can use here and now - but reading through Dan Cederholm’s handcrafted css I realised i’m a bit behind.
Here’s a couple that I haven’t been taking advantage of:
Alpha transparency with rgba is an awesome time saver and more flexible way of specifying a color pallete.
rgba(0, 0, 0, 0.2)
a { color: rgb(1,2,3) }
a.lighten-up-a-bit {
color: rgba(1,2,3,.8);
}
alpha transparency in png’s is pretty well supported out-of-the-box now. you only need to add a filter for ie6.
.png-are-go {
background: url(omega.png);
}
* html .png-are-go {
background: url(blank.gif);
filter: progid: DXImageTransform. Microsoft. AlphaImageLoader (src='omega.png', sizingMethod='crop');
}
box-shadow:2px 2px 4px rgba(0, 0, 0, 0.1);
.shadow-boxer {
-moz-box-shadow:2px 2px 4px rgba(0, 0, 0, 0.2);
-webkit-box-shadow:2px 2px 4px rgba(0, 0, 0, 0.2);
filter: progid:DXImageTransform.Microsoft.Shadow(color='#dddddd', Direction=120, Strength=2);
}
Sorry if everyone knows all this already - but I flicked through the pages last night and have already found really good places for all of these in todays styling so I thought i’d share. Does anyone else have things that they would add to the list?
border-radius is a little controversial for me as there’s just far too many IE users I want to see nice corners - i would actually prefer to add all the extra markup and images so they can see them. But there’s lots of polish we can add for browsers that support it.
I think I’ve been out of the trenches for too long…