Hacker News new | comments | show | ask | jobs | submit login

(Disclaimer: I'm working on http://www.webflow.com to try to solve this exact problem.)

I've been thinking about this issue a lot over the last year, and it's really as hard as you state (and then some). We ended up having to create our own supersets of the DOM/CSSOM in order to keep track of individual elements/selectors as they are created/removed/changed. I would be very surprised (and pleased) if Mozilla was able to implement this in a way that works without lots of additional/manual inputs. If you think JS source maps are a hard problem to solve, I'd say this one is at least an order of magnitude harder.

My thought is that this is really most useful for CSS and the transformations that SASS/LESS are capable of are relatively mundane in comparison to CS -> JS. In addition I only see this as a tool for development, not something that I would want running in production so you don't have the concerns over increased file size or still supporting minification that you do with source maps, assuming you want source maps in production for error reporting.

I can envision simply using structured CSS comments to pass the needed information to the browser. The browser only needs a structured pushing protocol, baseline comment format, probably handling of comments that indicate file boundaries (used for pushing to the correct resource) and a 'plugin api' to allow plugins to parse other comments in a meaningful way, SASS/LESS could provide a 'Dev tools' plugin to parse the comments and support whatever editing features they wanted. They would also have to support generation of the comments in the preprocessor.

The important bit is a standardized pushing protocol, a standardized way to provide additional mapping information and a standardized 'plugin' style system to allow things like SASS to add to dev tools additional editing support.

Just one theoretical approach, still a ton of work, but I really think there is a lot of developer time spent dealing with this issue so it may well be worth it.

I tried to enter my email address to get notification of your launch. Nothing happened when I clicked the button (using IE 8)

Woah, oops - thanks for letting me know. Trying to stand up a VM right now so I can see what's going on.

Edit: Should be fixed now.

I'm having similar problem on firefox 19 on ubuntu 12.10 x86-64. After some seconds it says "Hmm, that email address doesn't look right...".

I'm not sure I would say that JS source maps are a hard problem to solve.

Fair point. However, it has taken years to get to where we are today (CoffeeScript just shipping support, limited browser support), so it doesn't seem to be an easy problem either.

The delay in CoffeeScript support had to do with the design of the compiler more than anything. CoffeeScriptRedux [1] has had this in for quite some time.

[1] https://github.com/michaelficarra/CoffeeScriptRedux/

Indeed the ecosystem and support around source maps isn't super easy in total, but I wouldn't call any particular point in isolation particularly difficult. It's just that there is quite a few of them.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact