Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
css-image
Advanced tools
Readme
generator css and scss templates for images
var imagecss = require("css-image");
var files = [{
width: 400,
height: 300,
file: "t.png"
}];
var result = imagecss(files ,{
css: true,
scss: true,
retina: true,
squeeze: 2,
root: "root"
})
result is
.img_t{
width: 400px;
height: 300px;
background-image: url(root/t.png);
background-size: 400px 300px;
}
@media (min-device-pixel-ratio: 2) and (min-resolution: 192dpi){
.img_t{
width: 400px;
height: 300px;
background-image: url(root/t-50pc.png);
background-size: 400px 300px;
}
}
.img_t-s2{
width: 200px;
height: 150px;
background-image: url(root/t.png);
background-size: 200px 150px;
}
@mixin img_t(){
width: 400px;
height: 300px;
background-image: url(root/t.png);
background-size: 400px 300px;
@media (min-device-pixel-ratio: 2) and (min-resolution: 192dpi){
width: 400px;
height: 300px;
background-image: url(root/t-50pc.png);
background-size: 400px 300px;
}
}
$img_t__width: 400px;
$img_t__height: 300px;
$img_t__path: 'root/t-50pc.png';
@mixin img_t-s2(){
width: 200px;
height: 150px;
background-image: url(root/t.png);
background-size: 200px 150px;
}
$img_t-s2__width: 200px;
$img_t-s2__height: 150px;
$img_t-s2__path: 'root/t.png';
type: String
default: ""
example:
file: `test/image.png`
root: `images`
result: `images/test/image.png`
type: Boolean default: false
example:
.img_t{
width: 400px;
height: 300px;
background-image: url(root/t.png);
background-size: 400px 300px;
}
type: Boolean
default: false
example:
@mixin img_t(){
width: 400px;
height: 300px;
background-image: url(root/t.png);
background-size: 400px 300px;
}
type: Boolean|String
default: false
example:
for css
.img_t{
width: 400px;
height: 300px;
background-image: url(root/t.png);
background-size: 400px 300px;
}
@media (min-device-pixel-ratio: 2) and (min-resolution: 192dpi){
.img_t{
width: 400px;
height: 300px;
background-image: url(root/t-50pc.png);
background-size: 400px 300px;
}
}
for scss
@mixin img_t(){
width: 400px;
height: 300px;
background-image: url(root/t.png);
background-size: 400px 300px;
@media (min-device-pixel-ratio: 2) and (min-resolution: 192dpi){
width: 400px;
height: 300px;
background-image: url(root/t-50pc.png);
background-size: 400px 300px;
}
}
$img_t__width: 400px;
$img_t__height: 300px;
$img_t__path: 'root/t.png';
squeeze
timestype: Int
default: 1
example: squeeze=2
for css
.img_t{
width: 400px;
height: 300px;
background-image: url(root/t.png);
background-size: 400px 300px;
}
.img_t-s2{
width: 200px;
height: 150px;
background-image: url(root/t.png);
background-size: 200px 150px;
}
for scss
@mixin img_t(){
width: 400px;
height: 300px;
background-image: url(root/t.png);
background-size: 400px 300px;
}
$img_t__width: 400px;
$img_t__height: 300px;
$img_t__path: 'root/t.png';
@mixin img_t-s2(){
width: 200px;
height: 150px;
background-image: url(root/t.png);
background-size: 200px 150px;
}
$img_t-s2__width: 200px;
$img_t-s2__height: 150px;
$img_t-s2__path: 'root/t.png';
type: string
default: "_"
type: string
default: "img_"
FAQs
generator css and scss templates for images
The npm package css-image receives a total of 51 weekly downloads. As such, css-image popularity was classified as not popular.
We found that css-image 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.