octicon-mixins.less 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. @import "octicon-utf-codes.less";
  2. .icon-size(@size) {
  3. font-size: @size;
  4. width: @size;
  5. height: @size;
  6. }
  7. .icon(@size, @display: inline-block) {
  8. font-family: 'Octicons Regular';
  9. font-weight: normal;
  10. font-style: normal;
  11. display: @display;
  12. line-height: 1;
  13. -webkit-font-smoothing: antialiased;
  14. text-decoration: none;
  15. .icon-size(@size);
  16. }
  17. .octicon(@name, @size: 16px) {
  18. &::before {
  19. .icon(@size);
  20. content: @@name
  21. }
  22. }
  23. .mega-octicon(@name, @size: 32px) {
  24. &::before {
  25. .icon(@size);
  26. content: @@name
  27. }
  28. }
  29. // keep for backwards compatibility
  30. .octicon-font-legacy() {
  31. font-family: 'Octicons Regular';
  32. src: url("icons/octicons-2.1.2.woff") format("woff");
  33. font-weight: normal;
  34. font-style: normal;
  35. }
  36. .octicon-font() {
  37. font-family: 'Octicons Regular';
  38. src: url("icons/octicons.woff") format("woff");
  39. font-weight: normal;
  40. font-style: normal;
  41. }
  42. .atomicon-font() {
  43. font-family: 'Octicons Regular';
  44. src: url('icons/atomicons.woff') format('woff');
  45. font-weight: normal;
  46. font-style: normal;
  47. }