icons.core.less 2.9 KB
Newer Older
C
Catouse 已提交
1 2 3
/// ========================================================================
/// Font Awesome: icons.core.less
/// https://github.com/FortAwesome/Font-Awesome/tree/master/less
C
Catouse 已提交
4
///
C
Catouse 已提交
5 6 7 8 9 10 11 12 13 14 15 16
/// ZUI: The file has been changed in ZUI. It will not keep update with the
/// FontAwesome version in the future.
/// http://zui.sexy
/// ========================================================================
/// Font Awesome 3.2.1: The Font Awesome font is licensed under SIL OFL 1.1
/// Font Awesome CSS, LESS, and SASS files are licensed under MIT License
/// Font Awesome documentation licensed under CC BY 3.0
/// Font Awesome by Dave Gandy - http://fontawesome.io
/// ========================================================================


// Font family definition
C
Catouse 已提交
17 18 19 20 21 22 23 24 25 26 27 28

@font-face {
  font-family: @icon-font-name;
  src: url('@{icon-font-path}/@{icon-font-file-name}.eot?v=@{icon-font-version}');
  src: url('@{icon-font-path}/@{icon-font-file-name}.eot?#iefix&v=@{icon-font-version}') format('embedded-opentype'),
    url('@{icon-font-path}/@{icon-font-file-name}.woff?v=@{icon-font-version}') format('woff'),
    url('@{icon-font-path}/@{icon-font-file-name}.ttf?v=@{icon-font-version}') format('truetype'),
    url('@{icon-font-path}/@{icon-font-file-name}.svg#regular?v=@{icon-font-version}') format('svg');
  font-weight: normal;
  font-style: normal;
}

C
Catouse 已提交
29 30 31

// Core style

C
Catouse 已提交
32
.icon,
C
Catouse 已提交
33 34 35 36 37
[class^="icon-"],
[class*=" icon-"] {
  .icon-zenicon();
}

C
Catouse 已提交
38 39 40

// Fixed width

C
Catouse 已提交
41 42
.icon:before {
  display: inline-block;
C
Catouse 已提交
43
  min-width: @icon-font-size;
C
Catouse 已提交
44 45 46
  text-align: center;
}

C
Catouse 已提交
47 48

// makes sure icons active on rollover in links
C
Catouse 已提交
49

C
Catouse 已提交
50
a {
C
Catouse 已提交
51
  .icon,
C
Catouse 已提交
52 53 54 55 56 57
  [class^="icon-"],
  [class*=" icon-"] {
    display: inline;
  }
}

C
Catouse 已提交
58

C
Catouse 已提交
59 60
// Icon Sizes

C
Catouse 已提交
61 62 63 64 65
// makes the font 33% larger relative to the icon container
.icon-lg:before {
  vertical-align: -10%;
  font-size: 4/3em;
}
C
Catouse 已提交
66 67 68 69
.icon-2x { font-size: @icon-font-size*2; }
.icon-3x { font-size: @icon-font-size*3; }
.icon-4x { font-size: @icon-font-size*4; }
.icon-5x { font-size: @icon-font-size*5; }
C
Catouse 已提交
70 71 72


// Animated rotating icon
C
Catouse 已提交
73

C
Catouse 已提交
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
.icon-spin {
  display: inline-block;
  animation: spin 2s infinite linear;
}

// Prevent stack and spinners from being taken inline when inside a link
a .icon-spin {
  display: inline-block;
  text-decoration: none;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(359deg); }
}

C
Catouse 已提交
90 91 92

// 3D transform

C
Catouse 已提交
93
// Icon rotations and mirroring
C
Catouse 已提交
94
.icon-rotate-90 {
C
Catouse 已提交
95
  transform: rotate(90deg);
C
Codetector 已提交
96
  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
C
Catouse 已提交
97
}
C
Catouse 已提交
98
.icon-rotate-180 {
C
Catouse 已提交
99 100 101
  transform: rotate(180deg);
  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
}
C
Catouse 已提交
102
.icon-rotate-270 {
C
Catouse 已提交
103 104 105
  transform: rotate(270deg);
  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
}
C
Catouse 已提交
106
.icon-flip-horizontal {
C
Catouse 已提交
107 108
  transform: scale(-1, 1);
}
C
Catouse 已提交
109
.icon-flip-vertical {
C
Catouse 已提交
110 111 112
  transform: scale(1, -1);
}

C
Catouse 已提交
113 114 115 116 117 118
.icon.icon-rotate-90,
.icon.icon-rotate-180,
.icon.icon-rotate-270,
.icon.icon-flip-horizontal,
.icon.icon-flip-vertical {
  display: inline-block;
C
Catouse 已提交
119
}