4 ms·
I wonder if CSS could be translated/compiled to sets of linear constraints? Obviously just the parts that affect layout would be relevant for this translation.
by ZenPsycho 8y ago
I wonder if CSS could be translated/compiled to sets of linear constraints? Obviously just the parts that affect layout would be relevant for this translation. But I wonder if it's possible to come up with a formalised mathematical relationship between the byzantine context sensitive rules of CSS layout, and the smaller set of building blocks that cassowary supplies.
And then, I wonder how much could be round tripped? Do flexbox and grid fill enough of the gaps to make systems of linear constraints fully expressible in terms of flexbox/grid? If not, where are the remaining gaps, and are they useful enough "real world" usecases that you couldn't practically make constraints->css a (potentially) lossy translation. It kinda looks like GSS attempted this, but I wonder if GSS can be improved upon to rely less on JS for filling the gaps in 2018?