中国本土应用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.6KB

  1. // ------------------------------------------------------------------
  2. // Roboto
  3. // ------------------------------------------------------------------
  4. $roboto-font-path: './Roboto';
  5. @mixin roboto-font($type, $weight, $style) {
  6. @font-face {
  7. font-family: 'Roboto';
  8. src: url('#{$roboto-font-path}/Roboto-#{$type}-webfont.eot');
  9. src: url('#{$roboto-font-path}/Roboto-#{$type}-webfont.eot?#iefix') format('embedded-opentype'),
  10. url('#{$roboto-font-path}/Roboto-#{$type}-webfont.woff') format('woff'),
  11. url('#{$roboto-font-path}/Roboto-#{$type}-webfont.ttf') format('truetype'),
  12. url('#{$roboto-font-path}/Roboto-#{$type}-webfont.svg#Roboto') format('svg');
  13. font-weight: $weight;
  14. font-style: $style;
  15. }
  16. @font-face {
  17. font-family: 'Roboto-#{$type}';
  18. src: url('#{$roboto-font-path}/Roboto-#{$type}-webfont.eot');
  19. src: url('#{$roboto-font-path}/Roboto-#{$type}-webfont.eot?#iefix') format('embedded-opentype'),
  20. url('#{$roboto-font-path}/Roboto-#{$type}-webfont.woff') format('woff'),
  21. url('#{$roboto-font-path}/Roboto-#{$type}-webfont.ttf') format('truetype'),
  22. url('#{$roboto-font-path}/Roboto-#{$type}-webfont.svg#Roboto') format('svg');
  23. }
  24. }
  25. @mixin roboto-font-pair($type, $weight) {
  26. @include roboto-font('#{$type}', $weight, normal);
  27. @include roboto-font('#{$type}Italic', $weight, italic);
  28. }
  29. @include roboto-font-pair('Thin', 100);
  30. @include roboto-font-pair('Light', 300);
  31. @include roboto-font-pair('Regular', 400);
  32. @include roboto-font-pair('Medium', 500);
  33. @include roboto-font-pair('Bold', 700);
  34. @include roboto-font-pair('Black', 900);
上海开阖软件有限公司 沪ICP备12045867号-1