W3C home > Mailing lists > Public > www-style@w3.org > January 2011

in-between values

From: Brad Kemper <brad.kemper@gmail.com>
Date: Fri, 21 Jan 2011 09:54:32 -0800
Message-Id: <C2B7369B-2580-44E2-ABFE-3C4C41DF1BEE@gmail.com>
To: www-style list <www-style@w3.org>
I had an idea for a special value that could be used with a variety of properties, for transitioning, animating, or just picking single values that are in between two values that don't normally have any mid-points. So for instance:

background-clip: mid(border-box, padding-box, 0.24) /* would clip 1/4 of the way from border-box to padding-box */

background-clip: mid(padding-box, border-box, 0.24) /* would clip 1/4 of the way from padding-box to border-box */

color: mid(transparent, blue, 0.7) /* equivalent to color:blue; opacity:0.7 */

color: mid(blue, transparent, 0.7) /* equivalent to color:blue; opacity:0.3 */

border-style: mid(dashed,solid,0.5) /* spaces between dashes are half their normal length */

border-style: mid(dashed,none,0.5) /* spaces between dashes are twice their normal length, and used border-width is half of specified value */

overflow: mid(visible, hidden, 0.5) /* overflow is visible, but semi-opaque */

This wouldn't work for everything, and we'd have to define what property values it did work for. New modules could define how it worked for their own values.
Received on Friday, 21 January 2011 17:55:07 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:55 UTC