Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
sass-resolution
Advanced tools
Readme
Sass mixin to target high density screens.
Demo: Sassmeister
Compatibility: Sass 3.2+ and LibSass
Download _resolution.scss
or install with Bower or npm:
bower install sass-resolution
npm install sass-resolution
Import _resolution.scss
and use the resolution
mixin.
You can set the resolution by using different notations and units : pixel-ratio (2
, 2x
or @2x
), dppx (2dppx
), dpi (192dpi
), percentage (200%
) or presets like retina
(Apple) and xhdpi
(Android).
You can set the default resolution by changing $resolution-default
.
@import "resolution";
.example {
@include resolution {
content: "default";
}
@include resolution(2dppx) {
content: "2dppx";
}
@include resolution(192dpi) {
content: "192dpi";
}
@include resolution(1.5) {
content: "1.5";
}
@include resolution(3dppx) {
content: "3dppx";
}
@include resolution(2.5) {
content: "2.5";
}
@include resolution(240dpi) {
content: "240dpi";
}
@include resolution(retina) {
content: "retina";
}
@include resolution(hdpi) {
content: "hdpi";
}
@include resolution(xhdpi) {
content: "xhdpi";
}
@include resolution(xxhdpi) {
content: "xxhdpi";
}
@include resolution(3x) {
content: "3x";
}
@include resolution("@3x") {
content: "@3x";
}
@include resolution(150%) {
content: "150%";
}
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
.example {
content: "default";
}
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
.example {
content: "2dppx";
}
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
.example {
content: "192dpi";
}
}
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
.example {
content: "1.5";
}
}
@media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 288dpi) {
.example {
content: "3dppx";
}
}
@media (-webkit-min-device-pixel-ratio: 2.5), (min-resolution: 240dpi) {
.example {
content: "2.5";
}
}
@media (-webkit-min-device-pixel-ratio: 2.5), (min-resolution: 240dpi) {
.example {
content: "240dpi";
}
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
.example {
content: "retina";
}
}
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
.example {
content: "hdpi";
}
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
.example {
content: "xhdpi";
}
}
@media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 288dpi) {
.example {
content: "xxhdpi";
}
}
@media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 288dpi) {
.example {
content: "3x";
}
}
@media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 288dpi) {
.example {
content: "@3x";
}
}
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) {
.example {
content: "150%";
}
}
FAQs
Sass mixin to target high density screens.
We found that sass-resolution 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
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).