I'm looking for a tool that will embed link
CSS files into the .html
file.
This tool would scan the .html
file. It would replace a line like:
<link rel="stylesheet" href="main.css" type="text/css" />
with the contents of the file main.css
(wrapped in a <style>
element). It would re-write the .html
file with the embedded CSS code from file main.css
.
I have found tools that "inline" the CSS within HTML elements (<div style="...">
). These are intended for email. I do not want those tools.
I want a tool that would copy the CSS file into a single <style>
element within the .html
file.
This tool should have a CLI, run on Linux, and be free (no payments, no shareware).
linux
tag for better discovery (gratis
tag no longer fits due to max-tags=5). Good luck! Cleaning up comments then. – Izzy♦ Oct 5 '19 at 10:36