AXR/Specification — Issue #21: Write chapter about modifiers in ref()
Author: veosotano
Created: 2011-12-15 19:01:52+00:00
State: open
Labels: task

When the selector in a ref() points to multiple elements, by default the first one is chosen (or should it error out?), unless you set a modifier (min, max, avg, total), in which case the element is taken from the appropriate element (or in case of total [or should it be called "sum"?] from all of them).

For example:

ref(total width of foo) //uses the sum of all widths of all selected foo elements
ref(avg height of bar) //uses the average of all heights of all selected bar elements

Complete example:

XML:

HSS:
root
{
elementA
{
width: ref(max height of *); //this would choose the height of elementB
height: 100;
}
elementB
{
height: 150;
}
elementC
{
height: 200;
}
}