← Back to context

Comment by eternityforest

2 years ago

Didn't think of that case!

But if you had a full algebra/constraints/logic programming system, you could set a solver rule where the first column items had width X, with fairly high priority.

And other rules(like fit-content) on that same property, to specify what the width should be.

The solver would figure out what X should be, and everything in the first column would have that width unless something even more important changed it.

You could even give rules a "layer" in addition to the solver cost, and properties would only take rules from the highest active layer, so you could still do overriding, just explicitly instead of with specificity.

To avoid confusion with different CSS files, layer could be a hierarchal tuple, and you could manually specify the layer of an imported file, forcing all its layers to become sub layers of the one you specified, so you could override a file, or merge two files in one layer, etc.