_functions.scss 515 B

1234567891011121314151617181920
  1. @function char($character-code) {
  2. @if function-exists("selector-append") {
  3. @return unquote("\"\\#{$character-code}\"");
  4. }
  5. @if "\\#{'x'}" == "\\x" {
  6. @return str-slice("\x", 1, 1) + $character-code;
  7. }
  8. @else {
  9. @return #{"\"\\"}#{$character-code + "\""};
  10. }
  11. }
  12. @function mdi($name) {
  13. @if map-has-key($mdi-icons, $name) == false {
  14. @warn "Icon #{$name} not found.";
  15. @return "";
  16. }
  17. @return char(map-get($mdi-icons, $name));
  18. }