Skip to content

reworkcss/rework-plugin-at2x

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rework-plugin-at2x

Build Status

at2x() plugin for rework, formerly included in core

.at2x()

Adds at-2x keyword to background and background-image declarations to add retina support for images.

.logo {
  background-image: url('component.png') at-2x;
  width: 289px;
  height: 113px
}

yields:

.logo {
  background-image: url('component.png');
  width: 289px;
  height: 113px
}

@media all and (-webkit-min-device-pixel-ratio: 1.5) {
  .logo {
    background-image: url("[email protected]");
    background-size: contain
  }
}

About

at2x() plugin for rework, formerly included in core

Resources

License

Stars

Watchers

Forks

Packages

No packages published