3 ms·
Live preview of vanilla CSS as I change it?
Doing a ton of classless CSS right now and plain vim is slowing me down little due to lack of WYSIWYG, which normally doesn't bother me at all.
Is there a tool that lets me see my CSS in one pane and the rendered HTML file in another, such that if I tweak the CSS I can see the rendered changes live in the HTML? Bonus if Markdown is supported.
- Raed667 4y ago`npx parcel src/index.html` is probably the easiest way to do it.
- thro1 4y agoHow it was done with Firefox: "Orthogonally to that, I had userContent/Chrome.css opened in the sidebar and on every key up I unregister and loadAndRegisterSheet with it :) (the styles were applied live to documents or browser when the sidebar was open and saved on unload)." https://news.ycombinator.com/item?id=33924565 https://news.ycombinator.com/item?id=33924565
- tomcam 4y agoFantastic, thank you
- deleted 4y ago[deleted]
- johncoltrane 4y agoThere are plenty of solutions to that specific problem. Nowadays, I only work on Nuxt/Next/Astro projects that come with hot reload out of the box so I don't have a need for it anymore, but I have used https://github.com/cortesi/devd https://github.com/cortesi/devd a lot in the past, with much success. A zero-install solution would be to use the "workspace" feature of Chrome's Dev Tools: 1. Open your index.html file in Chrome. 2. Open the Dev Tools. 3. In the "Sources" tab, activate the "Filesystem" sub-tab. 4. Click on "+ Add folder to workspace" and choose the directory containing your index.html and index.css files. 5. Edit the index.css file with autocompletion and live preview. 6. Save your work so that it is synchronized with your filesystem. In action: https://i.imgur.com/slcSt9X.gif https://i.imgur.com/slcSt9X.gif
- deleted 4y ago[deleted]
- tomcam 4y agoHad no idea this was in Chrome. Thanks, Trane! You of all people may be amused to know Charlie Parker’s son taught me saxophone.
- satvikpendem 4y agoHaruki Murakami has a nice short story about Charlie Parker playing bossa nova, you should read it.
- tomcam 4y agoSo beautiful! I’m a huge fan of that kind of surrealism and never ran into this story. Thank you.
- satvikpendem 4y agoHis books are all good, this story occurs in his short story collection First Person Singular. Personally, Colorless Tsukuru Tazaki is my favorite of his.
- hosteur 4y agoSet up a simple Jekyll site and start Jekyll server with live reload on.
- tomcam 4y agoThis is for my own SSG ;)
- xcubic 4y agoThe simplest solution might be to use parcel https://parceljs.org/ https://parceljs.org/ > The zero configuration build tool for the web.