4 ms·
It is absolutely amazing how many things we can do with CSS. It's as powerful as some programming language, while in fact being completely declarative and super
by yanis_t 5y ago
It is absolutely amazing how many things we can do with CSS. It's as powerful as some programming language, while in fact being completely declarative and super fast at the same time!
- swiley 5y agoOne really interesting feature of CSS is that it's a regular language (you can write a regex that matches all valid CSS files.) This is unusual even for many config formats.
- NackerHughes 5y agoI'm glad we sacrificed any concept of hierarchy, scope and structure so that CSS files can be parsed by regex.
- swiley 5y agoIt can still refer to hierarchies via selectors. Honestly I think that's a fantastic way to handle it.
- hnedeotes 5y agoI think it has good and bad sides, but looking at the specs/draft-proposal for the new functionality being drawn and the hoops the syntax has to make in order to preserve the "it's regular language" while incorporating long time needed functionality it seems like it's a bad choice - one of those things that in some years people will go, "why tf is this like this" I understand a proper parser would (perhaps) be more complex, but could also be open sourced in a lower level lang such as C, and then used by everyone, there's also already the full test suites for testing the output - maybe even Google+MS+Moz could open a contest - "fastest, most readable and efficient parser in C (or rust, wtv) takes 10k home"