Need help with rem?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

bitmanic
198 Stars 29 Forks 21 Commits 5 Opened issues

Description

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

Services available

!
?

Need anything else?

Contributors list

# 78,517
Ruby
Shell
Rails
Elixir
8 commits
# 488,327
craft3
PHP
HTML
Shell
4 commits
# 126,368
autopre...
CSS
page-tr...
jQuery
3 commits
# 230,235
HTML
Clojure
Shell
otf
2 commits

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;
}

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.