Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
dialog-size
Advanced tools
A relative size-system that aims to ease the dialog between design and frontend by providing a system that is easily extendable and does not rely on names.
Play around with it in the demo
npm install dialog-size
Import dialog-size.scss
@import 'dialog-size/dialog-size';
PS: make sure to add node_modules
to your import paths
Define a palette of possible sizes by setting the $dialog-sizes
$dialog-sizes:
(0.2rem tiny) // size(-1)
0.5rem
(0.75rem small)
0.8rem
(1rem medium isBase) // size(0)
1.2rem
(1.5rem large)
3.5rem
5rem
(10rem huge)
20rem; // size(1)
Call the size()
function
body {
padding: size(-1); // => 0.2rem
font-size: size(0); // => 1rem
}
h1 {
font-size: size(1); // => 20rem
padding: size(large) 0; // => 1.5rem 0
}
p {
padding: size(3rem); // => 3.5rem
}
Once $dialog-sizes
is set up, the size()
function can be used in three different ways
size(0)
will return the base size (1rem)size(1)
will return the largest size in your system (20rem)size(-1)
will return the smallest size in your system (0.2rem)size(.2)
will snap to the closest value in your systemYou can also refer to absolute points in your size system by using names
size(large)
will return 1.5remThere is also the possibility to use a size in the same unit than your system. (In this case REM)
size(9rem)
will return 10rem since it's the closest in your systemCreated with ♥ by meodai. Licensed under the MIT License.
FAQs
Painless CSS sizes
The npm package dialog-size receives a total of 482 weekly downloads. As such, dialog-size popularity was classified as not popular.
We found that dialog-size demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.