New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

compass-spriter

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

compass-spriter

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Compass Spriter

A responsive sprite sheet generator plugin for Compass.

There are many sprite generators out there, and even one built in to compass. However, none of these sprite sheet generators can be applied to responsively sized elements. If you have an element with a percentage width or height, you will need a percentage background-position, which this plugin provides.

##Installation

$ gem install compass-spriter

##Usage

When creating a new project for Compass

$ compass create <my_project> -r compass-spriter --using compass-spriter

If using an existing project, edit your config.rb and add this line:

require 'compass-spriter'

To use the responsive sprite mixin

@import "spriter";

div#menu-icon{
	@include spriter(menu-icon);
}

##Options

You can configure Spriter's settings (defaults shown below).

If you want to override these settings, you must set the variables before the first use of @include spriter();

//glob of images to use in the sprite sheet
$spriter-images: "sprites/*.png";

//number of pixels of space between sprites
$spriter-spacing: 2px;

##Browser support

Browser support very generally good. Any browser that supports percentage-positioned background images should be fine.

##Contributions

Pull requests or the opening of issues are always welcome

FAQs

Package last updated on 12 Dec 2014

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc