mirror of
https://github.com/FortAwesome/Font-Awesome.git
synced 2025-01-30 23:18:24 +08:00
Updated Less: fixed loops in rotated-fixed.less, minor code formatting changes.
This commit is contained in:
parent
5213cd9225
commit
c194cfe357
12
css/font-awesome.css
vendored
12
css/font-awesome.css
vendored
@ -178,18 +178,6 @@
|
|||||||
-ms-transform: scale(1, -1);
|
-ms-transform: scale(1, -1);
|
||||||
transform: scale(1, -1);
|
transform: scale(1, -1);
|
||||||
}
|
}
|
||||||
:root .fa-rotate-270 {
|
|
||||||
filter: none;
|
|
||||||
}
|
|
||||||
:root .fa-rotate-180 {
|
|
||||||
filter: none;
|
|
||||||
}
|
|
||||||
:root .fa-rotate-90 {
|
|
||||||
filter: none;
|
|
||||||
}
|
|
||||||
:root .fa-rotate-0 {
|
|
||||||
filter: none;
|
|
||||||
}
|
|
||||||
.fa-stack {
|
.fa-stack {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
2
css/font-awesome.min.css
vendored
2
css/font-awesome.min.css
vendored
File diff suppressed because one or more lines are too long
@ -1,12 +1,12 @@
|
|||||||
/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
|
/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
|
||||||
readers do not read off random characters that represent icons */
|
readers do not read off random characters that represent icons */
|
||||||
|
|
||||||
.createIconClasses(@iterator: 1) when(@iterator <= length(@fa-var-glyphs)) {
|
.createIconClasses(@i: 1) when(@i <= length(@fa-var-glyphs)) {
|
||||||
@fa-glyph-name: extract(extract(@fa-var-glyphs, @iterator), 1);
|
@fa-glyph-name: extract(extract(@fa-var-glyphs, @i), 1);
|
||||||
@fa-glyph-name-unquoted: ~"@{fa-glyph-name}";
|
@fa-glyph-name-unquoted: ~"@{fa-glyph-name}";
|
||||||
.@{fa-css-prefix}-@{fa-glyph-name-unquoted}:before {
|
.@{fa-css-prefix}-@{fa-glyph-name-unquoted}:before {
|
||||||
content: extract(extract(@fa-var-glyphs, @iterator), 2);
|
content: extract(extract(@fa-var-glyphs, @i), 2);
|
||||||
}
|
}
|
||||||
.createIconClasses((@iterator + 1));
|
.createIconClasses((@i + 1));
|
||||||
}
|
}
|
||||||
.createIconClasses();
|
.createIconClasses();
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
// calculate classes and values for rotation
|
// calculate classes and values for rotation
|
||||||
.calculateRotations(@i) when (@i >= 0) {
|
.calculateRotations(@i) when (@i >= 0) {
|
||||||
@rotation-selector: ~"@{fa-css-prefix}-rotate-@{i}";
|
@rotation-selector: ~"@{fa-css-prefix}-rotate-@{i}";
|
||||||
|
|
||||||
.@{rotation-selector} when (mod(@i, @fa-rotation-increment) = 0) {
|
.@{rotation-selector} when (mod(@i, @fa-rotation-increment) = 0) {
|
||||||
.fa-icon-rotate(@i);
|
.fa-icon-rotate(@i);
|
||||||
}
|
}
|
||||||
@ -26,13 +27,14 @@
|
|||||||
// this loop
|
// this loop
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
.calculateIEFixes(@i) when (@i >= 0) {
|
.calculateIEFixes(@i) when (@i <= 0) {
|
||||||
@rotation-selector: ~"@{fa-css-prefix}-rotate-@{i}";
|
@rotation-selector: ~"@{wi-css-prefix}-rotate-@{i}";
|
||||||
|
|
||||||
|
// check if this item needs some ie love
|
||||||
.@{rotation-selector} when (mod(@i, 90) = 0) {
|
.@{rotation-selector} when (mod(@i, 90) = 0) {
|
||||||
filter: none;
|
filter: none;
|
||||||
}
|
}
|
||||||
// iterate
|
.calculateIEFixes((@i + 1));
|
||||||
.calculateIEFixes((@i - 1));
|
|
||||||
}
|
}
|
||||||
.calculateIEFixes(359);
|
.calculateIEFixes(359);
|
||||||
}
|
}
|
||||||
|
@ -3,34 +3,28 @@
|
|||||||
|
|
||||||
// scale icon size by n
|
// scale icon size by n
|
||||||
.createIconScales(@iterator: 1) when(@iterator <= length(@fa-var-scales)) {
|
.createIconScales(@iterator: 1) when(@iterator <= length(@fa-var-scales)) {
|
||||||
|
|
||||||
@fa-icon-scale-name: extract(extract(@fa-var-scales, @iterator), 1);
|
@fa-icon-scale-name: extract(extract(@fa-var-scales, @iterator), 1);
|
||||||
@fa-icon-scale-name-unquoted: ~"@{fa-icon-scale-name}";
|
@fa-icon-scale-name-unquoted: ~"@{fa-icon-scale-name}";
|
||||||
@fa-icon-scale: extract(extract(@fa-var-scales, @iterator), 2);
|
@fa-icon-scale: extract(extract(@fa-var-scales, @iterator), 2);
|
||||||
|
|
||||||
.@{fa-css-prefix}-@{fa-icon-scale-name-unquoted} {
|
.@{fa-css-prefix}-@{fa-icon-scale-name-unquoted} {
|
||||||
|
|
||||||
font-size: floor(@fa-font-size-base * @fa-icon-scale);
|
font-size: floor(@fa-font-size-base * @fa-icon-scale);
|
||||||
line-height: floor(@fa-font-size-base * @fa-icon-scale * 0.75);
|
line-height: floor(@fa-font-size-base * @fa-icon-scale * 0.75);
|
||||||
vertical-align: -15%;
|
vertical-align: -15%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.createIconScales((@iterator + 1));
|
.createIconScales((@iterator + 1));
|
||||||
}
|
}
|
||||||
.createIconScales();
|
.createIconScales();
|
||||||
|
|
||||||
// multiply icon size by n
|
// multiply icon size by n
|
||||||
.createIconMultipliers(@iterator: 1) when(@iterator <= length(@fa-var-multipliers)) {
|
.createIconMultipliers(@iterator: 1) when(@iterator <= length(@fa-var-multipliers)) {
|
||||||
|
|
||||||
@fa-icon-multiplier-name: extract(extract(@fa-var-multipliers, @iterator), 1);
|
@fa-icon-multiplier-name: extract(extract(@fa-var-multipliers, @iterator), 1);
|
||||||
@fa-icon-multiplier-name-unquoted: ~"@{fa-icon-multiplier-name}";
|
@fa-icon-multiplier-name-unquoted: ~"@{fa-icon-multiplier-name}";
|
||||||
@fa-icon-multiplier: extract(extract(@fa-var-multipliers, @iterator), 2);
|
@fa-icon-multiplier: extract(extract(@fa-var-multipliers, @iterator), 2);
|
||||||
|
|
||||||
.@{fa-css-prefix}-@{fa-icon-multiplier-name-unquoted} {
|
.@{fa-css-prefix}-@{fa-icon-multiplier-name-unquoted} {
|
||||||
|
|
||||||
font-size: floor(@fa-font-size-base * @fa-icon-multiplier);
|
font-size: floor(@fa-font-size-base * @fa-icon-multiplier);
|
||||||
}
|
}
|
||||||
|
|
||||||
.createIconMultipliers((@iterator + 1));
|
.createIconMultipliers((@iterator + 1));
|
||||||
}
|
}
|
||||||
.createIconMultipliers();
|
.createIconMultipliers();
|
||||||
|
8
src/assets/font-awesome/less/icons.less
vendored
8
src/assets/font-awesome/less/icons.less
vendored
@ -4,12 +4,12 @@
|
|||||||
/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
|
/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
|
||||||
readers do not read off random characters that represent icons */
|
readers do not read off random characters that represent icons */
|
||||||
|
|
||||||
.createIconClasses(@iterator: 1) when(@iterator <= length(@fa-var-glyphs)) {
|
.createIconClasses(@i: 1) when(@i <= length(@fa-var-glyphs)) {
|
||||||
@fa-glyph-name: extract(extract(@fa-var-glyphs, @iterator), 1);
|
@fa-glyph-name: extract(extract(@fa-var-glyphs, @i), 1);
|
||||||
@fa-glyph-name-unquoted: ~"@{fa-glyph-name}";
|
@fa-glyph-name-unquoted: ~"@{fa-glyph-name}";
|
||||||
.@{fa-css-prefix}-@{fa-glyph-name-unquoted}:before {
|
.@{fa-css-prefix}-@{fa-glyph-name-unquoted}:before {
|
||||||
content: extract(extract(@fa-var-glyphs, @iterator), 2);
|
content: extract(extract(@fa-var-glyphs, @i), 2);
|
||||||
}
|
}
|
||||||
.createIconClasses((@iterator + 1));
|
.createIconClasses((@i + 1));
|
||||||
}
|
}
|
||||||
.createIconClasses();
|
.createIconClasses();
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
// calculate classes and values for rotation
|
// calculate classes and values for rotation
|
||||||
.calculateRotations(@i) when (@i >= 0) {
|
.calculateRotations(@i) when (@i >= 0) {
|
||||||
@rotation-selector: ~"@{fa-css-prefix}-rotate-@{i}";
|
@rotation-selector: ~"@{fa-css-prefix}-rotate-@{i}";
|
||||||
|
|
||||||
.@{rotation-selector} when (mod(@i, @fa-rotation-increment) = 0) {
|
.@{rotation-selector} when (mod(@i, @fa-rotation-increment) = 0) {
|
||||||
.fa-icon-rotate(@i);
|
.fa-icon-rotate(@i);
|
||||||
}
|
}
|
||||||
@ -29,13 +30,14 @@
|
|||||||
// this loop
|
// this loop
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
.calculateIEFixes(@i) when (@i >= 0) {
|
.calculateIEFixes(@i) when (@i <= 0) {
|
||||||
@rotation-selector: ~"@{fa-css-prefix}-rotate-@{i}";
|
@rotation-selector: ~"@{wi-css-prefix}-rotate-@{i}";
|
||||||
|
|
||||||
|
// check if this item needs some ie love
|
||||||
.@{rotation-selector} when (mod(@i, 90) = 0) {
|
.@{rotation-selector} when (mod(@i, 90) = 0) {
|
||||||
filter: none;
|
filter: none;
|
||||||
}
|
}
|
||||||
// iterate
|
.calculateIEFixes((@i + 1));
|
||||||
.calculateIEFixes((@i - 1));
|
|
||||||
}
|
}
|
||||||
.calculateIEFixes(359);
|
.calculateIEFixes(359);
|
||||||
}
|
}
|
||||||
|
6
src/assets/font-awesome/less/sizes.less
vendored
6
src/assets/font-awesome/less/sizes.less
vendored
@ -6,34 +6,28 @@
|
|||||||
|
|
||||||
// scale icon size by n
|
// scale icon size by n
|
||||||
.createIconScales(@iterator: 1) when(@iterator <= length(@fa-var-scales)) {
|
.createIconScales(@iterator: 1) when(@iterator <= length(@fa-var-scales)) {
|
||||||
|
|
||||||
@fa-icon-scale-name: extract(extract(@fa-var-scales, @iterator), 1);
|
@fa-icon-scale-name: extract(extract(@fa-var-scales, @iterator), 1);
|
||||||
@fa-icon-scale-name-unquoted: ~"@{fa-icon-scale-name}";
|
@fa-icon-scale-name-unquoted: ~"@{fa-icon-scale-name}";
|
||||||
@fa-icon-scale: extract(extract(@fa-var-scales, @iterator), 2);
|
@fa-icon-scale: extract(extract(@fa-var-scales, @iterator), 2);
|
||||||
|
|
||||||
.@{fa-css-prefix}-@{fa-icon-scale-name-unquoted} {
|
.@{fa-css-prefix}-@{fa-icon-scale-name-unquoted} {
|
||||||
|
|
||||||
font-size: floor(@fa-font-size-base * @fa-icon-scale);
|
font-size: floor(@fa-font-size-base * @fa-icon-scale);
|
||||||
line-height: floor(@fa-font-size-base * @fa-icon-scale * 0.75);
|
line-height: floor(@fa-font-size-base * @fa-icon-scale * 0.75);
|
||||||
vertical-align: -15%;
|
vertical-align: -15%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.createIconScales((@iterator + 1));
|
.createIconScales((@iterator + 1));
|
||||||
}
|
}
|
||||||
.createIconScales();
|
.createIconScales();
|
||||||
|
|
||||||
// multiply icon size by n
|
// multiply icon size by n
|
||||||
.createIconMultipliers(@iterator: 1) when(@iterator <= length(@fa-var-multipliers)) {
|
.createIconMultipliers(@iterator: 1) when(@iterator <= length(@fa-var-multipliers)) {
|
||||||
|
|
||||||
@fa-icon-multiplier-name: extract(extract(@fa-var-multipliers, @iterator), 1);
|
@fa-icon-multiplier-name: extract(extract(@fa-var-multipliers, @iterator), 1);
|
||||||
@fa-icon-multiplier-name-unquoted: ~"@{fa-icon-multiplier-name}";
|
@fa-icon-multiplier-name-unquoted: ~"@{fa-icon-multiplier-name}";
|
||||||
@fa-icon-multiplier: extract(extract(@fa-var-multipliers, @iterator), 2);
|
@fa-icon-multiplier: extract(extract(@fa-var-multipliers, @iterator), 2);
|
||||||
|
|
||||||
.@{fa-css-prefix}-@{fa-icon-multiplier-name-unquoted} {
|
.@{fa-css-prefix}-@{fa-icon-multiplier-name-unquoted} {
|
||||||
|
|
||||||
font-size: floor(@fa-font-size-base * @fa-icon-multiplier);
|
font-size: floor(@fa-font-size-base * @fa-icon-multiplier);
|
||||||
}
|
}
|
||||||
|
|
||||||
.createIconMultipliers((@iterator + 1));
|
.createIconMultipliers((@iterator + 1));
|
||||||
}
|
}
|
||||||
.createIconMultipliers();
|
.createIconMultipliers();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user