Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
enhance-css
Advanced tools
Enhance-css is a node.js library for enhancing CSS with:
There is also an option to create non-embedded version suited well for older browsers (IE 7 and below).
node 0.6.0+ on *nix (fully tested on OS X 10.6+ and CentOS 5.x)
node 0.8.0+ on Windows
npm install enhance-css
Most likely you are going to pass multiple CSS files into it and specify root directory and output file, e.g.
cat path/to/first.css path/to/second.css path/to/third.css | enhancecss -o bundled.css --root ./public/
Root ('--root') parameter is required to properly locate images referenced in css files.
To embed images in Base64 just add embed argument to image url, e.g.
a { background: url(/images/arrow.png?embed) 0 0 no-repeat; }
In case you also need to support older browser, just add --noembedversion parameter, e.g.
cat path/to/first.css path/to/second.css path/to/third.css | enhancecss -o bundled.css --root ./public/ --noembedversion
which will result in two output files: bundled.css and bundled-noembed.css.
To use one or more asset hosts, just specify --assetshosts parameter, e.g.
cat path/to/first.css path/to/second.css path/to/third.css | enhancecss -o bundled.css --root ./public/ --assethosts assets[0,1].example.com
which will result in all not-embedded image urls bound to either assets0.example.com or assets1.example.com.
Enhance-css is released under the MIT license.
FAQs
A well-tested CSS enhancer (Base64, assets hosts, cache boosters, etc)
The npm package enhance-css receives a total of 47 weekly downloads. As such, enhance-css popularity was classified as not popular.
We found that enhance-css 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.