Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2015
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. // ----
  2. // libsass (v3.2.5)
  3. // ----
  4.  
  5. @function dec-to-hex($d) {
  6. $hexVals: "A" "B" "C" "D" "E" "F";
  7. $base: 16;
  8. $quotient: $d;
  9. $result: "";
  10. @if $d == 0 {
  11. $result: "00";
  12. }
  13. @while $quotient != 0 {
  14. $mod: $quotient % $base;
  15. $quotient: floor($quotient / $base);
  16. @if $mod > 9 {
  17. $mod: nth($hexVals, $mod - 9);
  18. }
  19. @if $d < $base {
  20. $result: "0" + $mod;
  21. } @else {
  22. $result: $mod + $result;
  23. }
  24. }
  25.  
  26. @return #{"\"\\"}#{$result + "\""};
  27. }
  28.  
  29. .icon {
  30. content: dec-to-hex(58245);
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement