gss / parser

Constraint Cascading Style Sheets compiler
MIT License
48 stars 6 forks source link

2D vars constrained to dimension-agnotistic vars #17

Closed d4tocchini closed 10 years ago

d4tocchini commented 10 years ago

The following scenarios should result in a square box:

/* 2Dvar == number */
#box[size] == 100;

/* 2Dvar == var */
[square-size] ==  100; 
#box[size] == [square-size];

/* 2Dvar == element var */
#box[$square-size] ==  100; 
#box[size] == #box[$square-size];

We're already special casing dimensional element vars like width, height, x, y, etc., should be be relatively straight forward to implement above.

paulyoung commented 10 years ago

:thumbsup:

paulyoung commented 10 years ago

This makes sense but contradicts a previous decision that was made regarding 2D == 1D mappings.

Should #box1[size] == #box2[width]; now set the width and height of #box1?