Christian Heilmann

CSS Mirror Editing with Sourcemapped files (Sass, React…) – we need you to make it better

Friday, April 8th, 2022 at 1:14 pm

Using the Edge Developer Tools for VS Code extension, you can live edit files in the browser developer tools and all the changes are also happen in your source files. That way you never lose a change you did to your web projects in the developer tools. It makes tweaking a layout much more convenient than jumping in between editor and browser all the time.

One huge request we got from users was to support Sass, CSS-in-JS and many other abstractions. This is now possible, if you target Edge Canary as the functionality is only available in Edge > 101.

Sourcemaps demo running inside Visual Studio Code

You can see the editing in action in the following screencast:

To make it easier for you to play with this, we’re providing a demo app that already has a `launch.json` that targets Canary for you. You can download the app as a zip and use it like this:

  1. Make sure you have the Microsoft Edge DevTools for Visual Studio Code extension installed
  2. Clone this repo or download the app as a zip and unpack it
  3. Open the folder in Visual Studio Code
  4. Run `npm i` in the Terminal
  5. Run `npm start` in the Terminal
  6. Switch VS Code to “Run and Debug” and run “Launch Edge and Attach DevTools” (the project is already configured to use Edge Canary, just make sure you have it installed)
  7. Start editing Styles in DevTools and watch them sync!

We have an issue open in the Extension repository and we’d love to get your feedback there!

Share on Mastodon (needs instance)

Share on BlueSky

Newsletter

Check out the Dev Digest Newsletter I write every week for WeAreDevelopers. Latest issues:

Don't stop thinking, AI Slop vs. OSS Security, rolling your own S3 Despite AI you still need to think, Bitter lessons from building AI products,  AI Slop vs. OSS security and pointer pointer…
200: Building for the web, what's left after rm -rf & 🌊🐴 vs AI What remains after you do a rm -rf? Why do LLMs know about a seahorse emoji? What image formats should you use? How private is your car?
Word is Doomed, Flawed LLM benchmarks, hard sorting and CSS mistakes Spot LLM benchmark flaws, learn why sorting is hard, how to run Doom in Word and how to say "no" like a manager.
30 years of JS, Browser AI, how attackers use GenAI, whistling code Learn how to use AI in your browser and not on the cloud, why AI makes different mistakes than humans and go and whistle up some code!
197: Dunning-Kruger steroids, state of cloud security, puppies>beer

My other work: