
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
This projects uses [css-polyfills.js](http://philschatz.com/css-polyfills.js/) to generate an HTML and a CSS file from a HTML file and CSS file that contains CSS Rules not supported by browsers or reading systems.
This projects uses css-polyfills.js to generate an HTML and a CSS file from a HTML file and CSS file that contains CSS Rules not supported by browsers or reading systems.
You can install locally or globally (npm install -g css-bake
). Installing globally will give you access to css-bake
from the commandline.
Required args:
--input-html
: existing HTML file to convert--input-css
: existing CSS file to convert--output-html
: new converted HTML file--output-css
: new converted CSS file (optional)given the following HTML:
<html>
<body>
<div class="wrapped">Hello World</div>
</body>
</html>
and CSS files:
.wrapped { border: 10px solid black; }
.wrapped::outside { border: 10px solid green; }
Run the following:
css-bake --input-html ./test/test.html --input-css ./test/test.css --output-html ./output.html
and you should get the following output.html
:
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<span style="border:10px solid green;">
<div class="wrapped" style="border:10px solid black;">Hello World</div>
</span>
</body>
</html>
You may also add an optional --output-css ./output.css
which will place the styles in a CSS file instead of "baking" them into the style="..."
attribute.
Then, output.html
will be:
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<span class="js-polyfill-autoclass-0-dot-wrapped-outside">
<div class="wrapped">Hello World</div>
</span>
</body>
</html>
and output.css
will be:
.wrapped {
border: 10px solid black;
}
.js-polyfill-autoclass-0-dot-wrapped-outside {
border: 10px solid green;
}
To do this, you will need to:
Let's use the example test file in ./test/test.html
:
# Generate the **old** HTML file (the file extension is important)
css-bake -i ./test/test.html -c ./test/test.css -o ./old.xhtml
# Change `./test/test.css` by commenting out a line or two and save
# ...
# Generate the **new** HTML file
css-bake -i ./test/test.html -c ./test/test.css -o ./new.xhtml
# Generate the diff'd HTML file
# (the file extension on diff.xhtml is important if opened in a browser)
xsltproc --stringparam oldPath ./old.xhtml ./compare.xsl ./new.xhtml > ./diff.xhtml
# **Note:** The location of old.xhtml in the previous line is
# relative to compare.xsl and **not** the current working directory.
FAQs
This projects uses [css-polyfills.js](http://philschatz.com/css-polyfills.js/) to generate an HTML and a CSS file from a HTML file and CSS file that contains CSS Rules not supported by browsers or reading systems.
The npm package css-bake receives a total of 1 weekly downloads. As such, css-bake popularity was classified as not popular.
We found that css-bake demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.