mirror of
https://github.com/FortAwesome/Font-Awesome.git
synced 2025-01-28 22:21:18 +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);
|
||||
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 {
|
||||
position: relative;
|
||||
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
|
||||
readers do not read off random characters that represent icons */
|
||||
|
||||
.createIconClasses(@iterator: 1) when(@iterator <= length(@fa-var-glyphs)) {
|
||||
@fa-glyph-name: extract(extract(@fa-var-glyphs, @iterator), 1);
|
||||
.createIconClasses(@i: 1) when(@i <= length(@fa-var-glyphs)) {
|
||||
@fa-glyph-name: extract(extract(@fa-var-glyphs, @i), 1);
|
||||
@fa-glyph-name-unquoted: ~"@{fa-glyph-name}";
|
||||
.@{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();
|
||||
|
@ -9,6 +9,7 @@
|
||||
// calculate classes and values for rotation
|
||||
.calculateRotations(@i) when (@i >= 0) {
|
||||
@rotation-selector: ~"@{fa-css-prefix}-rotate-@{i}";
|
||||
|
||||
.@{rotation-selector} when (mod(@i, @fa-rotation-increment) = 0) {
|
||||
.fa-icon-rotate(@i);
|
||||
}
|
||||
@ -26,13 +27,14 @@
|
||||
// this loop
|
||||
|
||||
:root {
|
||||
.calculateIEFixes(@i) when (@i >= 0) {
|
||||
@rotation-selector: ~"@{fa-css-prefix}-rotate-@{i}";
|
||||
.calculateIEFixes(@i) when (@i <= 0) {
|
||||
@rotation-selector: ~"@{wi-css-prefix}-rotate-@{i}";
|
||||
|
||||
// check if this item needs some ie love
|
||||
.@{rotation-selector} when (mod(@i, 90) = 0) {
|
||||
filter: none;
|
||||
}
|
||||
// iterate
|
||||
.calculateIEFixes((@i - 1));
|
||||
.calculateIEFixes((@i + 1));
|
||||
}
|
||||
.calculateIEFixes(359);
|
||||
}
|
||||
|
@ -3,34 +3,28 @@
|
||||
|
||||
// scale icon size by n
|
||||
.createIconScales(@iterator: 1) when(@iterator <= length(@fa-var-scales)) {
|
||||
|
||||
@fa-icon-scale-name: extract(extract(@fa-var-scales, @iterator), 1);
|
||||
@fa-icon-scale-name-unquoted: ~"@{fa-icon-scale-name}";
|
||||
@fa-icon-scale: extract(extract(@fa-var-scales, @iterator), 2);
|
||||
|
||||
.@{fa-css-prefix}-@{fa-icon-scale-name-unquoted} {
|
||||
|
||||
font-size: floor(@fa-font-size-base * @fa-icon-scale);
|
||||
line-height: floor(@fa-font-size-base * @fa-icon-scale * 0.75);
|
||||
vertical-align: -15%;
|
||||
}
|
||||
|
||||
.createIconScales((@iterator + 1));
|
||||
}
|
||||
.createIconScales();
|
||||
|
||||
// multiply icon size by n
|
||||
.createIconMultipliers(@iterator: 1) when(@iterator <= length(@fa-var-multipliers)) {
|
||||
|
||||
@fa-icon-multiplier-name: extract(extract(@fa-var-multipliers, @iterator), 1);
|
||||
@fa-icon-multiplier-name-unquoted: ~"@{fa-icon-multiplier-name}";
|
||||
@fa-icon-multiplier: extract(extract(@fa-var-multipliers, @iterator), 2);
|
||||
|
||||
.@{fa-css-prefix}-@{fa-icon-multiplier-name-unquoted} {
|
||||
|
||||
font-size: floor(@fa-font-size-base * @fa-icon-multiplier);
|
||||
}
|
||||
|
||||
.createIconMultipliers((@iterator + 1));
|
||||
}
|
||||
.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
|
||||
readers do not read off random characters that represent icons */
|
||||
|
||||
.createIconClasses(@iterator: 1) when(@iterator <= length(@fa-var-glyphs)) {
|
||||
@fa-glyph-name: extract(extract(@fa-var-glyphs, @iterator), 1);
|
||||
.createIconClasses(@i: 1) when(@i <= length(@fa-var-glyphs)) {
|
||||
@fa-glyph-name: extract(extract(@fa-var-glyphs, @i), 1);
|
||||
@fa-glyph-name-unquoted: ~"@{fa-glyph-name}";
|
||||
.@{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();
|
||||
|
@ -12,6 +12,7 @@
|
||||
// calculate classes and values for rotation
|
||||
.calculateRotations(@i) when (@i >= 0) {
|
||||
@rotation-selector: ~"@{fa-css-prefix}-rotate-@{i}";
|
||||
|
||||
.@{rotation-selector} when (mod(@i, @fa-rotation-increment) = 0) {
|
||||
.fa-icon-rotate(@i);
|
||||
}
|
||||
@ -29,13 +30,14 @@
|
||||
// this loop
|
||||
|
||||
:root {
|
||||
.calculateIEFixes(@i) when (@i >= 0) {
|
||||
@rotation-selector: ~"@{fa-css-prefix}-rotate-@{i}";
|
||||
.calculateIEFixes(@i) when (@i <= 0) {
|
||||
@rotation-selector: ~"@{wi-css-prefix}-rotate-@{i}";
|
||||
|
||||
// check if this item needs some ie love
|
||||
.@{rotation-selector} when (mod(@i, 90) = 0) {
|
||||
filter: none;
|
||||
}
|
||||
// iterate
|
||||
.calculateIEFixes((@i - 1));
|
||||
.calculateIEFixes((@i + 1));
|
||||
}
|
||||
.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
|
||||
.createIconScales(@iterator: 1) when(@iterator <= length(@fa-var-scales)) {
|
||||
|
||||
@fa-icon-scale-name: extract(extract(@fa-var-scales, @iterator), 1);
|
||||
@fa-icon-scale-name-unquoted: ~"@{fa-icon-scale-name}";
|
||||
@fa-icon-scale: extract(extract(@fa-var-scales, @iterator), 2);
|
||||
|
||||
.@{fa-css-prefix}-@{fa-icon-scale-name-unquoted} {
|
||||
|
||||
font-size: floor(@fa-font-size-base * @fa-icon-scale);
|
||||
line-height: floor(@fa-font-size-base * @fa-icon-scale * 0.75);
|
||||
vertical-align: -15%;
|
||||
}
|
||||
|
||||
.createIconScales((@iterator + 1));
|
||||
}
|
||||
.createIconScales();
|
||||
|
||||
// multiply icon size by n
|
||||
.createIconMultipliers(@iterator: 1) when(@iterator <= length(@fa-var-multipliers)) {
|
||||
|
||||
@fa-icon-multiplier-name: extract(extract(@fa-var-multipliers, @iterator), 1);
|
||||
@fa-icon-multiplier-name-unquoted: ~"@{fa-icon-multiplier-name}";
|
||||
@fa-icon-multiplier: extract(extract(@fa-var-multipliers, @iterator), 2);
|
||||
|
||||
.@{fa-css-prefix}-@{fa-icon-multiplier-name-unquoted} {
|
||||
|
||||
font-size: floor(@fa-font-size-base * @fa-icon-multiplier);
|
||||
}
|
||||
|
||||
.createIconMultipliers((@iterator + 1));
|
||||
}
|
||||
.createIconMultipliers();
|
||||
|
Loading…
x
Reference in New Issue
Block a user