Skip to content
This repository has been archived by the owner. It is now read-only.
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Rem

Rem is a simple mixin for Sass which converts pixel values to rem values with a pixel fallback.

⚠️ NOTE: This project is no longer being maintained. If you're interested in taking over maintenance, please contact me.

Current Version: 1.0.1
Sass Support: Sass 3.2.5, Libsass

Usage

Use Rem with Sass:

@import "path/to/lib/rem";

body {
    @include rem(padding, 5px 10px);
}

compiles to

body {
    padding: 5px 10px;
    padding: .5rem 1rem;
}

You can find more examples in the tests.

Credit

A lot of credit goes to bitmanic/rem, which inspired the API for this library. I needed a rem mixin which works with Libsass, and would have ended up rewriting a lot of his library to get there (also, the repo seems a little dead as of writing).

Development

In order to run all tests, you'll need to install the Sass command line utility as well as have the sassc binary on your PATH. If you're on Windows, you'll need to install Make.

Once you're set up, you can run the following commands:

$ make compile-c   # compile the test file with Libsass
$ make compile-rb  # compile the test file with Sass
$ make test-c      # test compiling with Libsass
$ make test-rb     # test compiling with Sass
$ make test        # run all tests

When no build target is specified, make will run test. This means you can use the following command for brevity:

$ make

Please run the tests before submitting a pull request. Both Sass and Libsass tests should say "All OK :)".

License

Copyright 2013, Rowan Manning
Licensed under the MIT license.

About

[UNMAINTAINED] Rem is a simple mixin for Sass which converts pixel values to rem values with a pixel fallback.

Resources

License

Packages

No packages published