Wednesday, May 2nd

CSS layout gets smarter with calc()

Didn’t even know about this feature, but it’s brilliant. A quick idea of what you can do:

#bar {
  height: calc(10em + 3px); 
}

And regarding current support:

The calc() property for lengths is available now in Chrome 19 (Dev channel build) by use of the ’-webkit-calc’ property, in Firefox since version 8 using the ’-moz-calc’ property and in Internet Explorer since version 9 unprefixed.

  1. kingslaaay reblogged this from webkitbits
  2. wachunei reblogged this from gousalsa
  3. navoski reblogged this from gousalsa
  4. gousalsa reblogged this from webkitbits
  5. sgautam reblogged this from webkitbits
  6. isasetiawan reblogged this from webkitbits and added:
    Coba ah
  7. izzittrue reblogged this from webkitbits and added:
    I have wanted this for forever. Can’t wait until this gets enough adoption to actually use it.
  8. calo-blog reblogged this from webkitbits and added:
    Whoa, no way.
  9. xciii-d reblogged this from webkitbits
  10. webkitbits posted this