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.
Talk about namespace...
Stylesheet has namespace and defines semantic scope parts: Single declaration:
namespace is prefixed to each class
Code:
const { NSSheet } from "nscss";
new NSSheet({
"@namespace": "App",
"redButton": { color: "red" },
"blueButton": { color: "blue" }
});
CSS output:
.App◼redButton { color: red; }
.App◼blueButton { color: blue; }
Declare a class as root:
const { NSSheet } from "nscss";
new NSSheet({
"@namespace": "Button",
"@define": {
"Button": NSSheet.root()
},
"Button": { color: "red" }
});
Custom states in nscss are just mapping between an attribute selector to a name.
Root with custom states:
const { NSSheet } from "nscss";
new NSSheet({
"@namespace": "Button",
"@define": {
"Button": NSSheet.root({
mouseHover: "[data-state-hover]",
disabled: "[data-state-disabled]"
})
},
"Button": { color: "red" }
});
Only affects the output css when used with component and scoped classes.
Code:
const { NSSheet } from "nscss";
const Label = new NSSheet(...);
new NSSheet({
"@namespace": "Button",
"@define": {
"Button": NSSheet.root(),
"Label": NSSheet.component(Label)
},
"Label": { color: "red" }
});
CSS output:
/* App root Label root */
.Button◼Button .Label◼Text { color: red; }
FAQs
CSS for Components
The npm package nscss receives a total of 4 weekly downloads. As such, nscss popularity was classified as not popular.
We found that nscss 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.
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.