tentcss icon indicating copy to clipboard operation
tentcss copied to clipboard

Correctly adding unit to number [tentcss/src/02_tools/_scaling.scss]

Open dimbslmh opened this issue 6 years ago • 1 comments

Currently rem and em functions are returning a string, because the unit is incorrectly appended. See: https://css-tricks.com/snippets/sass/correctly-adding-unit-number/

https://github.com/sitetent/tentcss/blob/bac3d003a7c45a5b8be59bef50328e50bd99256c/src/02_tools/_scaling.scss#L15-L17

 	$return: append($return, ($val / $root + rem)); 
 } @else { 
 	$return: append($return, ($val * $root + px)); 

https://github.com/sitetent/tentcss/blob/bac3d003a7c45a5b8be59bef50328e50bd99256c/src/02_tools/_scaling.scss#L29-L31

 	$return: append($return, ($val / $root + em)); 
 } @else { 
 	$return: append($return, ($val * $root + px)); 

dimbslmh avatar Mar 05 '18 08:03 dimbslmh

It looks like newer versions of Node Sass are breaking this. I'll be looking into doing a refactor for the current version of Tent to address this.

ulinaaron avatar Mar 28 '18 14:03 ulinaaron