Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I think the question that's not answered clearly is: why can Sass parse it, but browsers can't?

I'm tired but here goes…

Parsing the proposed syntax isn't the real problem; it's parsing plus executing the selectors. Long story short: CSS is programming language that uses a JIT compiler to render CSS.

Sass doesn't run anything; it just transforms one text format into another text format; it's the browser runs the CSS.

Compared to what's required for CSS to run inside of a browser, interface with HTML, JavaScript and SVG (for starters), the Sass parser is trivial in comparison.

> Does this all just boil down to "we don't want to have the work of rewritting the CSS parser"?

Seriously, that's a non-starter for a code base the size and complexity of a browser engine. Not to mention it could mean throwing away years of work on these browser engines.

It's way too late for that… Chrome already has option 3 implemented; to rewrite something would delay this by… a few months? Maybe a year?

Think about it: should Apple, Google, Mozilla, Microsoft, Igalia rewrite code that's already running successfully for billions of users to accommodate whiney developers, many of whom are going to keep using Sass anyway, no matter what they do?

I doubt any of us, if we were leading these teams, would think rewriting major portions of the browser engines makes any kind of sense at this point.

[1]: https://drafts.csswg.org/css-nesting/



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: