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. anafrankisdead reblogged this from gousalsa
  4. gousalsa reblogged this from webkitbits
  5. bjoernwibben reblogged this from webkitbits
  6. sgautam reblogged this from webkitbits
  7. grugrut reblogged this from webkitbits
  8. azaqokay reblogged this from webkitbits and added:
    Coba ah
  9. hypnotizedbioluminescently reblogged this from webkitbits and added:
    I have wanted this for forever. Can’t wait until this gets enough adoption to actually use it.
  10. calo reblogged this from webkitbits and added:
    Whoa, no way.
  11. outsanity reblogged this from webkitbits
  12. chuoiforyou reblogged this from webkitbits
  13. webkitbits posted this