Skip to content
/ rem Public

rem() is a Sass mixin that converts pixel values to rem values for whatever property is passed to it.

Notifications You must be signed in to change notification settings

raybrownco/rem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rem() is a Sass mixin that converts pixel values to rem values for whatever property is passed to it. It returns two lines of code — one of the regular pixel values (for some older browsers), and another with the converted rem values (for everyone else). Special thanks to Chris Epstein (http://chriseppstein.github.com) and Martin Bavio (http://martinbavio.com) for the help and code!

Sample input:

.element {
  @include rem('padding',10px 0 2px 5px);
}

Sample output:

.element {
  padding: 10px 0 2px 5px;
  padding: 1rem 0 0.2rem 0.5rem;
}

About

rem() is a Sass mixin that converts pixel values to rem values for whatever property is passed to it.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •