Re: Better Variables through Custom Properties

On Wednesday 2011-10-26 11:57 -0700, Tab Atkins Jr. wrote:
> On Wed, Oct 26, 2011 at 11:41 AM, L. David Baron <dbaron@dbaron.org> wrote:
> > Do all data-* properties inherit by default, or is there any
> > provision for such properties that do not?  (I'm not sure if there
> > needs to be; I'm just trying to understand what the model you're
> > proposing is.)
> 
> My intention is that they all inherit by default.

OK, so my next question:  the values of data-* properties are
essentially streams of values (or tokens).  What needs to happen to
come up with a computed value for such a property (prior to
inheritance)?  Most importantly, do data() expressions inside that
stream get evaluated when finding the computed value of a data-*
property (and the result inherited), or are the data() expressions
retained through inheritance and computed at the destination?

In other words, given:

<style>
  #one { data-a: blue; data-b: data(a); }
  #two { data-a: fuchsia; color: data(b); }
</style>
<div id="one">
  <div id="two"></div>
</div>

do you end up with div "two" being blue or fuchsia?

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂

Received on Friday, 28 October 2011 00:23:12 UTC