3 ms·
#iphone[center-x] == #ipad[center-x]; #iphone[bottom] == #ipad[bottom]; Why are they assigning values using what's traditionally a comparison operator?
by lewispollard 13y ago
#iphone[center-x] == #ipad[center-x];
#iphone[bottom] == #ipad[bottom];
Why are they assigning values using what's traditionally a comparison operator?
- bryanlarsen 13y agoThat's not an assignment. That's telling the solver "Do whatever you need to do to satisfy this condition". Either the right or the left or both may change.
- d4tocchini 13y agoYeah, common in the Constraint-based, or Logic, Programming paradigm. This particular spec was established in Greg Badros & Alan Borning's Constraint CSS (CCSS): https://www.cs.washington.edu/research/constraints/web/ccss-uwtr.pdf https://www.cs.washington.edu/research/constraints/web/ccss-...
- lewispollard 13y agoInteresting, thanks.