Skip to content
This repository has been archived by the owner on Apr 5, 2020. It is now read-only.

Latest commit

 

History

History
81 lines (52 loc) · 1.93 KB

README.md

File metadata and controls

81 lines (52 loc) · 1.93 KB

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.