Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@mollahdev/cssom-lite
Advanced tools
CSSOM-Lite is available as an npm package.
npm:
npm i @mollahdev/cssom-lite
import CSSOMLite from '@mollahdev/cssom-lite';
const sheet = new CSSOMLite();
// register devices
sheet.addDevice('mobile', 575);
sheet.addDevice('tablet', 768);
sheet.addDevice('laptop', 911);
sheet.addCSS(`
@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');
* {
margin: 0;
padding: 0;
}
`)
CSSOM-lite ignores these properties/values, undefined, null, false, true, NaN, ''
sheet.addRule('.selector-a', 'background: orange');
sheet.addRule('.selector-a', 'color: white; text-decoration:none');
By using "remove" property like the example, you can remove already added value, note: remove property will be ignored in the final css ouput
sheet.addRule('.selector-a', 'background: orange');
sheet.addRule('.selector-a', `
color: white; text-decoration:none;
remove: background, border, fill;
`);
sheet.addRule('.selector-a', 'text-decoration: underline', {max: 'mobile'});
sheet.addRule('.selector-heading', 'font-size: 24px', {min: 'mobile', max: 'tablet'});
sheet.clear();
sheet.output()
FAQs
Generate css with javascript
The npm package @mollahdev/cssom-lite receives a total of 0 weekly downloads. As such, @mollahdev/cssom-lite popularity was classified as not popular.
We found that @mollahdev/cssom-lite demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.