Ben Cochran - Blog

David Baron's weblog: calc()

I’ve been working on adding support for the calc() proposal that’s in CSS3 Values and Units. I’ve now added support for -moz-calc(), -moz-min(), and -moz-max() functions to a significant number of properties. (Note that min() and max() do not have -moz- prefixes when they’re inside an expression, but they do have prefixes when they’re the top-level expression.)

Support for calc() allows style sheets to write things like this:

p { 
   width: -moz-calc(50% - 4px);
}

Via glazou on Twitter.

Dear god yes. (A coworker and I were praying for this a few years ago… great to see some work on prototyping it)

(Source: journo-geekery)

Notes:

  1. bencochran reblogged this from journo-geekery and added:
    Dear god yes. (A coworker and I were praying for this a few years ago… great to see some work on prototyping it)
  2. seancrowe reblogged this from journo-geekery and added:
    This could get real interesting, real fast.
  3. journo-geekery posted this