New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write chapter about modifiers in ref() #21
Comments
Perhaps As for the error or choosing the first, perhaps it should do both? I would like being able to use these modifiers on variable height as well so you could do something like this:
So the column with the largest amount of text will have the largest height, and the other column next to it has the same height. |
This is exactly what they are meant for. In the example I used fixed values just to illustrate the concept, but if the height is dependent on the parent (with percentages), for example, or bases on the content text, or ref'd, it would work just as well, no worries. |
That's an edge case but in your example I think if you are using min it should select |
How is equal height columns an edge case? And yes, you are totally right, my example is screwed up. It should select elementC instead. But why do you think it should select elementB with min? elementA is only 100 points tall, so it should be selected, don't you think? Positive or negative would depend on the property you are ref'ing, and I guess the height property will have its own requirements, but that's besides the point. |
Yes indeed. |
I'll sum up the questions of this thread, to focus our discussion: 1 - If
In the case of A, it seems pretty obvious that 2 - We need to agree on a list of modifiers. My proposal is:
|
1 - It should error out to the first match (it could be considered an alias of element[1]). But you should be able to use 2 -
|
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:
Complete example:
Udated: fixed the example
The text was updated successfully, but these errors were encountered: