3 ms·
It is not trickery, it is constraints declarations. If you want to go with scripting you will end with your own ad-hoc incomplete bug-ridden slow implementatio
by thesz 12y ago
It is not trickery, it is constraints declarations.
If you want to go with scripting you will end with your own ad-hoc incomplete bug-ridden slow implementation of half of CSS engine, to paraphrase famous law. Bugs will be prevasive, because your "solver script" will be good in most cases except some where it will be glitching or unstable.
You can take a look at QOCA layout constraint solving engine to get a feeling how much code you will write in the end.
- iLoch 12y agoI should have been more clear: I'm not suggesting replacing CSS. I do think however that CSS doesn't need to be siloed. We have a great scripting language (JS), why not just incorporate that with a way to modify styles (CSS) without the need to do all these fancy hacks for calculations. Even the calc function in CSS feels like a hack.