API REVIEW REQUEST: Public API for Backgrounds and Borders on Region
david.grieve at oracle.com
Mon Aug 27 20:46:14 PDT 2012
In CSS, percentage values can be up to ±2^30%. In cases where the semantics is "proportional", the CSS value is clamped.
On Aug 27, 2012, at 8:15 PM, Jim Graham wrote:
> There is also the difference that the paints use 0-1 whereas CSS uses 0-100%. We'd have to consider whether we want them named similarly and whether we then want their ranges to match...
> On 8/27/12 4:35 PM, Richard Bair wrote:
>> That's a good question. The name for these originally was proportional, but I didn't understand what that meant immediately and thought "percentage" would make more sense. I though we used the term "percentage" elsewhere as well, but you are right that in the Paints we use proportional.
>> On Aug 27, 2012, at 4:08 PM, Jim Graham wrote:
>>> In other places we have 0->1 values being referred to as "proportional" - should that name be used here too?
>>> On 8/27/12 10:28 AM, Richard Bair wrote:
>>>>>> I think it would only be a two-valued enum, in which case what advantage does it have over a boolean? I believe that besides percentage, all other CSS values are reduced to an actual literal value in the end. Even "em" based computations are done by the CSS engine at the time that the value is looked up in the CSS engine.
>>>>> If there's going to be another one in future you could add it - not sure
>>>>> this is binary compatible and needed - but you are closing the door with
>>>>> this naming already a bit not?
>>>> I don't expect there to be one in the future, but as always you never know. In some places where it seemed reasonable that we might end up with a third state we have used an enum with only 2 values today, but in this case I don't expect there is any 3rd option. But you never know!
David Grieve | Principal Member of Technical Staff
Oracle Java Client UI and Tools
Durham, NH 03824
Oracle is committed to developing practices and products that help protect the environment
More information about the openjfx-dev