I18n format %d

I got an error when translating date to Chinese.
I18n::MissingInterpolationArgument
where %d is being replaced by "count"

This is a backward compatibility issue of rails.  I modified the file 
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/i18n_interpolation_deprecation.rb

and commented out the following section
          #string = string.gsub(/%d|%s/) do |s|
          #  instead = DEPRECATED_INTERPOLATORS[s]
          #  ActiveSupport::Deprecation.warn "using #{s} in messages is deprecated; use #{instead} instead."
          #  instead
          

Fancy button plugin for sass

html file:
<button>Click me</button>

These two buttons should look exactly the same with the following sass file.

sass file:
a.button, button
  +fancy-button($color, $font-size: default, $radius: default)

Or can separate structure and color by using
a.button, button
  +fancy-button-structure($font-size, $radius, $border)
  +fancy-button-color($normal, $hover: default, $active: default)

Some sass color manipulation:
$a = darken($b, 4)
$c = lighten($d, 8)
$e = mix(blue, red)

Video at:

z-index problem in ie7

In IE7, when child_of_top_1 crosses into top_2, child_of_top_1 gets cut off.  Thus appear behind of top_2.
--div top_1
  div child_of_top_1 with z-index = 2; position: relative/absolute
--div top_2

Solution: we need to give z-index to both top_1 and top_2
--div top_1 with z-index = 1; position: relative/absolute
--div top_2 with z-index = 0; position: relative/absolute

Remember that for z-index to work, we have to define postion: relative or position: positive