
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Expression-driven CSS Property Binder - Dynamic CSS values using JavaScript expressions
Dynamic CSS property binding using JavaScript expressions. Bind CSS properties to element dimensions, create responsive layouts, and implement conditional styling.
npm install css-exp
<script src="https://unpkg.com/css-exp@latest/dist/css-exp.min.js"></script>
<div id="container" style="width: 1000px;">
<div data-expression="this.width = el('#container').width * 0.5"></div>
</div>
<script type="module">
import { cssExp } from 'css-exp';
cssExp.start();
</script>
<div data-expression="
this.display = el('#sidebar').width > 768 ? 'flex' : 'block';
this.fontSize = this.width < 480 ? 14px : 16px;
"></div>
Access element properties using el('#selector')
or reference the current element with this
:
// Element dimensions
this.width = el('#container').width * 0.5;
this.height = this.baseHeight * 1.2;
// Conditional styling
this.display = el('#menu').width > 768 ? 'block' : 'none';
// Logical operators
this.fontSize = this.width > 500 && this.height > 300 ? 18px : 14px;
width
, height
, top
, left
, right
, bottom
fontSize
, lineHeight
, letterSpacing
, fontWeight
baseWidth
, baseHeight
, baseFontSize
, etc.import { cssExp } from 'css-exp';
cssExp.start(); // Initialize
cssExp.addBinding(element, 'width', 'this.baseWidth * 2'); // Add binding
cssExp.removeBindings(element); // Remove bindings
cssExp.destroy(); // Cleanup
npm install
npm test
npm run build
MIT
FAQs
Expression-driven CSS Property Binder - Dynamic CSS values using JavaScript expressions
The npm package css-exp receives a total of 0 weekly downloads. As such, css-exp popularity was classified as not popular.
We found that css-exp 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.