Code Monkey home page Code Monkey logo

compass-rmagick-engine's Introduction

Compass Rmagick Engine

Compass Rmagick Engine is a drop in replacement for creating sprites using chunky_png.

Usage

Rails

  1. In your gem file add gem 'compass-rmagick-engine', '~> 0.0.1'
  2. Add sprite_engine = :rmagick to your compass config

Standalone

First run gem install compass-rmagick-engine

Then open your compass config file and add

require 'compass-rmagick-engine'
sprite_engine = :rmagick

compass-rmagick-engine's People

Contributors

jdeerhake avatar scottdavis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

compass-rmagick-engine's Issues

undefined method "new" for Compass::SassExtensions::Sprites::RmagickEngine:Module

I might be doing this wrong, but I went through the install steps:

gem install compass-rmagick-engine

And added these lines to the top of my config.rb file:

require 'compass-rmagick-engine'
sprite_engine = :rmagick;

...but when I go to "compass watch" and a CSS file has changed, I get the following error:

Change detected to: all.scss
NoMethodError on line 22 of /Users/dougavery/.rvm/gems/ree-1.8.7-2011.03/gems/compass-0.11.3/lib/compass/sass_extensions/sprites/sprite_methods.rb: undefined method `new' for Compass::SassExtensions::Sprites::RmagickEngine:Module

Any ideas? Looking for a way around chunky_png until the awesome new config options arrive in 0.11.4...

Thanks!

Sprites with individual spacing renders white background

When I create a sprite that has spacing, it renders the entire sprite with a white background.

For example:

$icon: sprite-map('icon/*.png', $position: 0%, $spacing: 100px, $repeat: no-repeat);
@import 'icon/*.png';

However, the transparency of the individual images is maintained. Only the background of the spacing is white. It occurs with 8-bit PNGs, 24-bit PNGs, and I have also tried it with mixed bit depths.

Why does this happen? As a workaround I'm using the default sprite engine, which renders the spacing correctly (transparent). But it's really slow...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.