Skip to content

Instantly share code, notes, and snippets.

@yatil

yatil/didntwork.scss

Last active Dec 17, 2015
Embed
What would you like to do?
@function rem($property, $sizeValue: 1) {
@return #{$property} + ':' + ($sizeValue * $basefontsize) + 'px;' + #{$property} + ':' + $sizeValue + 'rem;';
}
@include rem(padding, .5);
// Expected output:
padding: 8px;
padding: 0.5rem;
// Real output:
padding: 0.5;
padding: 0.5;
@mixin rem($property, $sizeValue: 1) {
#{$property}: ($sizeValue * $basefontsize) + px;
#{$property}: $sizeValue + rem;
}
@include rem(padding, .5);
// Expected output:
padding: 8px;
padding: 0.5rem;
// Real output:
padding: 8px;
padding: 0.5rem;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment